Keep TabBar when moving to another view controller

后端 未结 4 973
伪装坚强ぢ
伪装坚强ぢ 2020-12-18 07:29

I have a storyboard like this

-> NavigationController -> LoginView -> TabBarController -> VC1 -> VC2

I didn\'t manage to make a \"move\" from VC1 to VC2 keep

相关标签:
4条回答
  • 2020-12-18 08:01

    Your view hierarchy should not look like this if you want to keep the tabBar.

    -> NavigationController -> TabBarController -> VC1 -> VC2

    You should change it to -> TabBarController -> NavigationController -> VC1 -> VC2

    0 讨论(0)
  • 2020-12-18 08:01

    First, you need to make sure that your VC1 to VC2 segue is in type (Show e.g. Push). Then you need to make sure that VC1 is embedded in a UINavigationController

    0 讨论(0)
  • 2020-12-18 08:11

    NavigationController->TabBarController->NavigationController->First View->Button Tapped->FirstDetailsViewController.storyboard(NavigationController check Is intital View Controller)

    0 讨论(0)
  • 2020-12-18 08:20

    You need to set TabBarContoller as rootViewController of the app. So scheme should be as follow:

    TabBarContoller -> Tab1 -> UINavigationController -> ViewContoller1 -> ViewContoller2.

    In such case you can navigate between ViewContoller1 and ViewContoller2 and TabBarContoller will remain visible.

    0 讨论(0)
提交回复
热议问题