There is a cancel button when you use a UISearchcontroller
.
I want to make something happen when I press the cancel button.
Is there any Function or Delegate that trigger when the cancel button is clicked?
There is a cancel button when you use a UISearchcontroller
.
I want to make something happen when I press the cancel button.
Is there any Function or Delegate that trigger when the cancel button is clicked?
Try this:
self.searchController.searchBar.delegate = self;
- (void)searchBarCancelButtonClicked:(UISearchBar *)searchBar {
}