In my iOS keyboard app, I currently have a text suggestions bar much like the default iOS 8 Keyboard's suggestion bar. I would like to clear all text on the suggestion bar whenever the user does something that clears the text field (for example, when someone hits "Send" on iMessage or Whatsapp,).
As hitting "Send" is not a keystroke, I was wondering if there is way to detect from the keyboard when a textfield is cleared.
I have tried detecting empty text ""
or new line "\n"
, but so far this has not worked.
Edit: I do know that this is possible through 3rd party iOS Keyboard, as seen the case here (this is from Themeboard)
Before hitting send, note the text in the suggestion bar.
Immediately after hitting "send". The suggestion bar is cleared.