Skip to content

Prevent keyboard from covering UITextField/UITextView with only one line of code, includes Swift and Objective-C APIs.

License

Notifications You must be signed in to change notification settings

iLiuChang/KeyboardListener

Repository files navigation

KeyboardListener

Prevent keyboard from covering UITextField/UITextView, includes Swift and Objective-C APIs.

Requirements

  • iOS 9.0+
  • Swift 4.2+

Usage

  • Swift
// add
self.view.kl.addKeyboardListener()
  • Objective-C
// add
[self.view lc_addKeyboardListener];

Installation

CocoaPods

To integrate KeyboardListener into your Xcode project using CocoaPods, specify it in your Podfile:

  • Swift
pod 'KeyboardListener'
  • Objective-C
pod 'LCKeyboardListener'

Manual

  • Swift
  1. Download everything in the KeyboardListener folder;
  2. Add (drag and drop) the source files in KeyboardListener to your project.
  • Objective-C
  1. Download everything in the KeyboardListener folder;
  2. Add (drag and drop) the source files in LCKeyboardListener to your project;
  3. Import UIView+LCKeyboardListener.h.

License

KeyboardListener is provided under the MIT license. See LICENSE file for details.

About

Prevent keyboard from covering UITextField/UITextView with only one line of code, includes Swift and Objective-C APIs.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published