Is there any way to recieve a notification when a UISearchBar is finished (e.g Cancel button clicked or otherwise lost focus.
We don’t have access to the UITextField inside, or I could attach an observer to it.
I can be notified when the keyboardWillHide, but I’ve got another text field, so it could be either one. And it becomes inactive before the keyboard hides, so no love.
I have access to the UISearchBarDelegate and UISearchDisplayController(Delegate).
Can anyone tell me where to look? Is there a master list of all notifications to choose from?
These methods should do it for you:
These are all UISearchBarDelegate delegate methods. By rule, delegate methods are more closely bound than adding observers for notifications. This was mentioned in one of Stanford University’s iPhone videos. Though i myself use notifications generously and have found no problem with them.