一、鍵盤
1、UIKeyboardWillShowNotification 即將顯示
2、UIKeyboardDidShowNotification 顯示完畢
3、UIKeyboardWillHideNotification 即將隱藏
4、UIKeyboardDidHideNotification 隱藏完畢
5、UIKeyboardWillChangeFrameNotification 位置尺寸即將發(fā)生改變
6、UIKeyboardDidChangeFrameNotification 位置尺寸改變完畢
系統(tǒng)發(fā)出鍵盤通知時,會附帶一下跟鍵盤有關(guān)的額外信息(字典),字典常見的key如下:
UIKeyboardFrameBeginUserInfoKey 鍵盤剛開始的frame
UIKeyboardFrameEndUserInfoKey 鍵盤最終的frame(動畫執(zhí)行完畢后)
UIKeyboardAnimationDurationUserInfoKey 鍵盤動畫的時間
UIKeyboardAnimationCurveUserInfoKey 鍵盤動畫的執(zhí)行節(jié)奏(快慢)
二、窗口
1、UIWindowDidBecomeVisibleNotification 窗口可見
2、UIWindowDidBecomeHiddenNotification 窗口隱藏
3、UIWindowDidBecomeKeyNotification
4、UIWindowDidResignKeyNotification
三、程序消息
1、UIApplicationDidEnterBackgroundNotification 已經(jīng)進入后臺
2、UIApplicationWillEnterForegroundNotification 將要進入前臺
3、UIApplicationDidFinishLaunchingNotification 已經(jīng)加載完成
4、UIApplicationDidBecomeActiveNotification 已經(jīng)激活
5、UIApplicationWillResignActiveNotification 將要激活
6、UIApplicationDidReceiveMemoryWarningNotification 內(nèi)存警告
7、UIApplicationWillTerminateNotification 將要終止
8、UIApplicationSignificantTimeChangeNotification 當(dāng)系統(tǒng)時間發(fā)生改變時(新的一天開始或時區(qū)變化)
9、UIApplicationWillChangeStatusBarOrientationNotification 將要改變狀態(tài)欄方向
10、UIApplicationDidChangeStatusBarOrientationNotification 已經(jīng)改變 狀態(tài)欄方向
UIApplicationStatusBarOrientationUserInfoKey
11、UIApplicationWillChangeStatusBarFrameNotification 將要改變狀態(tài)欄frame
12、UIApplicationDidChangeStatusBarFrameNotification 狀態(tài)欄frame改變
UIApplicationStatusBarFrameUserInfoKey
13、UIApplicationBackgroundRefreshStatusDidChangeNotification 后臺下載狀態(tài)發(fā)生改變時通知
14、UIApplicationProtectedDataWillBecomeUnavailable 設(shè)備鎖屏
15、UIApplicationProtectedDataDidBecomeAvailable 設(shè)備解鎖
16、UIApplicationUserDidTakeScreenshotNotification 設(shè)備截屏
四、電池、方向、傳感器
1、UIDeviceOrientationDidChangeNotification 方向
2、UIDeviceBatteryStateDidChangeNotification 電池狀態(tài)
3、UIDeviceBatteryLevelDidChangeNotification 電池電量
4、UIDeviceProximityStateDidChangeNotification 近距離傳感器(比如設(shè)備貼近了使用者的臉部)
五、音視頻
1、MPMediaLibraryDidChangeNotification
2、MPMusicPlayerControllerPlaybackStateDidChangeNotification
3、MPMusicPlayerControllerNowPlayingItemDidChangeNotification
4、MPMusicPlayerControllerVolumeDidChangeNotification
六、偏好設(shè)置
1、NSUserDefaultsSizeLimitExceededNotification 當(dāng)用戶默認(rèn)數(shù)據(jù)中存儲更多數(shù)據(jù)時發(fā)布
2、NSUbiquitousUserDefaultsNoCloudAccountNotification 當(dāng)設(shè)置了云默認(rèn)時,但沒有登錄iCloud用戶發(fā)布
3、NSUbiquitousUserDefaultsDidChangeAccountsNotification 當(dāng)用戶更改主iCloud帳戶時發(fā)布
4、NSUbiquitousUserDefaultsCompletedInitialSyncNotification 主線程發(fā)布,默認(rèn)完成下載數(shù)據(jù),無論是第一次設(shè)備連接到一個iCloud帳戶,或當(dāng)用戶切換他們的主要iCloud帳戶
5、NSUserDefaultsDidChangeNotification 在當(dāng)前進程中更改用戶默認(rèn)值時發(fā)布
七、其他
1、NSCurrentLocaleDidChangeNotification 本地化語言變化