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

# presentSearchController(_:)

Presents the designated search controller.

## Declaration

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

## Parameters

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

## Discussion

Discussion The system calls this method when the user begins editing in the search controller, or you set the isActive property to true. The system performs a default presentation if you don’t implement this method or you present the controller yourself.

## See Also

### Presenting and dismissing the search controller

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