Instance Method

setShowsCancelButton(_:animated:)

Sets the display state of the cancel button optionally with animation.

Declaration

func setShowsCancelButton(_ showsCancelButton: Bool, animated: Bool)

Parameters

showsCancelButton

true to display the cancel button, otherwise false.

animated

true to use animation to change the display state of the cancel button, otherwise false.

Discussion

Cancel buttons are not displayed for apps running on iPad, even when you specify true for the showsCancelButton parameter

See Also

Configuring the Search Interface

var showsBookmarkButton: Bool

A Boolean value indicating whether the bookmark button is displayed.

var showsCancelButton: Bool

A Boolean value indicating whether the cancel button is displayed.

var showsSearchResultsButton: Bool

A Boolean value indicating whether the search results button is displayed.

var isSearchResultsButtonSelected: Bool

A Boolean value indicating whether the search results button is selected.