Skip to content

Instantly share code, notes, and snippets.

@mingsai
Created July 10, 2015 09:51
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mingsai/aa2b3e72d8075a2120b5 to your computer and use it in GitHub Desktop.
Save mingsai/aa2b3e72d8075a2120b5 to your computer and use it in GitHub Desktop.
[[NSNotificationCenter defaultCenter] addObserver:self
selector:@selector(handleKeyboardDidShowNotification:)
name:UIKeyboardDidShowNotification
object:nil];
- (void)handleKeyboardDidShowNotification:(NSNotification *)notification
{
NSDictionary* info = [notification userInfo];
CGSize keyboardSize = [[info objectForKey:UIKeyboardFrameEndUserInfoKey] CGRectValue].size;
// Move your textview into view here
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment