I’m making an app with push notifications and I want the app to show a modal view controller or push a view onto the current navigation controller when a notification is received. I have the didReceiveRemoteNotification in my app delegate that gets the notification but now I can’t push the view controller because I don’t have access to the navigation controller (or anything I can use). I’ve seen other posts where they create the navigation controller and do everything in the app delegate but I’ve used the interface builder so it’s not obvious to me how I can get access to it. What is the best way to push a new view controller or show a modal?
Thanks for any tips/suggestions!
You could re-post the information from the app delegate using NSNotificationCenter and have your view logic call addObserver so it receives this notification.
This way, you can have different parts of your UI respond in different ways without centralising that knowledge in the app delegate.