Latest 1.2.1
Homepage https://github.com/podkovyrin/UIViewController-KeyboardAdditions
License MIT
Platforms ios 8.3, requires ARC
Frameworks UIKit
Authors

Version
License
Platform

Swift Version

For Swift compatible version check out Keyboardy

Description

UIViewController+KeyboardAdditions category simplifies keyboard handling logic by extending UIViewController class with several simple methods.
Supports both AutoLayout and frame-based animations.

UIViewController-KeyboardAdditions Demo GIF

Usage

  1. Import category #import <UIViewController-KeyboardAdditions/UIViewController+KeyboardAdditions.h>

  2. Register to keyboard notifications in -viewWillAppear::

    [self ka_startObservingKeyboardNotifications];
  3. Unregister from notifications in -viewWillDisappear::

    [self ka_stopObservingKeyboardNotifications];
  4. Perform any layout with same animation options as keybord:
- (void)ka_keyboardShowOrHideAnimationWithHeight:(CGFloat)height
                               animationDuration:(NSTimeInterval)animationDuration
                                  animationCurve:(UIViewAnimationCurve)animationCurve {

    self.containerViewBottomConstraint.constant = height;
    [self.view layoutIfNeeded];
}

Example

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

Installation

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

pod "UIViewController-KeyboardAdditions"

Author

Andrew Podkovyrin, [email protected]

License

UIViewController-KeyboardAdditions is available under the MIT license. See the LICENSE file for more info.

Latest podspec

{
    "name": "UIViewController-KeyboardAdditions",
    "version": "1.2.1",
    "summary": "Tiny UIViewController category that provides handy way for keyboard handling logic.",
    "description": "`UIViewController+KeyboardAdditions` category simplifies keyboard handling logic by extending UIViewController class with several simple methods.",
    "homepage": "https://github.com/podkovyrin/UIViewController-KeyboardAdditions",
    "license": "MIT",
    "authors": {
        "Andrew Podkovyrin": "[email protected]"
    },
    "source": {
        "git": "https://github.com/podkovyrin/UIViewController-KeyboardAdditions.git",
        "tag": "1.2.1"
    },
    "social_media_url": "https://twitter.com/podkovyr",
    "platforms": {
        "ios": "8.3"
    },
    "requires_arc": true,
    "source_files": "Pod/Classes/**/*",
    "public_header_files": "Pod/Classes/**/*.h",
    "frameworks": "UIKit"
}

Pin It on Pinterest

Share This