iOS系统通知NSNotificationName

  • 当程序被推送到后台时
UIApplicationDidEnterBackgroundNotification
  • 当程序从后台将要重新回到前台时
UIApplicationWillEnterForegroundNotification
  • 当程序完成载入后通知
UIApplicationDidFinishLaunchingNotification
  • 应用程序转为激活状态时
UIApplicationDidBecomeActiveNotification
  • 用户按下主屏幕按钮调用通知,并未进入后台状态
UIApplicationWillResignActiveNotification
  • 内存较低时通知
UIApplicationDidReceiveMemoryWarningNotification
  • 当程序将要退出时通知
UIApplicationWillTerminateNotification
  • 当系统时间发生改变时通知
UIApplicationSignificantTimeChangeNotification
  • 当StatusBar框方向将要变化时通知
UIApplicationWillChangeStatusBarOrientationNotification
// userInfo contains NSNumber with new orientation
  • 当StatusBar框方向改变时通知
UIApplicationDidChangeStatusBarOrientationNotification
// userInfo contains NSNumber with old orientation
UIApplicationStatusBarOrientationUserInfoKey
// userInfo dictionary key for status bar orientation
  • 当StatusBar框方向将要改变时通知
UIApplicationWillChangeStatusBarFrameNotification 
// userInfo contains NSValue with new frame
  • 系统状态栏已经发生变化通知
UIApplicationDidChangeStatusBarFrameNotification
// userInfo contains NSValue with old frame
UIApplicationStatusBarFrameUserInfoKey
// userInfo dictionary key for status bar frame
  • 后台下载状态发生改变时通知(iOS7.0以后可用)
UIApplicationBackgroundRefreshStatusDidChangeNotification
  • 受保护的文件当前变为不可用时通知
UIApplicationProtectedDataWillBecomeUnavailable
  • 受保护的文件当前变为可用时通知
UIApplicationProtectedDataDidBecomeAvailable
  • 截屏通知(iOS7.0以后可用)
UIApplicationUserDidTakeScreenshotNotification
最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容