I have an aplication which initially there’s a TabBarController, each tab is a ViewController and every one has a button which calls other controllers.
So how am I supose to structure this? Having one main rootviewController (if so, how?)? Or calling in the appdelegate only the tabBarController and in each the viewControllers inside the tab call the other controllers?
What’s the best way so I can advance, go back and transition views nimbly?
Don’t know if I made myself clear…
Thanks guys.
Generally you will start with the Template called “Tab Bar Application” and as of Xcode 4 starts by loading the MainWindow Nib, which hold a tab bar and the tab bar is set up in IB to have 2 view controllers, called “FirstViewController”, and “SecondViewController”…
You can follow that pattern if it suites you, otherwise you may want to start with a view based application and add your own tab bar. I personally find it to be easier to control the tab bar, through the
UITabBarDelegate, especially if you plan to do anything slightly esoteric.Edit:
Basically one of two ways, if you plan to load a Navigation controller stack, or a single modal view.
1)
2)
either way get back to the Tab environment by calling the following on the view controller that is calling present modal.