Use NSNotificationCenter selector for one observer in multiple view controllers

和自甴很熟 提交于 2019-12-02 08:46:45

You can create your own NSDictionary and pass as a value in userInfo to determine which UIViewController you came from and appropriately handle the situation using an if statement.

Alternatively

You can use delegates to execute an event when the back button is present and perform appropriate actions on the previous UIViewController. Personally i prefer the this approach.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!