SearchBarDelegateProtocol is provided when your screen includes a search bar view. SearchBarDelegateProtocol includes nine optional functions.

  • searchBar:textDidChange: Called when the user changed the search text.
  • searchBarBookmarkButtonClicked: Called when the bookmark button is tapped.
  • searchBarCancelButtonClicked: Called when the cancel button is tapped.
  • searchBarResultsListButtonClicked: Called when the search results list button is tapped.
  • searchBarSearchButtonClicked: Called when the search button is tapped.
  • searchBarShouldBeginEditing: Returns if editing should begin in the specified search bar.
  • searchBarShouldEndEditing: Returns if editing should stop in the specified search bar.
  • searchBarTextDidBeginEditing: Called when the user begins editing the search text.
  • searchBarTextDidEndEditing: Called when the user finishes editing the search text.
Did this answer your question?