iOS - Handle UISearchBar keyboard show/hide issue
I have experienced that when you focus on UISearchBar, the keyboard occupied half of the screen. The question is, “Under what condition should the keyboard hide?”.
One of the solution is to follow the contact book, which is add an overlay button on top of it.
1 | - (void)searchBarTextDidBeginEditing:(UISearchBar *)searchBar |
So now the keyboard will hide when you touched on the dark area.
Simple :)