Search code examples
iosobjective-cxcodeuisearchdisplaycontroller

How to Force UISearchDisplayController to Update


I am creating a search controller and I want to do autocomplete.

It's fine.

However I got data from several sources. First I got data from local cache. Then I load data from the web.

So when we finish downloading data we want to make the searchcontroller to reload it's table incorporating new data.

How do we do that?


Solution

  • You can just call reloadData on the search display controller's table view:

    [self.searchDisplayController.searchResultsTableView reloadData];