0
我想构建一个像地图应用程序一样的搜索控件;搜索将在iPhone上打开一个结果tableview(这可以正常工作),并且应该在iPad上的弹出窗口中打开一个tableview。这曾经在UISearchDisplayController
自动,但不再工作,它显示在iPad上的全屏桌面视图。UISearchController显示全屏而不是iPad上的弹出框
self.resultsController = [[EFResultTableViewController alloc] init];
[self.resultsController.tableView setDelegate:(id<UITableViewDelegate>)self];
self.searchController =
[[UISearchController alloc] initWithSearchResultsController:self.resultsController];
[self.searchController setSearchResultsUpdater:(id<UISearchResultsUpdating>)self];
self.searchController.dimsBackgroundDuringPresentation = NO;
self.searchController.hidesNavigationBarDuringPresentation = NO;
[self.searchController.searchBar setBarTintColor:[UIColor whiteColor]];
[self.searchController.searchBar setDelegate:(id<UISearchBarDelegate>)self];
self.definesPresentationContext = YES;
ResultTableViewController
只是一个自定义的tableview。我不想写IS_IPAD
有条件的代码。有什么我在这里失踪。