There is the UITextFieldDelegate protocol, which offers only one reasonable method to get notified about changes in the UITextField:
- (BOOL)textField:(UITextField *)textField shouldChangeCharactersInRange:(NSRange)range replacementString:(NSString *)string
This method doesn’t provide the actual string like it is visible in the textField. It gets called before the text property in the UITextField updates to the new text. The string is only what has changed.
I guess the only way to find out, is to assemble the text manually from this information. How would I go about this? Must I invent the solution or is there already one?
You just might not need a delegate method.
If you’re using IB, you can create an IBAction like this
-(IBAction)myTextFieldDidChange:(id)sender{
NSString*aString = myTextField.text;
}
just connect this function to your corresponding UITextField(which in this case, myTextField)
for events ValueChanged (UIControlEventValueChanged)