Khawar Khawar - 1 year ago 80
Swift Question

iOS 8 - How to hide suggestion list above keyboard?

Is there any way to hide suggestions list above keyboard? I couldn't find any solution in documentation.

Answer Source

Yes there is. You have to disable autocorrection on the text field/text/any other class that conforms to the UITextInputTraits protocol, which can be done through the autocorrectionType property.

textField.autocorrectionType = UITextAutocorrectionType.No

Additionally, if you're interested, the following are the only UIKeyboardTypes that don't have suggestions by default.

  • DecimalPad
  • NumberPad
  • PhonePad
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download