杀死程序时调用
//进程杀死时会调用这个
- (void)applicationWillTerminate:(UIApplication *)application{
DLog(@"进程杀死时会调用这个");
}
进入后台时调用这个
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(comeHome:) name:@"UIApplicationDidEnterBackgroundNotification" object:nil];
- (void)comeHome:(UIApplication *)application {
NSLog(@"进入后台");
}