Notification类型

UIDeviceOrientationDidChangeNotification // 设备旋转
UIDeviceBatteryStateDidChangeNotification // 电池状态改变
UIDeviceBatteryLevelDidChangeNotification // 电池电量改变
UIDeviceProximityStateDidChangeNotification // 近距离传感器(比如设备贴近了使用者的脸部)

 

键盘状态改变的时候,系统会发出一些特定的通知:
UIKeyboardWillShowNotification // 键盘即将显示
UIKeyboardDidShowNotification // 键盘显示完毕

UIKeyboardWillHideNotification // 键盘即将隐藏
UIKeyboardDidHideNotification // 键盘隐藏完毕 UIKeyboardWillChangeFrameNotification // 键盘的位置尺寸即将发生改变 UIKeyboardDidChangeFrameNotification // 键盘的位置尺寸改变完毕 系统发出键盘通知时,会附带一下跟键盘有关的额外信息(字典),字典常见的 key 如下: UIKeyboardFrameBeginUserInfoKey // 键盘刚开始的 frame UIKeyboardFrameEndUserInfoKey // 键盘最终的 frame(动画执行完毕后) UIKeyboardAnimationDurationUserInfoKey // 键盘动画的时间 UIKeyboardAnimationCurveUserInfoKey // 键盘动画的执行节奏(快慢)

猜你喜欢

转载自www.cnblogs.com/cindyli/p/9078208.html