Dmitry Dmitry - 7 months ago 97
Swift Question

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;

Answer

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

for reference

Comments