Using `textField:shouldChangeCharactersInRange:`, how do I get the text including the current typed character?

-shouldChangeCharactersInRange gets called before text field actually changes its text, that’s why you’re getting old text value. To get the text after update use:

[textField2 setText:[textField1.text stringByReplacingCharactersInRange:range withString:string]];

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)