Skip to content

Instantly share code, notes, and snippets.

@fabiomassimo
fabiomassimo / keyboardFrame.m
Last active October 2, 2015 14:46
[iOS 9] - Retrieve visible keyboard frame on `keyboardWillChange` event
- (void)keyboardWillChange:(NSNotification *)notification
{
CGRect keyboardFrame = [[notification.userInfo valueForKey:UIKeyboardFrameEndUserInfoKey] CGRectValue];
CGFloat finalHeight = CGRectGetHeight([self.view frame]) - CGRectGetMinY(keyboardFrame) ;
keyboardFrame.size.height = finalHeight;
NSLog(@"The visible keyboard frame is %@", NSStringFromCGRect(keyboardFrame));
}
@fabiomassimo
fabiomassimo / keybase.md
Last active August 29, 2015 14:19
keybase.md

Keybase proof

I hereby claim:

  • I am fabiomassimo on github.
  • I am fabiomilano (https://keybase.io/fabiomilano) on keybase.
  • I have a public key whose fingerprint is 579A A5BC E623 1629 8114 FFF5 00A2 F796 CCA5 C1D8

To claim this, I am signing this object: