Hide UITableView search bar
I have a UITableViewController with a UISearchDisplayController setup in the standard way (with the search bar inside the tableView). I'd like the search bar to start out hidden - really hidden, not merely scrolled away as in this solution . Then I'd like to present the search UI when the user presses a button, and hide it again (really hide it) after the user selects one of the items found in the search. Here's the almost working code for that: - (void)viewWillAppear:(BOOL)animated { [super viewWillAppear:animated]; self.searchDisplayController.searchBar.prompt = @"Add an item"; self