Reputation: 1138
I am new to iPhone programming.
Current Setup: I have a TabBar Controller (4 TabBarItems). When you click on the secondTabBarOtem, it calls a second.xib which is of type UIViewController.
My Requirement: I have a button inside the view. So when I click the button, it should load another UIViewController with the TabBar visible.
Problem: I am able to do so, but the TabBar disappears and I need to restart the application to see the TabBar again.
Upvotes: 2
Views: 1309
Reputation: 314
First you'll have to read and understand how UITabBarController works.
Once you've set up your tabs using setViewControllers:animated:
use selectedViewController
to switch between them.
Upvotes: 1
Reputation: 6135
You should have the tab bar controller as the root and then launch navigation controllers when the various tabs are selected. doing it like this will resolve the problem of the dissapearing tab bar when pushing a new view controller.
here's a video tutorial link text that shows what you want to do. hope it helps.
Upvotes: 1