Native UITextField Secure Text Entry forces English (US) keyboard

后端 未结 10 1958
离开以前
离开以前 2020-12-13 19:19

I have a very simple login page (login + password).

My users are french, so their keyboard are French (azerty).

Since iOS 12, when they click on the password

10条回答
  •  慢半拍i
    慢半拍i (楼主)
    2020-12-13 19:32

    Same solution in Swiftui now :

    TextField("placeholder",text: $YourTextBinding)
                            .textContentType(.oneTimeCode)
                            .keyboardType(.default)
    

    just need to add :

                            .textContentType(.oneTimeCode)
                            .keyboardType(.default)
    

    to a TextField or a SecureField.

    hope it helps !

提交回复
热议问题