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

# updateSearchResults(for:)

Asks the object to update the search results for a specified controller.

## Declaration

```swift
func updateSearchResults(for searchController: UISearchController)
```

## Parameters

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

## Discussion

Discussion The system calls this method when the search bar becomes the first responder or the search bar’s text changes. Perform any required filtering and updating of search results or suggestions inside of this method.

## See Also

### Updating the search bar

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