简体   繁体   中英

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM