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:
- launch app, type 'SOM' in query box - results return fine
Doesn't Work:
- launch app, type 'SOM' (or anything else) in query box
- click 'Cancel' button (not the x in search box)
- 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?