Contents

searchBarSearchButtonClicked(_:)

Tells the delegate that the search button was tapped.

Declaration

optional func searchBarSearchButtonClicked(_ searchBar: UISearchBar)

Parameters

  • searchBar:

    The search bar that was tapped.

Discussion

You should implement this method to begin the search. Use the text property of the search bar to get the text. You can also send becomeFirstResponder() to the search bar to begin editing programmatically.

See Also

Responding to clicks in search controls