---
title: "didDismissSearchController(_:)"
framework: uikit
role: symbol
role_heading: Instance Method
path: "uikit/uisearchcontrollerdelegate/diddismisssearchcontroller(_:)"
---

# didDismissSearchController(_:)

Notifies the delegate when the system completes automatic dismissal of the search controller.

## Declaration

```swift
optional func didDismissSearchController(_ searchController: UISearchController)
```

## Parameters

- `searchController`: The doc://com.apple.uikit/documentation/UIKit/UISearchController object to dismiss.

## Discussion

Discussion The system only calls this method when it automatically dismisses the search controller. The system doesn’t call this method if you explicitly dismiss the search controller.

## See Also

### Presenting and dismissing the search controller

- [didPresentSearchController(_:)](uikit/uisearchcontrollerdelegate/didpresentsearchcontroller(_:).md)
- [presentSearchController(_:)](uikit/uisearchcontrollerdelegate/presentsearchcontroller(_:).md)
- [willDismissSearchController(_:)](uikit/uisearchcontrollerdelegate/willdismisssearchcontroller(_:).md)
- [willPresentSearchController(_:)](uikit/uisearchcontrollerdelegate/willpresentsearchcontroller(_:).md)
