
B1119FA0DF1DD0A66DAA4783CA76E563.jpg
出现原因前提是设置
textField.secureTextEntry = YES;
加入以下代码解决问题
if (@available(iOS 11.0, *)) {
_tfPwd.textContentType = UITextContentTypePassword;
_tfRePwd.textContentType = UITextContentTypePassword;
}
if (@available(iOS 12.0, *)) {
_tfPwd.textContentType = UITextContentTypeNewPassword;
_tfRePwd.textContentType = UITextContentTypeNewPassword;
} else {
// Fallback on earlier versions
}
最后: *了*了,找了那么久