This commit is contained in:
2025-12-18 13:46:14 +08:00
parent 38a3d2879e
commit ae05127292
2 changed files with 49 additions and 0 deletions

View File

@@ -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;