Reputation: 1570
I am working a navigation based application. In my application user can search using the UISearchBar. Now I want the keyboard to be dismissed after the user hits search (or done not sure which one it is). I tried doing the way it is done for UITextField but didn't work. so any help would be appreciated.
thanks,
Upvotes: 1
Views: 619
Reputation: 7100
Hope this helps for anyone that else was looking for this.
- (void)searchBarSearchButtonClicked:(UISearchBar *)searchBar {
[sbSearch resignFirstResponder];
}
Using UISearchBarDelegate
.
Upvotes: 4