I faced with strange overlay on UITextField
. I'm using field of type textContentType = .password
and isSecureTextEntry = true
. I have also eye button to unhide password characters with changing isSecureTextEntry = false
.
When I do that my password characters are visible, but when I type at least one new character Strong password overlay appears and it's no way to hide it.
What is that and how to prevent to show it?
// EDIT:
I've made extension to disable AutoFill and it's works:
extension UITextField {
func disableAutoFill() {
if #available(iOS 12, *) {
textContentType = .oneTimeCode
} else {
textContentType = .init(rawValue: "")
}
}
}
Found the only solution for this problem.
textField.textContentType = .oneTimeCode
Otherwise iOS 12 uses PasswordAutofill for any secure field (textField.isSecureTextEntry = true).
This solution is from apple developer forum Yuri Petukhov' answer.
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