Instance Property


A Boolean value indicating whether the integrated search bar is hidden when scrolling any underlying content.


var hidesSearchBarWhenScrolling: Bool { get set }


When the value of this property is true, the search bar is visible only when the scroll position equals the top of your content view. When the user scrolls down, the search bar collapses into the navigation bar. Scrolling back to the top reveals the search bar again. When the value of this property is false, the search bar remains regardless of the current scroll position.

You must configure the searchController property for this property to have any effect. The navigation controller hides and shows only the search bar provided by the search controller in that property.

See Also

Integrating Search Into Your Interface

var searchController: UISearchController?

The search controller to integrate into your navigation interface.