1

I think I may be missing something obvious:

Is there a simple way to modify the UISearchBar or UISearchDisplayController so that it doesn't reload the view after each letter typed but only after the Search button is hit?

TK.
  • 35
  • 5

1 Answers1

2

I figured it out. Most of the examples I found search the text here:

- (void)searchBar:(UISearchBar *)theSearchBar textDidChange:(NSString *)searchText

but I just didn't implement that method and instead just wrote my own search function which I called here:

// called when keyboard search button pressed

- (void)searchBarSearchButtonClicked:(UISearchBar *)searchBar{

    [self fetchTheSearchString:searchBar.text];
    [searchBar resignFirstResponder];
    [self.tableView reloadData];

}
Dmitry Isaev
  • 3,888
  • 2
  • 37
  • 49
TK.
  • 35
  • 5