---
title: "updateSearchResults(for:selecting:)"
framework: uikit
role: symbol
role_heading: Instance Method
path: "uikit/uisearchresultsupdating/updatesearchresults(for:selecting:)"
---

# updateSearchResults(for:selecting:)

Asks the object to update the search results for a specified controller after the user selects a search suggestion.

## Declaration

```swift
optional func updateSearchResults(for searchController: UISearchController, selecting searchSuggestion: any UISearchSuggestion)
```

## Parameters

- `searchController`: The doc://com.apple.uikit/documentation/UIKit/UISearchController object used as the search bar.
- `searchSuggestion`: The suggestion the user selected.

## Discussion

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.

## See Also

### Updating the search bar

- [updateSearchResults(for:)](uikit/uisearchresultsupdating/updatesearchresults(for:).md)
