标签:
// // AppDelegate.m #import "AppDelegate.h" @implementation AppDelegate /** * app加载完毕的时候调用(一般只调用一次) * */ - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { NSLog(@"didFinishLaunchingWithOptions"); return YES; } /** * app失去焦点的时候调用(UI控件不能正常使用) */ - (void)applicationWillResignActive:(UIApplication *)application { NSLog(@"applicationWillResignActive"); } /** * app进入后台的时候调用(app消失不见) */ - (void)applicationDidEnterBackground:(UIApplication *)application { NSLog(@"applicationDidEnterBackground"); } /** * app进入前台的时候调用(app显示出来) */ - (void)applicationWillEnterForeground:(UIApplication *)application { NSLog(@"applicationWillEnterForeground"); } /** * 当app获得焦点的时候调用(这时候整个app的UI控件都能正常使用) */ - (void)applicationDidBecomeActive:(UIApplication *)application { NSLog(@"applicationDidBecomeActive"); } //app进入后台:休眠, 不能接受事情(比如关闭) /** * app关闭的时候调用(一般情况下不会调用) */ - (void)applicationWillTerminate:(UIApplication *)application { NSLog(@"applicationWillTerminate"); } @end
标签:
原文地址:http://www.cnblogs.com/yumian/p/5177451.html