iOS开发之监听应用进入前台后台

//后台进前台通知 UIApplicationDidBecomeActiveNotification
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(didBecomeActive) name:UIApplicationDidBecomeActiveNotification object:nil];

//进入后台UIApplicationDidEnterBackgroundNotification
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(didEnterBackground) name:UIApplicationDidEnterBackgroundNotification object:nil];

我们

posted @ 2019-12-11 18:29  kawerd  阅读(4893)  评论(0编辑  收藏  举报