Currently, I have UISearchBar and UISearchDisplayController implemented as:
- (void) viewDidLoad {
videoList = [[NSMutableArray alloc]init];
aSearchBar = [[UISearchBar alloc] initWithFrame:CGRectZero];
[aSearchBar sizeToFit];
aSearchBar.delegate = self;
aSearchBar.placeholder = @"Search YouTube...";
self.tableView.tableHeaderView = aSearchBar;
searchDC = [[UISearchDisplayController alloc] initWithSearchBar:aSearchBar contentsController:self];
[self performSelector:@selector(setSearchDisplayController:) withObject:searchDC];
searchDC.delegate = self;
searchDC.searchResultsDataSource = self.tableView.dataSource;
searchDC.searchResultsDelegate = self.tableView.delegate;
[aSearchBar release];
[searchDC release];
}
When a user enters something and searches, a column in the background is displayed at the top of the View table.
Are there any hides of this "searchResults tableView"? (I just want the background table to store the data that they currently do).
i.e. is there a property? e.g. searchDisplayController.tableView.visible = NO or similar?
source
share