Skip to content

Instantly share code, notes, and snippets.

@bimawa
Last active March 21, 2016 14:15
Show Gist options
  • Save bimawa/5963666 to your computer and use it in GitHub Desktop.
Save bimawa/5963666 to your computer and use it in GitHub Desktop.
UIWindow have global notifications for keyboard in iOS devices. How it works i show in this.Read UIWindow class description for study all events. (ReactiveCocoa update)
[[[[[NSNotificationCenter defaultCenter] rac_addObserverForName:UIKeyboardWillChangeFrameNotification
object:nil] takeUntil:[self rac_willDeallocSignal]] deliverOnMainThread] subscribeNext:^(NSNotification *notification) {
CGRect keyboardFrame = [[notification userInfo][UIKeyboardFrameEndUserInfoKey] CGRectValue];
CGRect frameOfScreen = [UIScreen mainScreen].bounds;
}];
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment