I have a navigation controller with a controller A having a UITextField.
In another controller view B, I call a public method on the controller A to clear the text on the UITextField.
In controller A, there's a delegate that is implemented:
-(BOOL)textField: (UITextField *)textField
shouldChangeCharactersInRange: (NSRange)range
replacementString: (NSString *)string
When I'm attempting to clear the UITextField (not in view), I'm unable to trigger the shouldChangeCharactersInRange delegate. Only when UITextField is in view that it works as advertised.
I'm wondering, since it isn't in view when I'm clearing the UITextField that there are implications that I am unaware of? Is this by design?
Basically setting the property of the textfield will not trigger the textfield. Only keyboard entries will.