I have a table view with a search bar. When I put some text in the search bar & search data I display different rows under different sections. I have enabled UIGestureRecognizer on the section header to collapse the rows. Once user tap on the section header I set the data objects to nil leading to number of rows returned for those sections as 0.
After the I call the following piece of code to refresh my search table view. It all works fine with exception that I can see "No Results" on the screen just below my collapsed sections. This works fine in non-search mode - collapsing the sections does not display "No Results" message there.
[self.searchController.searchResultsTableView reloadData];
I could see a private property _noResultsLabel & a _searchDisplayControllerFlags option as noResultsMessageAutoDisplay (set to 1) inside class UISearchDisplayController. Not able to reset them.
Any idea on this?