- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { // Override point for customization after application launch. NSLog(@" ===> 程序开始 !"); return YES; } - (void)applicationWillResignActive:(UIApplication *)application { NSLog(@" ===> 程序暂行 !"); } - (void)applicationDidEnterBackground:(UIApplication *)application { NSLog(@" ===> 程序进入后台 !"); } - (void)applicationWillEnterForeground:(UIApplication *)application { NSLog(@" ===> 程序进入前台 !"); } - (void)applicationDidBecomeActive:(UIApplication *)application { NSLog(@" ===> 程序重新激活 !"); } - (void)applicationWillTerminate:(UIApplication *)application { NSLog(@" ===> 程序意外暂行 !"); UIDevice *device = [UIDevice currentDevice]; }