Henry F
Henry F

Reputation: 4980

Does UISearchBar have a delegate that notifies you when it is no longer the first responder?

Just as the title says: Does UISearchBar have a delegate that notifies you when it is no longer the first responder? I have a class in which I use a customized UISearchBar, but I need to dismiss it when the class is no longer needed for several reasons. The viewDidLoad in this app gets called, but viewWillDisappear and viewDidAppear are never called, they hang around. So, I need to be notified when the search bar is no longer the first responder. I made it happen using NSNotifications, but I think it's bad practice to do this for UI updates.

Upvotes: 0

Views: 40

Answers (1)

Related Questions