1
votes

I have this MonoTouch related question, but I think Objective/C programmers can help as well.

I have TabBarController with some tabs. I want my home viewController (which is added to tabBar) to appear without tabBar. I thought the way to do it was to set HidesBottomBarWhenPushed of that controller to true.

homePage = new HomePageController();
homePage.HidesBottomBarWhenPushed = true;

homePage.TabBarItem = new UITabBarItem("Home", new UIImage("Images/Icons/home.png"), 0);

However, it seems that this works only in case of using TabBar with NavigationController, i.e. in case we actually push controllers. I wonder if there is a way to do it just for simple viewControllers contained in tabBarController.

2

2 Answers

2
votes

You can try to set the hidden property of the tab bar to YES. (or true in MonoTouch)

0
votes

I found out that, in fact, you cannot cover tabBar area of tabBarController. You can set hidden property, just like Moshe said, or you can play with opacity as well but can't cover it with anything. But there's a great alternate solution. You can use modal view, which always has higher index than regular controllers. Therefore, it will cover everything.

homePageContent.ModalPresentationStyle = UIModalPresentationStyle.FullScreen;
        homePageContent.ModalTransitionStyle = UIModalTransitionStyle.CoverVertical;

        this.PresentModalViewController(homePageContent, false);

        base.ViewWillAppear (animated);