All you need to is add the setup to AppDelegate
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool {
KeyboardInfo.shared.setup()
return true
}
Then, can access it's singleton and get the provided informations
KeyboardInfo.shared.height
KeyboardInfo.shared.animationCurve
KeyboardInfo.shared.animationDuration
Informations are updated only when the keyboard appears
To run the example project, clone the repo, and run pod install
from the Example directory first.
KeyboardInfo is available through CocoaPods. To install it, simply add the following line to your Podfile:
pod 'KeyboardInfo'
Luis Filipe Campani, luisfilipecampani@gmail.com
KeyboardInfo is available under the MIT license. See the LICENSE file for more info.