2

Using UISearchDisplayController, I am showing a UIView in bottom so causes hiding the filtered data while scrolling the table. I used contentInset property to show data in bottom.

My problem is that NSStringFromUIEdgeInsets(self.searchDisplayController.searchResultsTableView.contentInset) is showing the bottom value as 216 even if I reset the UIEdgeInsetsZero.

When I do multiple search the more data is not visible after scrolling:

enter image description here

4

1 回答 1

7

如果你想设置 self.searchDisplayController.searchResultsTableView.contentInset,你应该在委托中做:

- (void)searchDisplayController:(UISearchDisplayController *)controller didShowSearchResultsTableView:(UITableView *)tableView {
    controller.searchResultsTableView.contentInset = UIEdgeInsetsMake(0.0f, 0.f, 30.f, 0.f);
}
于 2014-02-15T08:35:00.427 回答