Show UISearchDisplayTableView when search string is empty

Viewed 1807

This is extremely frustrating: I'm trying to display unfiltered results in a UISearchDisplayController even if the search string is empty.

Adding debug code to numberOfSectionsInTableView: and numberOfRowsInSection: shows that when my search string is empty, non-zero integers are being returned, but cellForRowAtIndexPath: is never called! The tableview appears to be hidden.

I tried setting tableview.hidden=NO; in searchDisplayController:(UISearchDisplayController *)controller didHideSearchResultsTableView:(UITableView *)tableView to no avail.

This can't be that hard to pull off, I'd imagine this is a very common thing to do!

3 Answers
Related