CocoaPods trunk is moving to be read-only. Read more on the blog, there are 17 months to go.

MWKeyboardAnimation 1.1.0

MWKeyboardAnimation 1.1.0

TestsTested
LangLanguage Obj-CObjective C
License MIT
ReleasedLast Release Dec 2014

Maintained by Mike Lazer-Walker.



  • By
  • Mike Lazer-Walker

A category on UIView that adds a single class method to animate a block with the same timing and animation curve as UIKeyboard given a keyboard will show/hide notification.

Installation

If you're not using CocoaPods, you should be able to just drag the two files in the Classes folder into your project.

Usage

#import <UIView+MWKeyboardAnimation.h>

- (void)keyboardWillShow:(NSNotification *)notification {
    [UIView animateWithKeyboardNotification:notification animations:^(CGRect keyboardFrame) {
        someView.frameHeight -= CGRectGetHeight(keyboardFrame);
    }];
}

Contact

Mike Walker

License

MIT License.