A UIView category to simplify animations that sync up with the UIKeyboard show/hide animation
Objective-C Ruby
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
Classes
MWKeyboardAnimation.xcodeproj
LICENSE
MWKeyboardAnimation.podspec
README.md

README.md

MWKeyboardAnimation

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

Via CocoaPods:

pod "MWKeyboardAnimation"

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.