views:

66

answers:

1

I have a hidden UITabBarController but it seems to cover up the buttons that I'd like to place at the bottom edge of the screen in the home view.

// hide the tabBar for the home screen
- (void) viewWillAppear:(BOOL)animated
{
    self.tabBarController.tabBar.hidden = YES;
}

Is there a way around this? The tab bar will be shown for the other views except for the home view (i.e. the first tab).

Cheers!

A: 

What you could do is in Interface Builder (assuming you added the UITabBarController from within IB) choose from the Menu: Layout --> Send To Back while the TabBar is highlighted. This would mean that on the "home" view it would would not obscure the buttons and on the other views it would be at the front, assuming you have no other buttons located at the same position in the UIView in your other views.

It would, of course, be cleaner to Load a new view controller when you navigate away from the home view, and invoke the UITabBar at that point, so that you don't have to resort to this kind of UI trickery.

i.e. your home view and your other screens (with the UITabBar) would be in two different XIBs.