I'm creating an app who's storyboard flows like the image below:

storyboard

When a user logs in from "Sysalert View Controller" they are brought into "Message List View Controller" where I do an NSURLConnection to load some JSON into the table. When a user taps a row in the table, they are brought into "Message Details" which shows more detailed information for that message.

When a user launches the app from a push notification, regardless of the state of the app prior to launching, I want the app to load the "Message List" data from my server and then show them the message that's just been pushed to the device.

I know I need to use didFinishLaunchingWithOptions to tell the app to react to the push notification but how do I setup the view hierarchy so that the "Message List" view controller loads its data and then pushes the "Message Details" view controller onto the stack for the appropriate message?

Essentially this kind of mimics the behaviour of the Messages or Mail apps. Where opening with a notification brings you to a view controller for that message but you are still able to move back in the hierarchy as if you had launched the app from the initial viewController and traversed through the viewControllers in turn.

Edit
Report