UISearchDisplayController - 如何禁用自动搜索

时间:2011-08-11 21:00:25

标签: iphone ios sdk

我使用UISearchDisplayController并搜索禁用自动搜索的方法。

有没有办法呢?

3 个答案:

答案 0 :(得分:4)

实施UISearchDisplayControllerDelegate方法-searchDisplayController:shouldReloadTableForSearchScope:并返回NO。如果要重新加载搜索表,请致电[theSearchDisplayController.searchResultsTableView reloadData]

答案 1 :(得分:1)

禁用 UISearchDisplayController

中的自动搜索

1)将 UISearchDisplayDelegate 设置为自我

2)在 didShowSearchResultsTableView 委托方法

将frameResultsTableView设置为

CGRect tempFrame= searchDisplayController.searchResultsTableView.frame;
tempFrame.size.height=0.0f;
searchDisplayController.searchResultsTableView.frame=tempFrame;

CGRect tempFrame= searchDisplayController.searchResultsTableView.frame; tempFrame.size.height=0.0f; searchDisplayController.searchResultsTableView.frame=tempFrame;

答案 2 :(得分:-1)

这是你的answer,它对这是如何工作有一个很好的解释。我想在一条线上给你答案,但我想让你知道更多细节,这样你就可以更好地了解它是如何工作的?

相关问题