textField:shouldChangeCharactersInRange:replacementString:
Asks the delegate if the specified text should be changed.
- (BOOL)textField:(UITextField *)textField shouldChangeCharactersInRange:(NSRange)range replacementString:(NSString *)string
Parameters
textField
The text field containing the text.
range
The range of characters to be replaced
string
The replacement string.
Return Value
YES if the specified text range should be replaced; otherwise, NO to keep the old text.
Discussion
The text field calls this method whenever the user types a new character in the text field or deletes an existing character.
Availability
Available in iOS 2.0 and later.
Declared In
UITextField.h