一、UIApplication 的相关事件
//注册应用进入后台的通知
[[NSNotificationCenter defaultCenter] addObserver:self
selector:@selector(StopRecord:)
name:UIApplicationDidEnterBackgroundNotification object:nil];
//注册应用使用系统截屏的通知(home键+锁屏键)
[[NSNotificationCenter defaultCenter] addObserver:self
selector:@selector(StopRecord:)
name:UIApplicationUserDidTakeScreenshotNotification object:nil];
等等。。。
二、UIKeyboard 的相关事件
//注册键盘出现的通知
[[NSNotificationCenter defaultCenter] addObserver:self
selector:@selector(handleKeyboardWillShowNotification:)
name:UIKeyboardWillShowNotification
object:nil];
//注册键盘消失的通知
[[NSNotificationCenter defaultCenter] addObserver:self
selector:@selector(handleKeyboardWillHideNotification:)
name:UIKeyboardWillHideNotification
object:nil];
//注册键盘frame已经改变的通知
[[NSNotificationCenter defaultCenter] addObserver:self
selector:@selector(keyboardDidChangeFrame:)
name:UIKeyboardDidChangeFrameNotification
object:nil];
等等。。。
三、NSTextStorage 的相关事件
//注册NSTextStorage将要编辑的通知
[[NSNotificationCenter defaultCenter] addObserver:self
selector:@selector(keyboardDidChangeFrame:)
name:NSTextStorageWillProcessEditingNotification
object:nil];
//注册NSTextStorage已经编辑的通知
[[NSNotificationCenter defaultCenter] addObserver:self
selector:@selector(keyboardDidChangeFrame:)
name:NSTextStorageDidProcessEditingNotification
object:nil];
等等。。。
四、UIAccessibility 的相关事件
//辅助功能 VoiceOver
[[NSNotificationCenter defaultCenter] addObserver:self
selector:@selector(keyboardDidChangeFrame:)
name:UIAccessibilityDarkerSystemColorsStatusDidChangeNotification
object:nil];
[[NSNotificationCenter defaultCenter] addObserver:self
selector:@selector(keyboardDidChangeFrame:)
name:UIAccessibilityScreenChangedNotification
object:nil];
等等。。。
五、UIDevice 的相关事件
//注册设备屏幕方向改变的通知
[[NSNotificationCenter defaultCenter] addObserver:self
selector:@selector(keyboardDidChangeFrame:)
name:UIDeviceOrientationDidChangeNotification
object:nil];
等等。。。
//注册 状态改变的通知
[[NSNotificationCenter defaultCenter] addObserver:self
selector:@selector(keyboardDidChangeFrame:)
name:UIDocumentStateChangedNotification
object:nil];
等等。。。
//注册 菜单控制器将要显示菜单 的通知
[[NSNotificationCenter defaultCenter] addObserver:self
selector:@selector(keyboardDidChangeFrame:)
name:UIMenuControllerWillShowMenuNotification
object:nil];
等等。。。
//注册 粘贴板 改变的通知
[[NSNotificationCenter defaultCenter] addObserver:self
selector:@selector(keyboardDidChangeFrame:)
name:UIPasteboardChangedNotification
object:nil];
等等。。。
//注册 屏幕模式 改变的通知
[[NSNotificationCenter defaultCenter] addObserver:self
selector:@selector(keyboardDidChangeFrame:)
name:UIScreenModeDidChangeNotification
object:nil];
等等。。。
//注册 改变的通知
[[NSNotificationCenter defaultCenter] addObserver:self
selector:@selector(keyboardDidChangeFrame:)
name:UITableViewSelectionDidChangeNotification
object:nil];
等等。。。
//注册 UITextField文本开始编辑 的通知
[[NSNotificationCenter defaultCenter] addObserver:self
selector:@selector(keyboardDidChangeFrame:)
name:UITextFieldTextDidBeginEditingNotification
object:nil];
等等。。。
//注册 的通知
[[NSNotificationCenter defaultCenter] addObserver:self
selector:@selector(keyboardDidChangeFrame:)
name:UITextInputCurrentInputModeDidChangeNotification
object:nil];
等等。。。
//注册 UITextView文本开始编辑 的通知
[[NSNotificationCenter defaultCenter] addObserver:self
selector:@selector(keyboardDidChangeFrame:)
name:UITextViewTextDidBeginEditingNotification
object:nil];
等等。。。
//注册 的通知
[[NSNotificationCenter defaultCenter] addObserver:self
selector:@selector(keyboardDidChangeFrame:)
name:UIViewControllerShowDetailTargetDidChangeNotification
object:nil];
等等。。。
//注册 UIWindow变为可见 的通知
[[NSNotificationCenter defaultCenter] addObserver:self
selector:@selector(keyboardDidChangeFrame:)
name:UIWindowDidBecomeVisibleNotification
object:nil];
等等。。。