As many of you know iOS 5 introduced a slick split keyboard for thumb-typing. Unfortunately, I have some UI that is dependent on the normal full-screen keyboard layout. One
This is the solution which works with iPad split keyboards (originally from the blog linked in Zeeshan's comment)
[[NSNotificationCenter defaultCenter]
addObserverForName:UIKeyboardDidChangeFrameNotification
object:nil
queue:[NSOperationQueue mainQueue]
usingBlock:^(NSNotification * notification)
{
CGRect keyboardEndFrame =
[[notification.userInfo objectForKey:UIKeyboardFrameEndUserInfoKey] CGRectValue];
CGRect screenRect = [[UIScreen mainScreen] bounds];
if (CGRectIntersectsRect(keyboardEndFrame, screenRect))
{
// Keyboard is visible
}
else
{
// Keyboard is hidden
}
}];