Search code examples
uitextfieldios9

How to hide the shortcut bar in iOS9


I have a textfield with a hidden keyboard (since I'm using it with bluetooth). However, in iOS9 the shortcut bar keeps appearing.

Is there a way to hide it too?

Thank you so much!


Solution

  • You can pass your textfield name in place of userNameTextField for which you want to remove shortcut bar.

    UITextInputAssistantItem* item = [userNameTextField inputAssistantItem];
    item.leadingBarButtonGroups = @[];
    item.trailingBarButtonGroups = @[];