Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

UISearchDisplayController - Method for when cancel button is clicked

I have a UISearchDisplayController that shows the cancel button. I would like to call a method when a user clicks the cancel button. Is there a way to do this?

like image 924
Nic Hubbard Avatar asked Jan 31 '11 03:01

Nic Hubbard


1 Answers

You can use the following searchbar delegate method,

- (void)searchBarCancelButtonClicked:(UISearchBar *)searchBar
{
     // DO ur operations
}
like image 117
EXC_BAD_ACCESS Avatar answered Oct 18 '22 16:10

EXC_BAD_ACCESS