I'm attempting to change a view when specific push notifications come through, I've had minor success. (Using parse with push notifications, catering for when the App is open and closed).
My Storyboard looks like this, I'm attempting to change the view within AppDelegate to DetailViewController.
Now I'm able to change views by changing the root controller, but I've only been able to attach either my tab view or the navigation not both.
UIStoryboard *mainStoryboard = [UIStoryboard storyboardWithName:@"MainStoryboard_iPhone" bundle:nil];
DetailViewController *detail = (DetailViewController *)[mainStoryboard instantiateViewControllerWithIdentifier:@"detail"];
[detail setDetailItem:StreamData[2]];
self.window.rootViewController = detail;
And of course the use of (below) only works in other controllers.
[self.navigationController pushViewController:detail animated:YES];
I'm wondering if this can be achieved from AppDelegate while maintaing the tabbar at the bottom and the navigation at the top?
My initial work around is to set a trigger from the AppDelegate to a global var accessible from all controllers and then use something like viewDidAppear to check if they view needs to change. This seems way too resource intensive though but it maintains my layouts.
My issue is similar to this: pushing view controller inside a tab bar from app delegate, after a notification