开发者

dismissing search display controller keyboard

开发者 https://www.devze.com 2022-12-31 01:57 出处:网络
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

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

0

精彩评论

暂无评论...
验证码 换一张
取 消