My last way to solve this problem was to simply add an observer for UIKeyboardWillShowNotification...
[[NSNotificationCenter defaultCenter] addObserver:self
selector:@selector(keyboardWillShow:)
name:UIKeyboardWillShowNotification object:nil];
.. and hide inputAccessoryViewpreviously stored in the instance variable.
- (void)keyboardWillShow:(NSNotification*)notification
{
NSLog(@"keyboardWillShow");
CGRect kbEndFrame = [[[notification userInfo] objectForKey:UIKeyboardFrameEndUserInfoKey] CGRectValue];
CGFloat height = [[UIScreen mainScreen] bounds].size.height - kbEndFrame.origin.y;
if (self.activeTextField && height <= self.activeTextField.inputAccessoryView.frame.size.height) {
NSLog(@"hardware keyboard");
self.activeTextField.inputAccessoryView.hidden = YES;
} else {
NSLog(@"software keyboard");
self.activeTextField.inputAccessoryView.hidden = NO;
}
}
, , inputAccessoryView UITextField getter. . , , , -, getter , , , , overridden . , , .