I want to know about the character printing in UITextField
when i start to entering text in textfield it entering perfect in box, but in NSLog it shows wrong at first it display nothing . at second character it display first character in console. i want to know why should this happening else i seen both characters in textfield.
this is my code of textfield delegates method
- (BOOL)textField:(UITextField *)textField shouldChangeCharactersInRange:(NSRange)range replacementString:(NSString *)string
{
NSLog(@"print %@", textField.text);
return YES;
}
// this is my console output
2012-01-04 12:40:41.736 Demo[1982:f803] print
2012-01-04 12:40:43.497 Demo[1982:f803] print h