[iOS基础控件 - 6.10.6] UIApplicationDelegate
1 - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { 2 NSLog(@"app启动完毕的时候调用"); 3 return YES; 4 } 5 6 - (void)applicationDidReceiveMemoryWarning:(UIApplication *)application { 7 NSLog(@"app接收到内存警告时调用"); 8 } 9 10 - (void)applicationDidEnterBackground:(UIApplication *)application { 11 NSLog(@"app进入后台的时候调用"); 12 } 13 14 - (void)applicationWillResignActive:(UIApplication *)application { 15 NSLog(@"app将要被挂起"); 16 } 17 18 - (void)applicationWillEnterForeground:(UIApplication *)application { 19 NSLog(@"app回到前台"); 20 } 21 22 - (void)applicationDidBecomeActive:(UIApplication *)application { 23 NSLog(@"app激活后"); 24 } 25 26 - (void)applicationWillTerminate:(UIApplication *)application { 27 NSLog(@"app将要关闭"); 28 } 29
1 int main(int argc, char * argv[]) { 2 @autoreleasepool { 3 return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class])); 4 } 5 }
郑重声明:本站内容如果来自互联网及其他传播媒体,其版权均属原媒体及文章作者所有。转载目的在于传递更多信息及用于网络分享,并不代表本站赞同其观点和对其真实性负责,也不构成任何其他建议。