I have a question that I tried to find an answer for the last four days without success. Any help would be greatly appreciated!
My design is in someway similar to the iphone “phone” app came with iPhone.
My root view controller is a UITabBarController. I have three UINavigationControllers controlled by this UITabBarViewController. Each UINavifationController pushes a number UIViewControllers in sequence.
My question is that if I clicked through the views in the first tab (e.g.: iphone “phone” favorites tab) to display a detail info (contact’s detail info view). Now I switch to another tab (the “Recent” tab). When I click the first “Favorites” tab again, how do I make the “contact’s detail info view” show up instead of the root view of the first tab (tableview list of “Favorites).
In another word, what is the way for the program to remember which “top” view (and the view stacks) for the other tabs. So when I click back to the tab, it will show the “top” view for me instead of the root view controlled by uinavigationviewcontroller?
Thanks for your help!
You shouldn’t collide with this problem, since iPhone does what you want by default. I think the problem is either in the way you add the view controllers in the navigation controller, or in the way you create/store your navigation controller. Perhaps, you just erase the info you’ve just added somehow after you’d change a tab. Try to watch this video
http://youtube.com/watch?v=LBnPfAtswgw
it explains well step by step how to build the architecture you want with the help of interface builder.