Automatic Keyboard handling for iOS written in Swift
Automatic Keyboard handling with ease. It is fully automatic keyboard handling. Like in android no need to resize views when keyboard appears. It updates constraints which are bounded with bottomLayoutGuide
or safeAreaLayoutGuide
. Like bottomLayoutGuide
or safeAreaLayoutGuide
moves UP and DOWN with keyboard. Just need to register
and unResgister
thats it.
registerAutoKeyboard
in viewDidLoad
.bottomLayoutGuide
or safeAreaLayoutGuide
and they will update when keyboard appears.override func viewDidLoad() {
registerAutoKeyboard()
}
registerAutoKeyboard(enable: [lblBottom], disable: [btnShowScrollBottom]) { (result) in
print("keyboard status \(result.status)")
switch result.status {
case .willShow:
// ...
case .didShow:
// ...
case .willHide:
// ...
case .didHide:
// ...
}
}
extension ViewController: AutoKeyboardOptions {
var customTabbarExtraHeight: CGFloat { 50 }
}
To integrate AutoKeyboard into your Xcode project using CocoaPods, specify it in your Podfile
and run pod install
.
platform :ios, '8.0'
use_frameworks!
pod 'AutoKeyboard' // for swift 5.0
pod 'AutoKeyboard', '~> 1.4.3' // for swift 4.2
And import AutoKeyboard
Coming soon
Contributions are always welcome!
This project is licensed under the MIT License - see the LICENSE.md file for details