0

I am disabling third party keyboard in my app, by following the standard approach:

-(BOOL)application:(UIApplication *)application shouldAllowExtensionPointIdentifier:(NSString *)extensionPointIdentifier

{

if (extensionPointIdentifier == UIApplicationKeyboardExtensionPointIdentifier)
{
    return NO;
}

return YES;

}

This method is called even if no third party keyboard is installed in the device, meaning it is called when I am using the standard built-in keyboard.

In may app, I have many UITextFields interacting with the native keyboard,but I am not able to dismiss that keyboard. A tap on the right-bottom button is offering the option to dock or to split(which normally should happen only on long press)

If I remove the code above, everything works fine. I thought that maybe it's a system wide bug, but text fields work fine in other apps like Safari.

Please advise

Mayosse
  • 696
  • 1
  • 7
  • 16
  • 1
    are you implementing textfield/textview delegates for dismissing keyboard or not? – Gagan_iOS Jan 27 '16 at 12:54
  • I am not implementing any delegate, just using default UITextField behavior. Note that even with delegate, - (BOOL)textFieldShouldEndEditing:(UITextField *)textField is never called when tapping on the keyboard dismiss button. Note also that resignFirstResponder works as expected. – Mayosse Jan 27 '16 at 13:02
  • Use `yourTextField.resignFirstResponder` to hide native keyboard. – EBDOKUM Jan 27 '16 at 13:13
  • I've found a solution. Following http://stackoverflow.com/a/5503637/331370, just override in my view controllers the disablesAutomaticKeyboardDismissal to return NO and it works. What's still weird is that the view controller is not modal. – Mayosse Jan 27 '16 at 13:40
  • The solution works only on simulator (iOS 9.1) not on devices. So the question remains open. Thanks for any advise. – Mayosse Jan 27 '16 at 14:25
  • The issue is not related to what I thought but rather on apparently a swizzling of NSTimer in app that forces the callback of the dismiss button long press to be called immediately on tap. – Mayosse Feb 02 '16 at 16:02

0 Answers0