If I am typing with the keyboard, then textViewDidChange
and shouldChangeTextInRange
are always called. But when I change the textView programmatically, the delegate methods aren't called. How do I get a programmatic change in textView to trigger delegate methods?
Update
Is there some other way for simulating keyboard input programmatically?
I solve this issue in my code using the insert method instead to change the value of the text string.
textView.insertText("Your Text")
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With