// app失去焦点后,恢复焦点时调用这个方法,(进入后台也会失去焦点,所以返回时也会掉用)
- (void)applicationDidBecomeActive:(UIApplication *)application
// 对应 通知:UIApplicationDidBecomeActiveNotification
// app 失去焦点,(进入后台也会失去焦点)
- (void)applicationWillResignActive:(UIApplication *)application
// 对应 通知:UIApplicationWillResignActiveNotification
// app进入后台,或者锁屏
- (void)applicationDidEnterBackground:(UIApplication *)application
// 对应 通知:UIApplicationDidEnterBackgroundNotification
// app由后台(或者锁屏)状态,将要返回前台,但还未获取焦点
- (void)applicationWillEnterForeground:(UIApplication *)application
// 对应 通知:UIApplicationWillEnterForegroundNotification
网友评论