Instance Method

setActive(_:animated:)

Displays or hides the search interface, optionally with animation.

Declaration

func setActive(_ visible: Bool, animated: Bool)

Parameters

visible

true to display the search interface if it is not already displayed; false to hide the search interface if it is currently displayed.

animated;

true to use animation for a change in visible state, otherwise false.

Discussion

When the user focus in the search field of a managed search bar, the search display controller automatically displays the search interface. You can use this method to force the search interface to appear.

See Also

Displaying the Search Interface

var isActive: Bool

The visibility state of the search interface.

Deprecated

Beta Software

This documentation contains preliminary information about an API or technology in development. This information is subject to change, and software implemented according to this documentation should be tested with final operating system software.

Learn more about using Apple's beta software