我隐藏searchViewController.searchResultsTableView以在主UITableView中显示结果。但是self.tableView = searchDisplayController.searchResultsTableView因此在输入搜索文本或“搜索”命中后,mainTableView是不可滚动的。如何使self.tableView代表mainTableView?
- (BOOL)searchDisplayController:(UISearchDisplayController *)controller shouldReloadTableForSearchString:(NSString *)searchString
{
[self filterContentForSearchText:searchString scope:
[[self.searchDisplayController.searchBar scopeButtonTitles] objectAtIndex:[self.searchDisplayController.searchBar selectedScopeButtonIndex]]];
self.searchDisplayController.searchResultsTableView.hidden=YES;
return YES;
}