I have a button that inserts a character into a UITextView. I want this button to behave as the spacebar button does; I want the pending autocorrect suggestion to be accepted upon pressing it.
Can this be done? If so, how? Thanks!
I just found out that instead of doing this (kills my animations) you can use:
[messageField reloadInputViews];
Works like a charm.
There isn't any API to interact directly with autocorrect. However, there is a bit of a hack I ran across not long ago: if you resign the responder, the currently displayed autocorrect will be accepted. So, you may be able to get away with resigning the first responder and then assigning it again:
[myTextView resignFirstResponder];
[myTextView becomeFirstResponder];
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