1
This commit is contained in:
@@ -530,6 +530,22 @@
|
||||
_passwordTextField = [[UITextField alloc] init];
|
||||
_passwordTextField.delegate = self;
|
||||
_passwordTextField.secureTextEntry = YES;
|
||||
_passwordTextField.keyboardType = UIKeyboardTypeASCIICapable;
|
||||
_passwordTextField.autocapitalizationType = UITextAutocapitalizationTypeNone;
|
||||
_passwordTextField.autocorrectionType = UITextAutocorrectionTypeNo;
|
||||
_passwordTextField.spellCheckingType = UITextSpellCheckingTypeNo;
|
||||
if (@available(iOS 11.0, *)) {
|
||||
_passwordTextField.smartQuotesType = UITextSmartQuotesTypeNo;
|
||||
_passwordTextField.smartDashesType = UITextSmartDashesTypeNo;
|
||||
_passwordTextField.smartInsertDeleteType = UITextSmartInsertDeleteTypeNo;
|
||||
}
|
||||
// 禁用 iOS 的密码自动填充/强密码建议(否则系统可能会自动填充并用黄色高亮显示)
|
||||
if (@available(iOS 12.0, *)) {
|
||||
_passwordTextField.textContentType = UITextContentTypeOneTimeCode;
|
||||
_passwordTextField.passwordRules = nil;
|
||||
} else {
|
||||
_passwordTextField.textContentType = nil;
|
||||
}
|
||||
_passwordTextField.textColor = [UIColor colorWithHex:KBBlackValue];
|
||||
_passwordTextField.font = [KBFont regular:14];
|
||||
_passwordTextField.returnKeyType = UIReturnKeyDone;
|
||||
@@ -573,6 +589,22 @@
|
||||
_repeatPasswordTextField = [[UITextField alloc] init];
|
||||
_repeatPasswordTextField.delegate = self;
|
||||
_repeatPasswordTextField.secureTextEntry = YES;
|
||||
_repeatPasswordTextField.keyboardType = UIKeyboardTypeASCIICapable;
|
||||
_repeatPasswordTextField.autocapitalizationType = UITextAutocapitalizationTypeNone;
|
||||
_repeatPasswordTextField.autocorrectionType = UITextAutocorrectionTypeNo;
|
||||
_repeatPasswordTextField.spellCheckingType = UITextSpellCheckingTypeNo;
|
||||
if (@available(iOS 11.0, *)) {
|
||||
_repeatPasswordTextField.smartQuotesType = UITextSmartQuotesTypeNo;
|
||||
_repeatPasswordTextField.smartDashesType = UITextSmartDashesTypeNo;
|
||||
_repeatPasswordTextField.smartInsertDeleteType = UITextSmartInsertDeleteTypeNo;
|
||||
}
|
||||
// 禁用 iOS 的密码自动填充/强密码建议(否则系统可能会自动填充并用黄色高亮显示)
|
||||
if (@available(iOS 12.0, *)) {
|
||||
_repeatPasswordTextField.textContentType = UITextContentTypeOneTimeCode;
|
||||
_repeatPasswordTextField.passwordRules = nil;
|
||||
} else {
|
||||
_repeatPasswordTextField.textContentType = nil;
|
||||
}
|
||||
_repeatPasswordTextField.textColor = [UIColor colorWithHex:KBBlackValue];
|
||||
_repeatPasswordTextField.font = [KBFont regular:14];
|
||||
_repeatPasswordTextField.returnKeyType = UIReturnKeyDone;
|
||||
|
||||
Reference in New Issue
Block a user