Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I hide quicktype keyboard toolbar on iPad?

How can I hide quicktype keyboard toolbar on iPad?

enter image description here

The following code doesn't work:

textField.autocorrectionType = UITextAutocorrectionTypeNo;
like image 565
Dmitry Avatar asked Apr 27 '16 11:04

Dmitry


2 Answers

place this code in viewDidLoad

yourTextFieldName.autocorrectionType = UITextAutocorrectionTypeNo;
UITextInputAssistantItem* shortcut = [yourTextFieldName inputAssistantItem];
shortcut.leadingBarButtonGroups = @[];
shortcut.trailingBarButtonGroups = @[];

Swift

    yourTextFieldName.autocorrectionType = .No
    let shortcut : UITextInputAssistantItem = yourTextFieldName.inputAssistantItem
    shortcut.leadingBarButtonGroups = []
    shortcut.trailingBarButtonGroups = []

swift3

 yourTextFieldName.autocorrectionType = .no
 var shortcut: UITextInputAssistantItem? =     yourTextFieldName.inputAssistantItem()
shortcut?.leadingBarButtonGroups = []
shortcut?.trailingBarButtonGroups = []

for reference

like image 110
Anbu.Karthik Avatar answered Sep 18 '22 21:09

Anbu.Karthik


How to hide the shortcut bar in iOS9

Have you tried this yet? What you do is simply disable the text proposals, not the undo / redo / paste ... thingies.

like image 39
emmics Avatar answered Sep 19 '22 21:09

emmics