문제

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.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top