Instance Property

obscuresBackgroundDuringPresentation

A Boolean indicating whether the underlying content is obscured during a search.

Declaration

var obscuresBackgroundDuringPresentation: Bool { get set }

Discussion

When the value of this property is true, the search controller obscures the view controller containing your searchable content as soon as the user interacts with the search bar. When this property is false, the search controller does not obscure the original view controller. This property controls only whether the original view controller is initially obscured. When the user enters text in the search bar, the search controller immediately displays the search results controller with the results.

If you use the same view controller to display the searchable content and search results, it is recommended that you set this property to false. The default value of this property is true.

See Also

Configuring the Search Interface

var dimsBackgroundDuringPresentation: Bool

A Boolean indicating whether the underlying content is dimmed during a search.

Deprecated
var hidesNavigationBarDuringPresentation: Bool

A Boolean indicating whether the navigation bar should be hidden when searching.