0

This looks like just a simple problem, but I can't find what's wrong.

I have a UINavigationController pointing to a UIViewController A, pointing to a UITabBarController. The UITabBarController handles two UIViewControllers B & C, so I can see two tab bar item on the UITabBarController.

When the app run, the UIViewController A is shown. Then after tapping on a button, the UIViewController B is shown (which is supposedly within the UITabBarController). But the tab bar is not shown. Only the UIViewController B and navigation bar.

Can someone help why this is happening?

EDIT: some screenshots:

Screenshot of the UITabBarViewController

The UITabBarViewController is assigned properly to the flow

Bista
  • 7,869
  • 3
  • 27
  • 55
Chen Li Yong
  • 5,459
  • 8
  • 58
  • 124
  • How are you moving from A to B, using Normal button or Tab Bar button? – Bista Sep 27 '16 at 06:07
  • Share screenshot or some code for better understanding. – Arasuvel Sep 27 '16 at 06:12
  • @Mr.UB just using a simple login `UIButton`. – Chen Li Yong Sep 27 '16 at 06:14
  • @Arasuvel I would like to, but I'm working with tablet sized simulated metrics, so I can only give limited screenshot which might be more confusing. But I'll try. – Chen Li Yong Sep 27 '16 at 06:15
  • Check my popular post: http://stackoverflow.com/questions/39159444/how-to-get-navigation-based-template-functionality-in-swift-programming/39159793#39159793 – Bista Sep 27 '16 at 06:15
  • @Mr.UB in my case, the `UITabBarViewController` has attached properly into the flow. See my second screenshot. To the left is the login screen (`UIViewController` A). To the right is the `UIViewController` B, which is the first default view of the `UITabBarViewController`. To the bottom (not seen) is the `UIViewController` C, which is part of the managed `UIViewController` along with the B (see my first screenshot). – Chen Li Yong Sep 27 '16 at 06:22
  • 1
    I know, but apple clearly suggests that do not embed Tab Bar Controller into the Navigation Controller, it is against their app architecture design. They say that the Tab Bar Controller should be root view. – Bista Sep 27 '16 at 06:23
  • @Mr.UB It's not. The problem is, I have been able to pull this off before in the past, so I know this is possible. But I never encounter such problem like this. In the past, it works perfectly like expected. So I don't know what's wrong in this case. – Chen Li Yong Sep 28 '16 at 01:35
  • Please post image of full story board with A view controller too. – Bista Sep 28 '16 at 02:00
  • 1
    @Mr.UB I got the problem. There's a segue from the VC A to the UITabBarViewController, BUT when I click on the Login button, it's actually running a `touchUpInside` IBAction code that's directly fetch the VC B from the storyboard and push it, not run the segue at all. Thank you for your patience in trying to understand the problem. – Chen Li Yong Sep 29 '16 at 03:36

0 Answers0