Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save jrturton/5856836 to your computer and use it in GitHub Desktop.
Save jrturton/5856836 to your computer and use it in GitHub Desktop.
Getting the keyboard's frame in local coordinates
CGRect keyboardFrame = [notification.userInfo[UIKeyboardFrameEndUserInfoKey] CGRectValue];
keyboardFrame = [self.view.window convertRect:keyboardFrame fromWindow:nil];
keyboardFrame = [self.view convertRect:keyboardFrame fromView:nil];
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment