0
How to collect the keyboard when the cancel button is clicked on a Uisearchbar?
I tried some methods and even the delegate’s methods, but it didn’t work.
I’ll put up an image to be more precise:
I need that when the cancel button (button with X) is clicked/selected it collects the keyboard.
You may be able to do this, but that’s not the function of this button. The button with X is to clear the typed text. It would be better if you use the cancel button itself than
UISearchBar
makes available:searchBar.showsCancelButton = YES;
– Douglas Ferreira
Thanks for the clarification. I thought I saw this function in some other app.
– Tiago Amaral