Skip to main content
update
Source Link
rog
  • 5.4k
  • 5
  • 36
  • 41

You need to implement the UISearchBarDelegate. Once you've done that, use:

- (void)searchBarCancelButtonClicked:(UISearchBar *)searchBar 

Tells the delegate that the cancel button was tapped.

Then use:

[self searchBarCancelButtonClicked:yourSearchBar]; 

You need to implement the UISearchBarDelegate. Once you've done that, use:

- (void)searchBarCancelButtonClicked:(UISearchBar *)searchBar 

Tells the delegate that the cancel button was tapped.

You need to implement the UISearchBarDelegate. Once you've done that, use:

- (void)searchBarCancelButtonClicked:(UISearchBar *)searchBar 

Tells the delegate that the cancel button was tapped.

Then use:

[self searchBarCancelButtonClicked:yourSearchBar]; 
Source Link
rog
  • 5.4k
  • 5
  • 36
  • 41

You need to implement the UISearchBarDelegate. Once you've done that, use:

- (void)searchBarCancelButtonClicked:(UISearchBar *)searchBar 

Tells the delegate that the cancel button was tapped.