开发者

Hidden UITabBarController covers Button

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 vi开发者_StackOverflowews except for the home view (i.e. the first tab).

Cheers!


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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜