Latest 1.0.3
Homepage https://github.com/APUtils/KeyboardAvoidingView
License MIT
Platforms ios 8.0
Frameworks Foundation, UIKit
Authors

CI Status
Version
License
Platform

Simple solution for keyboard avoiding. View that manages it’s bottom constraint constant or frame height to avoid keyboard.

Example

To run the example project, clone the repo, and run pod install from the Example directory first.

GIF animation

Installation

Carthage

If you are setting KeyboardAvoidingView class in storyboard assure module field is also KeyboardAvoidingView

Please check official guide

Cartfile:

github "APUtils/KeyboardAvoidingView"

CocoaPods

KeyboardAvoidingView is available through CocoaPods. To install
it, simply add the following line to your Podfile:

pod "KeyboardAvoidingView"

Usage

Just set KeyboardAvoidingView class to any view in storyboard (usually it’s base container) that you want to adjust it’s bottom constraint or frame height to avoid keyboard, assure module field is also KeyboardAvoidingView.

It’s also possible to create it from code:

let keyboardAvoidingView = KeyboardAvoidingView(frame: containerView.bounds)
keyboardAvoidingView.translatesAutoresizingMaskIntoConstraints = true
keyboardAvoidingView.autoresizingMask = [.flexibleWidth, .flexibleHeight]

containerView.addSubview(keyboardAvoidingView)

In most cases it should be only one KeyboardAvoidingView for screen. Be sure to not create nested KeyboardAvoidingView‘s.

See example project for more details.

Contributions

Any contribution is more than welcome! You can contribute through pull requests and issues on GitHub.

Author

Anton Plebanovich, [email protected]

License

KeyboardAvoidingView is available under the MIT license. See the LICENSE file for more info.

Latest podspec

{
    "name": "KeyboardAvoidingView",
    "version": "1.0.3",
    "summary": "View that adjusts it's bottom constraint to avoid keyboard",
    "description": "Common usage: set `KeyboardAvoidingView` class to any view (usually it's base container) that you want to adjust it's bottom constraint or frame height to avoid keyboard.",
    "homepage": "https://github.com/APUtils/KeyboardAvoidingView",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": {
        "Anton Plebanovich": "[email protected]"
    },
    "source": {
        "git": "https://github.com/APUtils/KeyboardAvoidingView.git",
        "tag": "1.0.3"
    },
    "platforms": {
        "ios": "8.0"
    },
    "source_files": "KeyboardAvoidingView/Classes/**/*",
    "frameworks": [
        "Foundation",
        "UIKit"
    ],
    "pushed_with_swift_version": "3.0"
}

Pin It on Pinterest

Share This