View Full Version : UITabBarController and only showing 1/2 of tab bar
skunkworker
Sep 25, 2009, 05:44 PM
I've got a tab bar and it properly switches between view controllers.
But its only showing a half of the tab bar.
http://i36.tinypic.com/121qv7q.png
drf1229
Sep 26, 2009, 08:47 AM
Try moving it up in interface builder
neoserver
Sep 26, 2009, 10:40 AM
You can try what was mentioned above, but how are you creating the UITabController? in IB or in code? If its in code, there is something incorrect when you're setting the frame.
skunkworker
Sep 26, 2009, 01:14 PM
You can try what was mentioned above, but how are you creating the UITabController? in IB or in code? If its in code, there is something incorrect when you're setting the frame.
I'm creating it in code.
[self.view addSubview:tabBarController.view];
But it seems like the view is not correctly sized as its getting pushed from another view.
North Bronson
Sep 26, 2009, 03:46 PM
I'm creating it in code.
[self.view addSubview:tabBarController.view];
But it seems like the view is not correctly sized as its getting pushed from another view.
What is this view you are adding your tab bar controller's view to?
Why don't you make your tab bar the "root" of your hierarchy?
skunkworker
Sep 26, 2009, 04:24 PM
What is this view you are adding your tab bar controller's view to?
Why don't you make your tab bar the "root" of your hierarchy?
Cause my root view is a navigation controller.
Its almost as if the navigation bar is pushing down the tabbarcontroller.
Luke Redpath
Sep 26, 2009, 05:13 PM
Cause my root view is a navigation controller.
You're not using the tab bar controller correctly. *It* should be your root view and your UINavigationController should be added as one of the view controllers for the tab bar controller (e.g. for the first tab).
skunkworker
Sep 26, 2009, 06:34 PM
You're not using the tab bar controller correctly. *It* should be your root view and your UINavigationController should be added as one of the view controllers for the tab bar controller (e.g. for the first tab).
Well then i need to rethink how this particular part of my application operates.
drf1229
Sep 27, 2009, 02:34 PM
Just a suggestion:
Instead of adding the tab bar controller in code, try making a hidden one in interface builder and when you want it to appear use this: [TabBarControllerPointerName setHidden:NO];
vBulletin® v3.8.6, Copyright ©2000-2012, Jelsoft Enterprises Ltd.