I find that the only way to build a UISearchDisplayController
is to also build a UISearchBar
onto my UITableViewController
.
However, I don't want a UISearchBar
to show up, and would like to initiate the search via a button press instead.
Is this possible?
I tried activating the UISearchDisplayController
on button press:
- (void)searchButtonPressed:(id)sender{
[self.searchDisplayController setActive:YES animated:YES];
}
This "works", but the searchDisplayController
that shows up has no UISearchBar
. (Obviously).
I ended up just setting the hidden
field to NO and YES when the search display controller is shown and dismissed.