<!--
{
  "availability" : [
    "iOS: 9.1.0 -",
    "iPadOS: 9.1.0 -",
    "macCatalyst: 13.1.0 -",
    "tvOS: 9.0.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "UIKit",
  "identifier" : "/documentation/UIKit/UISearchContainerViewController",
  "metadataVersion" : "0.1.0",
  "role" : "Class",
  "symbol" : {
    "kind" : "Class",
    "modules" : [
      "UIKit"
    ],
    "preciseIdentifier" : "c:objc(cs)UISearchContainerViewController"
  },
  "title" : "UISearchContainerViewController"
}
-->

# UISearchContainerViewController

A view controller that manages the presentation of search results in your interface.

```
@MainActor class UISearchContainerViewController
```

## Overview

In tvOS, rather than push a [`UISearchController`](/documentation/UIKit/UISearchController) onto a navigation controller’s stack or use one as a child of another container view controller, embed an instance of this class and let it manage the presentation of the search controller’s content.

[`UISearchContainerViewController`](/documentation/UIKit/UISearchContainerViewController) presents its [`UISearchController`](/documentation/UIKit/UISearchController), instead of containing it. So implement view appearance methods, such as [`viewWillAppear(_:)`](/documentation/UIKit/UIViewController/viewWillAppear(_:)) and [`didMove(toParent:)`](/documentation/UIKit/UIViewController/didMove(toParent:)) on both view controllers.

## Topics

### Creating a search container view controller

[`-  initWithSearchController:`](/documentation/UIKit/UISearchContainerViewController/init(searchController:))

Initializes and returns a search container view controller with the specified search controller object.

### Getting the search controller

[`searchController`](/documentation/UIKit/UISearchContainerViewController/searchController)

The search controller the search container view controller manages.

## Relationships

### Conforms To

[`CustomStringConvertible`](/documentation/Swift/CustomStringConvertible)

[`Hashable`](/documentation/Swift/Hashable)

[`Equatable`](/documentation/Swift/Equatable)

[`NSTouchBarProvider`](/documentation/AppKit/NSTouchBarProvider)

[`CVarArg`](/documentation/Swift/CVarArg)

[`UIActivityItemsConfigurationProviding`](/documentation/UIKit/UIActivityItemsConfigurationProviding)

[`UIContentContainer`](/documentation/UIKit/UIContentContainer)

[`CustomDebugStringConvertible`](/documentation/Swift/CustomDebugStringConvertible)

[`NSObjectProtocol`](/documentation/ObjectiveC/NSObjectProtocol)

[`UIPasteConfigurationSupporting`](/documentation/UIKit/UIPasteConfigurationSupporting)

[`NSExtensionRequestHandling`](/documentation/Foundation/NSExtensionRequestHandling)

[`UIStateRestoring`](/documentation/UIKit/UIStateRestoring)

[`Sendable`](/documentation/Swift/Sendable)

[`UIAppearanceContainer`](/documentation/UIKit/UIAppearanceContainer)

[`SendableMetatype`](/documentation/Swift/SendableMetatype)

[`UIUserActivityRestoring`](/documentation/UIKit/UIUserActivityRestoring)

[`NSCoding`](/documentation/Foundation/NSCoding)

[`UIFocusEnvironment`](/documentation/UIKit/UIFocusEnvironment)

[`UITraitChangeObservable-67e94`](/documentation/UIKit/UITraitChangeObservable-67e94)

[`UIResponderStandardEditActions`](/documentation/UIKit/UIResponderStandardEditActions)

[`UITraitEnvironment`](/documentation/UIKit/UITraitEnvironment)

### Inherits From

[`UIViewController`](/documentation/UIKit/UIViewController)

---

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)