- (BOOL) textField:(UITextField *)textField shouldChangeCharactersInRange:(NSRange)range replacementString:(NSString *)string
{
NSLog(@"when the user call the method the string is %@",string);
return YES;
}
{
NSLog(@"when the user call the method the string is %@",string);
return YES;
}
string 就是每次输入的文字。
要判断输入了多少字符,可以判断range的属性。