[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(appHasGoneInForeground:) name:UIApplicationWillEnterForegroundNotification object:nil]; //别忘了删除监听 [[NSNotificationCenter defaultCenter] removeObserver:self];
UIApplicationDidEnterBackgroundNotification //进入后台 UIApplicationWillEnterForegroundNotification //回到程序
时间: 2024-10-12 08:37:35