Initializer

init(searchResultsController:)

Initializes and returns a search controller with the specified view controller for displaying the results.

Declaration

init(searchResultsController: UIViewController?)

Parameters

searchResultsController

The view controller that displays the search results. Specify nil if you want to display the search results in the same view controller that displays your searchable content.

Return Value

An initialized search controller.

Discussion

After creating the search controller, always assign an object to the searchResultsUpdater property. The search controller uses that object to update the search results.