Skip to content

Instantly share code, notes, and snippets.

@keicoder
Created February 10, 2014 06:04
Show Gist options
  • Save keicoder/8911060 to your computer and use it in GitHub Desktop.
Save keicoder/8911060 to your computer and use it in GitHub Desktop.
objective-c : AppDelegate basic code with debug
//AppDelegate basic code with debug
#import "AppDelegate.h"
@implementation AppDelegate
#define debug 1
#pragma mark - didFinishLaunchingWithOptions
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
if (debug==1) {NSLog(@"Running %@ '%@'", self.class, NSStringFromSelector(_cmd));}
return YES;
}
#pragma mark - application 상태
- (void)applicationWillResignActive:(UIApplication *)application
{
if (debug==1) {NSLog(@"Running %@ '%@'", self.class, NSStringFromSelector(_cmd));}
}
- (void)applicationDidEnterBackground:(UIApplication *)application
{
if (debug==1) {NSLog(@"Running %@ '%@'", self.class, NSStringFromSelector(_cmd));}
}
- (void)applicationWillEnterForeground:(UIApplication *)application
{
if (debug==1) {NSLog(@"Running %@ '%@'", self.class, NSStringFromSelector(_cmd));}
}
- (void)applicationDidBecomeActive:(UIApplication *)application
{
if (debug==1) {NSLog(@"Running %@ '%@'", self.class, NSStringFromSelector(_cmd));}
}
- (void)applicationWillTerminate:(UIApplication *)application
{
if (debug==1) {NSLog(@"Running %@ '%@'", self.class, NSStringFromSelector(_cmd));}
}
@end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment