---
title: "init(searchController:)"
framework: uikit
role: symbol
role_heading: Initializer
path: "uikit/uisearchcontainerviewcontroller/init(searchcontroller:)"
---

# init(searchController:)

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

## Declaration

```swift
init(searchController: UISearchController)
```

## Parameters

- `searchController`: The search controller managing the search results. This parameter must not be nil.

## Return Value

Return Value An initialized search container view controller.

## Discussion

Discussion After initializing the search container view controller, embed it in your container view controller normally.
