How to hide the shortcut bar in iOS9

Jordi Puigdellívol picture Jordi Puigdellívol · Sep 16, 2015 · Viewed 10.7k times · Source

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!

Answer

Dheeraj Singh picture Dheeraj Singh · Sep 18, 2015

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 = @[];