View Full Version : Embedding a UITabController within a UINavigationController
blueeye
Oct 7, 2009, 10:32 AM
Hi,
I've been trying to create an application which uses a navigation controller to select a "person" and then uses a tab controller to allow you to select different "tabs" of information.
I can get this to work, but for one annoyance: The bottom of the tabs is below the level of the screen and the views are not being properly resized.
I've attached screenshots of everything just to help anyone to understand the problem.
I've searched around but can't find anything. Any help would be much appreciated.
dejo
Oct 7, 2009, 11:59 AM
Doesn't look like your tab bar controller view is taking into account the screen space needed for the navigation bar.
blueeye
Oct 7, 2009, 12:00 PM
Doesn't look like your tab bar controller view is taking into account the screen space needed for the navigation bar.
... I realise that, I'm trying to fix it...
dejo
Oct 7, 2009, 12:21 PM
... I realise that, I'm trying to fix it...
You're not being short with me, are you? :confused:
blueeye
Oct 7, 2009, 01:39 PM
You're not being short with me, are you? :confused:
I wouldn't dream of it.
Maybe a little because I know what's going on, but I don't really know why. They why is where I need to go before I can find the how of fixing it.:apple:
blueeye
Oct 14, 2009, 01:02 PM
Okay, in case this helps anyone understand the problem better than I do (because I don't understand it at all):
I tried removing the navigation bar at the top of the navigation controller, but it made no difference. Either that space is reserved for such anyway, or something is funny with the UITabController.
I also tried resizing the UITabController's view but I couldn't find a way to do it (well, one that worked). Most of what I tried to do was make it autoresize via Interface Builder. Needless to say, attempts failed.
The whole tab business has been a bit dodgy from the way it's "resized" the tabbed views to it's own quite obvious problem so I wonder if maybe there's a better way of incorporating it into the navigation controller? I considered using modal views but am not sure if that will help. Can anyone shed any light on this?
dejo
Oct 14, 2009, 01:24 PM
Did you try adding a Navigation Bar as the Top Bar in the Simulated Interface Elements section for your Tab Bar Controller?
blueeye
Oct 14, 2009, 01:32 PM
Did you try adding a Navigation Bar as the Top Bar in the Simulated Interface Elements section for your Tab Bar Controller?
I just tried to do it now but although Interface gave me the option, if I tried to set it as such it immediately switched back. Maybe such an attempt is disallowed?
vBulletin® v3.8.6, Copyright ©2000-2012, Jelsoft Enterprises Ltd.