If you are implementing UISearchDisplayDelegate, then:
- (void)searchDisplayControllerDidEndSearch:(UISearchDisplayController *)controller
call overlay should be called.
I mixed up with these components a few months ago, but did not use it because you cannot change its standard behavior much.
What I found out is that it is just a wrapper for the UISearchBar , so you can access the searchBar on your SearchDisplayController as follows:
[searchDisplayController.searchBar setDelegate:self]
This method gives you more freedom of access to the delegate methods of the searchBar itself. For example textDidChange , cancelButtonClicked , etc.
source share