<!--
{
  "availability" : [
    "iOS: -",
    "iPadOS: -",
    "macCatalyst: -",
    "tvOS: -",
    "visionOS: -"
  ],
  "documentType" : "symbol",
  "framework" : "UIKit",
  "identifier" : "/documentation/UIKit/UISearchControllerDelegate",
  "metadataVersion" : "0.1.0",
  "role" : "Protocol",
  "symbol" : {
    "kind" : "Protocol",
    "modules" : [
      "UIKit"
    ],
    "preciseIdentifier" : "c:objc(pl)UISearchControllerDelegate"
  },
  "title" : "UISearchControllerDelegate"
}
-->

# UISearchControllerDelegate

A set of delegate methods for search controller objects.

```
@MainActor protocol UISearchControllerDelegate : NSObjectProtocol
```

## Topics

### Presenting and dismissing the search controller

[`didDismissSearchController(_:)`](/documentation/UIKit/UISearchControllerDelegate/didDismissSearchController(_:))

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

[`didPresentSearchController(_:)`](/documentation/UIKit/UISearchControllerDelegate/didPresentSearchController(_:))

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

[`presentSearchController(_:)`](/documentation/UIKit/UISearchControllerDelegate/presentSearchController(_:))

Presents the designated search controller.

[`willDismissSearchController(_:)`](/documentation/UIKit/UISearchControllerDelegate/willDismissSearchController(_:))

Notifies the delegate that the system is about to automatically dismiss the search controller.

[`willPresentSearchController(_:)`](/documentation/UIKit/UISearchControllerDelegate/willPresentSearchController(_:))

Notifies the delegate that the system is about to automatically display the search controller.

### Responding to search bar placement updates

[`searchController(_:didChangeFrom:)`](/documentation/UIKit/UISearchControllerDelegate/searchController(_:didChangeFrom:))

Notifies the delegate after the search bar placement changes.

[`searchController(_:willChangeTo:)`](/documentation/UIKit/UISearchControllerDelegate/searchController(_:willChangeTo:))

Notifies the delegate before the search bar placement changes.



---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)