0

I have a UITabBarController which has 5 tabs. Each of which has host a UINavigationController.

Everything is working well except that everytime each of these UINavigationController push a ViewController. Their bottom part is blocked by the UITabBar. Which is normal.

But i am wondering is it possible to have the UIViewController above the UITabBar?

Any idea how?

Edit:

Here is the structure

UITabBarController
    Tab 0: UINavigationController
    Tab 1: UINavigationController
    Tab 2: UINavigationController
    Tab 3: UINavigationController
    Tab 4: UINavigationController

So everytime that the NavigationController push a Uiviewcontroller. That UIViewController position is still blocked by the UITabBar since it is below it.

How do I have the UIViewController above the TabBar?

5
  • Can you provide some screen shots or code that can help in determining how the controllers are structured?
    – naz
    Aug 7, 2015 at 4:01
  • Did you use a storyboard to construct the structure or through code? Did you use autolayout and how are the VC presented, through a navCtrl push?
    – naz
    Aug 7, 2015 at 4:18
  • I don't use storyboard. Purely code. The behaviour is expected. But I am wondering if there is any workaround to show the ViewController above the UITabBar
    – JayVDiyk
    Aug 7, 2015 at 4:19
  • 1
    Can you see if my answer below works? Aug 7, 2015 at 4:37
  • If you expect it to behave like that either hide the tab bar by or don't use a push from the navCtrlr. I'm not sure if you need the navCtrlrs
    – naz
    Aug 7, 2015 at 4:46

1 Answer 1

2

Can you try doing this and see if it works?

destinationController.hidesBottomBarWhenPushed = true

Do this right before you segue into the destination view controller.

Hope this helps.

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.