2

I have a UITextField for users to enter their email address. I want to have keyboardType set to UIKeyboardTypeEmailAddress so they have the @ and . keys quickly available, but I don't want the keyboard to show the autocomplete bar above it with email address suggestions. In the past, and in other SO posts, I've seen that setting autocorrectionType to UITextAutocorrectionTypeNo is supposed to remove the bar, however on iOS 14 specifically it is still there. Is there any way to remove this bar on iOS 14?

Thanks in advance!

Wernzy
  • 910
  • 7
  • 19
  • This seems to be the case for Decimal Pad as well. I have tried setting the autocorrectionType to .no, but it doesn't have any effect :/ – SiPe Sep 23 '20 at 09:48

1 Answers1

0

It seems that setting textField.textContentType = .newPassword or .oneTimeCode hides the predictive text bar, but this seems like a hack and I'm not sure yet if there are other side-effects from doing this.

Wernzy
  • 910
  • 7
  • 19