dismissing search display controller keyboard
I am using search display controller and a search bar. When i click inside the serach b开发者_如何学编程ar the keyboard appears. When i navigate away to another page , the keyboard does not disappear and stays in the same page. Can you please help me ?
Thanks, Andy.
Try this:
[self.searchDisplayController setActive:NO animated:YES];
You're going to want to do something like [searchBar resignFirstResponder] perhaps in – (void)searchBarCancelButtonClicked: (UISearchBar *) searchBar
精彩评论