<分区>
如何隐藏 UITableView 的 UISearchDisplayController ?我只希望用户向上滚动以查看 UISearchBar。
更新:我正在考虑将 UITableView 向下滚动 40 像素,以便 UISearchBar 可以对用户“隐藏”。
<分区>
如何隐藏 UITableView 的 UISearchDisplayController ?我只希望用户向上滚动以查看 UISearchBar。
更新:我正在考虑将 UITableView 向下滚动 40 像素,以便 UISearchBar 可以对用户“隐藏”。
最佳答案
我的解决方案是在 viewWillAppear:animted
中:
[my_table_view setContentOffset:CGPointMake(0, searchController.searchBar.bounds.size.height)];
更新 我们应该获取 UISearchBar
的高度,而不是使用固定值。
关于ios - 最初隐藏 UITableView 的 UISearchDisplayController(iOS SDK)?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7708157/