我要推UIViewController
进入UINavigationController
当我点击 UISearchBar
,这样键盘就不会出现,只需打开新 View ,当我回来时,在 UISearchBar
中显示一些字符串.
谢谢
最佳答案
yoursearchBar.delegate = yourDelegateObject;
然后在你的
yourDelegateObject
里面类(class),有这个UISearchBar
委托(delegate)方法 - (BOOL)searchBarShouldBeginEditing:(UISearchBar *)searchBar{
// Here write the code to push to new view controller
return NO;
}
关于ios - 当我通过 uisearchbar "click"时推送 View Controller ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/23755990/