//find below, the code example & associated result
- (BOOL) textField: (UITextField *)theTextField shouldChangeCharactersInRange: (NSRange)range replacementString: (NSString *)string {
if (theTextField == textField1){
[textField2 setText:[textField1 text]];
}
}
This code produces...
textField2 is "12", when textField1 is "123"
textField2 is "123", when textField1 is "1234"
... when what I want is:
textField2 is "123", when textField1 is "123"
textField2 is "1234", when textField1 is "1234"