Instance Property

hidesSearchBarWhenScrolling

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

Declaration

@property(nonatomic) BOOL hidesSearchBarWhenScrolling;

Discussion

When the value of this property is YES, 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 NO, 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

searchController

The search controller to integrate into your navigation interface.