San*_*ndy 2 scroll hide uisearchdisplaycontroller ios
使用UISearchDisplayController,我显示UIView在底部,因此导致在滚动表时隐藏过滤的数据.我使用contentInset属性在底部显示数据.
我的问题是,即使我重置UIEdgeInsetsZero ,NSStringFromUIEdgeInsets(self.searchDisplayController.searchResultsTableView.contentInset)也会显示该bottom值216.
当我进行多次搜索时,滚动后看不到更多数据:

如果你想设置self.searchDisplayController.searchResultsTableView.contentInset,你应该在委托中做:
- (void)searchDisplayController:(UISearchDisplayController *)controller didShowSearchResultsTableView:(UITableView *)tableView {
controller.searchResultsTableView.contentInset = UIEdgeInsetsMake(0.0f, 0.f, 30.f, 0.f);
}
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
1485 次 |
| 最近记录: |