Keyboard Handler in iOS, It also perfectly works with UIScrollViewKeyboardDismissMode.interactive.
- iOS 8.0+
- Xcode 11.0
- Swift 5.0 (>= 1.7.0)
- Swift 4.2 (>= 1.6.0)
- Swift 4.0 (>= 1.5.0)
- Swift 3.0 (1.0.0)
KUIKeyboard is available through CocoaPods. To install it, simply add the following line to your Podfile:
pod "KUIKeyboard"
import KUIKeyboard
var keyboard = KUIKeyboard()
override func viewDidAppear(_ animated: Bool) {
super.viewDidAppear(animated)
keyboard.addObservers()
}
override func viewWillDisappear(_ animated: Bool) {
super.viewWillDisappear(animated)
keyboard.removeObservers()
}
keyboard.delegate = self
...
func keyboard(_ keyboard: KUIKeyboard, changed visibleHeight: CGFloat) {
// Customize
}
keyboard.onChangedKeyboardHeight = { (visibleHeight) in
// Customize
}
- RxKeyboard (https://github.com/RxSwiftCommunity/RxKeyboard)
Taeun Kim (kofktu), kofktu@gmail.com
KUIKeyboard is available under the MIT
license. See the LICENSE
file for more info.