Consider implementing the UITextFieldDelegate
's method textField:shouldChangeCharactersInRange:replacementString:
instead of registering for the editingChanged
control event.
- (BOOL)textField:(UITextField *)textField shouldChangeCharactersInRange:(NSRange)range replacementString:(NSString *)string {
... //update model
//call another method that essentially does this
field1.text = @"someformatted text"; //causes infinite loop any field == sender
field2.text = @"some more text";
return YES; // or NO, depending on you actions
}
According to the documentation it should serve your purposes
The text field calls this method whenever the user types a new character in the text field or deletes an existing character.