Skip to content

panpengfei21/PPFKeyboardNotificationDemo

Repository files navigation

PPFKeyboardNotificationDemo

引用

pod 'PPFKeyboardNotification'

使用

1.增加观察者和代理

PPFKeyboardNotification.share.addObserver()
PPFKeyboardNotification.share.delegate = self

2.删除观察者

PPFKeyboardNotification.share.removeObserver()
PPFKeyboardNotification.share.delegate = nil

3.实现代理

PPFKeyboardNotification_delegate
func keyboardWillShowWithModul(modul: PPFKeyboardNotification, rect: CGRect, duration: Double, animationOption: UIView.AnimationOptions) {
    print("键盘将要显现")
}
    
func keyboardWillHideWithModul(modul: PPFKeyboardNotification, rect: CGRect, duration: Double, animationOption: UIView.AnimationOptions) {
    print("键盘将要隐藏")
}

About

监控键盘显示和隐藏

Resources

License

Stars

Watchers

Forks

Packages

No packages published