UISearchBarDelegate
A collection of optional methods that you implement to make a search bar control functional.
Declaration
@MainActor protocol UISearchBarDelegate : UIBarPositioningDelegateOverview
A UISearchBar object provides the user interface for a search field on a bar, but it’s the application’s responsibility to implement the actions when buttons are tapped. At a minimum, the delegate needs to perform the actual search when text is entered in the text field.
Topics
Managing the search text
searchBar(_:textDidChange:)searchBar(_:shouldChangeTextIn:replacementText:)searchBarShouldBeginEditing(_:)searchBarTextDidBeginEditing(_:)searchBarShouldEndEditing(_:)searchBarTextDidEndEditing(_:)
Responding to clicks in search controls
searchBarBookmarkButtonClicked(_:)searchBarCancelButtonClicked(_:)searchBarSearchButtonClicked(_:)searchBarResultsListButtonClicked(_:)