updateSearchResults(for:selecting:)
Asks the object to update the search results for a specified controller after the user selects a search suggestion.
Declaration
optional func updateSearchResults(for searchController: UISearchController, selecting searchSuggestion: any UISearchSuggestion)Parameters
- searchController:
The Uisearchcontroller object used as the search bar.
- searchSuggestion:
The suggestion the user selected.
Discussion
The system calls this method when the user selects a search suggestion. Perform any required filtering and updating of search results or suggestions inside of this method.