Rather than showing autocomplete words I would like to show the autocomplete of the user emails for example [email protected]
This happens if I go to https://www.superbru.com/beta/register.php in Safari I get my email address suggested to me in the autocomplete box.
This is how I set up my textfield but still no email being suggested.
private let emailTextField: UITextField = {
let textField = UITextField()
textField.height(equalTo: 45)
textField.keyboardType = .emailAddress
textField.returnKeyType = .done
textField.placeholder = "E-mail"
textField.addTarget(self, action: #selector(textFieldTextDidChange), for: .editingChanged)
return textField
}()
and setting autocorrectionType = .default or yes does not work either.

Set textContentType to emailAddress
let textField = UITextField()
textField.textContentType = .emailAddress
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With