- (BOOL)textField:(UITextField *)textField shouldChangeCharactersInRange:(NSRange)range replacementString:(NSString *)string {
if (_viewTag == VIEW_TAG) {
if (range.length == 1 && string.length == 0) {
return YES;
}
else if (_modifyTextField.text.length >= 20) {
_modifyTextField.text = [textField.text substringToIndex:20];
return NO;
}
}
return YES;
}