Swift – Hide Autocorrect Keyboard bar
Hiding the auto correct keyboard bar is simple in Swift, you can modify the text field to not show it on certain inputs. This is useful for fields such as first name and last name, where by autocorrect will only cause user headache when it changes their name.
To modify a textfield to not show the bar, add in the following line of code:
yourTextFieldName.autocorrectionType = .no
Now when you type in the text field instead of seeing this:
You will now see the autocorrect bar is gone as follows:
Happy coding!