Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/iliuchang/keyboardlistener
Prevent keyboard from covering UITextField/UITextView with only one line of code, includes Swift and Objective-C APIs.
https://github.com/iliuchang/keyboardlistener
keyboard objective-c swift uitextfield uitextview
Last synced: 2 months ago
JSON representation
Prevent keyboard from covering UITextField/UITextView with only one line of code, includes Swift and Objective-C APIs.
- Host: GitHub
- URL: https://github.com/iliuchang/keyboardlistener
- Owner: iLiuChang
- License: mit
- Created: 2022-05-31T04:00:08.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2023-11-23T09:51:26.000Z (about 1 year ago)
- Last Synced: 2024-04-25T03:43:39.577Z (10 months ago)
- Topics: keyboard, objective-c, swift, uitextfield, uitextview
- Language: Objective-C
- Homepage:
- Size: 23.4 KB
- Stars: 12
- Watchers: 3
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# KeyboardListener
Prevent keyboard from covering UITextField/UITextView, includes Swift and Objective-C APIs.## Requirements
- **iOS 9.0+**
- **Swift 4.2+**## Usage
- **Swift**
```swift
// add
self.view.kl.addKeyboardListener()
```- **Objective-C**
```objective-c
// add
[self.view lc_addKeyboardListener];
```## Installation
### CocoaPods
To integrate KeyboardListener into your Xcode project using CocoaPods, specify it in your `Podfile`:
- **Swift**
```ruby
pod 'KeyboardListener'
```- **Objective-C**
```ruby
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.