views:

91

answers:

2

Hi,

I am trying to put a UITabBar on a Rootviewcontroller.xib to a Navigation based Application. I know that we used navigation based applicaitons for Tableviews and by default those .xib consists of a tableview. I tried to put a UITabBar in the bottom of rootview but it is not setting over there.

I saw that if we used viewbased application or a window based application we can arrange both UITabBar and UITableView on the same view. What I want to know here is:

1) Can we place a UITabBar in Navigation based applications if so how?

2) If we shift from root views to other detailed views i want the UITabBar to be appeared on all the other views can any one tell me how can i do this.

Thanks,

A: 
Dan
Hi Dan, Thank you Yes Definitely. I want my application to work in the same way as you wrote. If you have any such sample example please share with me.
adusum
Dan, I have a question so in order to accomplish while creating a project we have to opt a TabBarController based application right. one more question here is how to divide tabbar into required cells.
adusum
The best (and easiest) method would be to create a Tab Bar Controller from the template in Xcode; then in Interface Builder, you can add tab bar items and make them UINavigationControllers (you don't have to worry about subclassing UINavigationController, just make sure you have the root of the stack YOUR UITableViewController). I'm not the best with Interface Builder, as I build most of my view controllers in xcode, but Cocoa Is My Girlfriend has a good tutorial on how to do it. http://www.cimgf.com/2009/06/25/uitabbarcontroller-with-uinavigationcontroller-using-interface-builder/
Dan
+3  A: 

alt text This is how your Xib should look. Tab Bar controller is parent Controller.. Navigation controller shown in the image i.e. "First" will be just for the first Tab .. if you need the Navigation controller for the "Second" tab, you have to add one more Navigation controller.

Adding Tabbar controller with navigation controller in the order shown in the image.

KiranThorat
Yes I am using a XIB but I am not getting how to proceed through it initially.I created a class using TabBarController based Application later I am not able to understand how to go for the next step.
adusum
Which template are you using..?? i.e. Tab bar application or something else ?
KiranThorat
I am using Tab Bar Application Template.
adusum
One of the way is.. Drag Navigation controller on the MainWindow.Xib.. 2. remmove the view controller lets say (first view controller).. open the navigationController by clicking on the triangle in front of the navigation controller 3. select the view controller inside the navigationController.. then change the class property inside the Identity inspector to firstViewController 4. change the tabBar item name to First.. DONE.
KiranThorat
I am sorry to say but i didn't get what you said.Just blindly followed the steps written above but in the first step itself I am not able to place the navigationcrntroller on to the mainwindow.xib.
adusum
I can't do much... follow this http://www.youtube.com/watch?v=LBnPfAtswgw
KiranThorat