手机验证码登录部分逻辑完善
This commit is contained in:
@@ -11,7 +11,7 @@
|
||||
///工具类
|
||||
|
||||
|
||||
@interface LoginInputView ()
|
||||
@interface LoginInputView () <UITextFieldDelegate>
|
||||
///容器
|
||||
@property (nonatomic,strong) UIStackView *stackView;
|
||||
///显示文本
|
||||
@@ -87,10 +87,19 @@
|
||||
_textField.font = [UIFont systemFontOfSize:18.f];
|
||||
_textField.borderStyle = UITextBorderStyleNone;
|
||||
_textField.keyboardType = UIKeyboardTypeNumberPad;
|
||||
_textField.tintColor = ThemeBackgroundColor;
|
||||
_textField.tintColor = ThemeDefaultColor;
|
||||
_textField.backgroundColor = [UIColor clearColor];
|
||||
_textField.delegate = self;
|
||||
}
|
||||
return _textField;
|
||||
}
|
||||
|
||||
- (BOOL)textField:(UITextField *)textField shouldChangeCharactersInRange:(NSRange)range replacementString:(NSString *)string {
|
||||
return textField.text.length <= 11;
|
||||
}
|
||||
|
||||
- (void)textFieldDidChangeSelection:(UITextField *)textField {
|
||||
textField.text = [textField.text substringToIndex:MIN(textField.text.length, 11)];
|
||||
}
|
||||
|
||||
@end
|
||||
|
Reference in New Issue
Block a user