Use NSNotificationCenter selector for one observer in multiple view controllers

后端 未结 1 1287
时光说笑
时光说笑 2021-01-28 03:12

Can I use the selector getUpdate: in multiple view controllers? I\'m registering my LevelViewController as an observer for both GameViewControll

相关标签:
1条回答
  • 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.

    0 讨论(0)
提交回复
热议问题