摘要:
如果要限制UITextField输入长度最长不超过kMaxLength,那么需要实现做以下操作:1、实现UITextFieldDelegate协议;2、实现textField:shouldChangeCharactersInRange:replacementString:方法;- (BOOL)textField:(UITextField *)textField shouldChangeCharactersInRange:(NSRange)range replacementString:(NSString *)string{ NSInteger strLength = textField.tex 阅读全文