views:

59

answers:

1

I'm new to iOS development and am working on this app that has a similar interface to the official Twitter app. However, I'm not sure how to organize the view controllers and the hierarchy, especially for UITabBar and UINavigationBar (which one is the parent controller?).

Can you guys point me to the right direction? I started from a blank window-based application project. A list of view controllers in the order of the hierarchy would be really helpful. Thank you.

+1  A: 

Make the TabBar Controller your root controller. Then, in every tab where you need navigation, use Navigation Controller. It will add Navigation Bars, which you can then modify either in IB (where it applies), or programmatically.

Roman
I tried that but how come the main UITabBar disappears when you open a tweet? that's why I'm confused about the ordering of view controllers. Also if you go to the 'more' tab item then 'My Profile' the main UITabBar changes. How does that work?
Melina
You can have an underlying UIView, I guess, and then remove the TabBar from superView, and re-add it later. Or, you can add a new view to the window, and it will be above the tabBar.
Roman
if you remove TabBar from superview then how come the state is kept? is there a way to hide it instead of removing it?
Melina