Friday, 16 August 2013

Gettings reference to existing navigation controller in tab bar after receiving remote notification

Gettings reference to existing navigation controller in tab bar after
receiving remote notification

My app consists of following:
Tab bar controller with 5 tabs (this is my init controller)
each tab bar item has navigation controller and another view controllers
further in
Now, I'm implementing skype-like chat (table view with contacts and chat
as a detail view of this table view), which is currently residing in my
second tab bar item, about 2 views deep in hierarchy.
When I receive remote notification, I want to preserve user navigation
stack in all tabs, so instead of recreating tab bar in appdelegate, I just
want to get reference of my navigation controller, that is in my second
tab (so that I can modify it's navigation stack later on).
My problem here is, that I just can't get the reference. I got my tab bar
like:
UITabBarController *myTabBar = (UITabBarController
*)self.window.rootViewController;
but then I don't have any clue what to do. I will be happy for any
suggestion.

No comments:

Post a Comment