Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/objective-c/23.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/cocoa/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Objective c 添加mainTableView以表示self.tableView而不是searchResultsTableView_Objective C_Ios_Xcode_Uitableview - Fatal编程技术网

Objective c 添加mainTableView以表示self.tableView而不是searchResultsTableView

Objective c 添加mainTableView以表示self.tableView而不是searchResultsTableView,objective-c,ios,xcode,uitableview,Objective C,Ios,Xcode,Uitableview,我隐藏searchViewController.searchResultsTableView以在主UITableView中显示结果。但是self.tableView=searchDisplayController.searchResultsTableView,因此在键入搜索文本时或点击“search”后,主表视图是不可滚动的。如何使self.tableView表示主tableView - (BOOL)searchDisplayController:(UISearchDisplayControll

我隐藏searchViewController.searchResultsTableView以在主UITableView中显示结果。但是self.tableView=searchDisplayController.searchResultsTableView,因此在键入搜索文本时或点击“search”后,主表视图是不可滚动的。如何使self.tableView表示主tableView

- (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;
}

您是否能够将搜索结果放入mainTableView中,以便查看它,因此唯一的问题是您无法滚动它?