I am writing validation for my textfield, I found something interesting that whether I can check how many digits I am typing into the textfield at real time. My text field i
-(BOOL)textField:(UITextField *)textField shouldChangeCharactersInRange:(NSRange)range replacementString:(NSString *)string
{
NSString * searchStr = [textField.text stringByReplacingCharactersInRange:range withString:string];
// [textField2 setText:[textField1.text stringByReplacingCharactersInRange:range withString:string]];
NSLog(@"%@",searchStr);
return YES;
}