Skip to content
Find file
Fetching contributors…
Cannot retrieve contributors at this time
25 lines (17 sloc) 793 Bytes

BRYParseKeyboardNotification

A function that parses the useful parts out of a keyboard will appear/disappear notification.

Installation

Via CocoaPods, of course:

pod "BRYParseKeyboardNotification"

Usage

- (void)keyboardWillShow:(NSNotification *)notification {
    BRYParseKeyboardNotification(notification, ^(NSTimeInterval keyboardAnimationDuration, CGFloat keyboardHeight, UIViewAnimationOptions keyboardAnimationOptions) {
        [UIView animateWithDuration:keyboardAnimationDuration delay:0 options:keyboardAnimationOptions animations:^{
            someView.frameHeight -= keyboardHeight;
        }];
    });
}

License

Available for use under the MIT license: http://bryan.mit-license.org

Something went wrong with that request. Please try again.