automaticallyShowsCancelButton
A Boolean indicating whether the search controller manages the visibility of the search bar’s cancel button.
Declaration
var automaticallyShowsCancelButton: Bool { get set }Discussion
By default, UISearchController shows the search bar’s cancel button when search becomes active and hides it when the user dismisses search. You can take over responsibility for showing and hiding the cancel button by setting this property to false. If you set the search bar’s showsCancelButton property, this property becomes false.