Prevent keyboard from covering UITextField/UITextView, includes Swift and Objective-C APIs.
- iOS 9.0+
- Swift 4.2+
- Swift
// add
self.view.kl.addKeyboardListener()
- Objective-C
// add
[self.view lc_addKeyboardListener];
To integrate KeyboardListener into your Xcode project using CocoaPods, specify it in your Podfile
:
- Swift
pod 'KeyboardListener'
- Objective-C
pod 'LCKeyboardListener'
- Swift
- Download everything in the KeyboardListener folder;
- Add (drag and drop) the source files in KeyboardListener to your project.
- Objective-C
- Download everything in the KeyboardListener folder;
- Add (drag and drop) the source files in LCKeyboardListener to your project;
- Import
UIView+LCKeyboardListener.h
.
KeyboardListener is provided under the MIT license. See LICENSE file for details.