Reputation: 437
I have a sign up screen which has 4 textfields, First name, last name, email & password.
Apple keyboard prediction for password works fine but for others
First Name textfield shows "Full Name" in prediction Last Name shows "Full Name" email textfield shows "Password" key on right.
How can i update this to show First Name textfield's prediction will show "FirstName" instead of "FirstName lastName" same with last Name textfield and for email textfield it should show "emailaddress@,," in prediction
this is not a custom keyboard UILexicon doesn't work
Upvotes: 1
Views: 1843
Reputation: 114981
You should set the textContentType
property of your fields to the appropriate value in order to let iOS know the suggestions it should provide:
e.g.
myGivenNameField.textContentType = UITextContentType.givenName
mySurnameField.textContentType = UITextContentType.familyName
Upvotes: 3