1

I have a UITableViewController that implements the UISearchBarDelegate and UISearchDisplayDelegate protocols. I have gotten a bug where if I click on the Cancel Button in the search bar, it won't render further queries.

I can output our search results right before we reloadata like this: NSLog(@"here are search results %@",self.searchResults);
[self.searchDisplayController.searchResultsTableView reloadData];

Works:

  1. launch app, type 'SOM' in query box - results return fine

Doesn't Work:

  1. launch app, type 'SOM' (or anything else) in query box
  2. click 'Cancel' button (not the x in search box)
  3. click back in Search Bar, and type 'SOM' - query occurs but doesn't render into searchResultsTableView

Is it possible I could have deleted out the searchResultsTableView? Any other ideas what could be going on?

thx

edit 1 not overriding searchBarCancelButtonClicked. Hmm.... if I put some debug in cellForAtIndexPath then I can see that it is not being called. Is there any way I could have unset the self.searchDisplayController.searchResultsTableView so that it no longer exists?

timpone
  • 19,235
  • 36
  • 121
  • 211

0 Answers0