Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

93
Visualizações
Setting UITextContentType.emailAddress on a UITextView is not working

I have a UITextView which is set with UIKeyboardType of .emailAddress I want to auto-suggest the user's email address with the UITextContentType property

I do so like so:

if #available(iOS 10.0, *) {
                        myTextView.textContentType = UITextContentType.emailAddress
                    }

However this is not working and I see no email in the suggestion box of the textview.

I have also tried the same thing with a UITextField but no dice. Is there something I am missing? I have done everything according to the docs. enter image description here

over 4 years ago · Santiago Trujillo
2 Respostas
Responde à pergunta

0

Make sure you have set your email address in your own Contact card in the Contacts app.

:)

over 4 years ago · Santiago Trujillo Relatório

0

In case of email addresses you need to set your keyboardType to emailAddress also. I thought prediction/autocomplete is broken on iOS 13 but you just need to specify the right type of keyboard. This is how I got names and addresses to work:

textField.autocorrectionType = .yes
textField.textContentType = .givenName
textField.keyboardType = .namePhonePad
over 4 years ago · Santiago Trujillo Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda