How can I get a textDidChange method for a UITextField? I need to call a method every time a change is made to a text field. Is this possible? Thanks!
I found some problem when you use replaceCharactersInRange
in delegate shouldChangeCharactersInRange.
Ex: In Vietnamese keyboard string aa
-> â
, So if you use method replaceCharactersInRange
then Incorrect results.
You can try in this case by event UIControlEventEditingChanged
:
[textField addTarget:self action:@selector(textFieldDidChange:) forControlEvents:UIControlEventEditingChanged]