修复了密码登录的无法输入很长
This commit is contained in:
@@ -71,7 +71,7 @@
|
||||
_stackView = [[UIStackView alloc] init];
|
||||
_stackView.axis = UILayoutConstraintAxisHorizontal;
|
||||
_stackView.distribution = UIStackViewDistributionFill;
|
||||
_stackView.alignment = UIStackViewAlignmentCenter;
|
||||
_stackView.alignment = UIStackViewAlignmentFill;
|
||||
_stackView.spacing = 0;
|
||||
}
|
||||
return _stackView;
|
||||
@@ -103,11 +103,11 @@
|
||||
}
|
||||
|
||||
- (BOOL)textField:(UITextField *)textField shouldChangeCharactersInRange:(NSRange)range replacementString:(NSString *)string {
|
||||
return textField.text.length <= 11;
|
||||
return textField.text.length <= self.maxLength;
|
||||
}
|
||||
|
||||
- (void)textFieldDidChangeSelection:(UITextField *)textField {
|
||||
textField.text = [textField.text substringToIndex:MIN(textField.text.length, 11)];
|
||||
textField.text = [textField.text substringToIndex:MIN(textField.text.length, self.maxLength)];
|
||||
}
|
||||
|
||||
@end
|
||||
|
Reference in New Issue
Block a user