Instance Method


Asks the delegate if the table view should be reloaded for a given scope.


optional func searchDisplayController(_ controller: UISearchDisplayController, shouldReloadTableForSearchScope searchOption: Int) -> Bool



The search display controller for which the receiver is the delegate.


The index of the selected scope button in the search bar.

Return Value

true if the display controller should reload the data in its table view, otherwise false.


If you don’t implement this method, then the results table is reloaded as soon as the scope button selection changes.

You might implement this method if you want to perform an asynchronous search: you would initiate the search in this method, then return false, and reload the table when you have results.

See Also

Responding to Changes in Search Criteria

func searchDisplayController(UISearchDisplayController, shouldReloadTableForSearch: String?) -> Bool

Asks the delegate if the table view should be reloaded for a given search string.


Beta Software

This documentation contains preliminary information about an API or technology in development. This information is subject to change, and software implemented according to this documentation should be tested with final operating system software.

Learn more about using Apple's beta software