在 UITabBarController 内部,如何从一个视图控制器切换到另一个视图控制器并保留选项卡栏?
Inside a UITabBarController how do I segue from one view controller to another and retain the tab bar?
我将一个 UITabBarController 从对象库拖到情节提要中。
我想使用滑动手势识别器从 firstViewController 滑动到另一个名为 CustomController 的 viewController,并在实例化时保留 CustomController 上的选项卡栏。
问题是,一旦从 firstViewController 执行了 segue 到 CustomController,标签栏就不再显示在 Custom Controller 的底部,并且它不会滑回 firstViewController。
这是我想要达到的结果。请告知最佳路线。
You can use ContainerView to view your view controller. when you
click on segment 1 you can set your firstviewcontroller to
containerview and when you click on segment 2 you need to replace customviewcontroller in containerview. you do like this you will not lose your tab bar viewcontroller. For Swipe gesture, you
can add it later if you want. Hope this can help you.
我将一个 UITabBarController 从对象库拖到情节提要中。
我想使用滑动手势识别器从 firstViewController 滑动到另一个名为 CustomController 的 viewController,并在实例化时保留 CustomController 上的选项卡栏。
问题是,一旦从 firstViewController 执行了 segue 到 CustomController,标签栏就不再显示在 Custom Controller 的底部,并且它不会滑回 firstViewController。
这是我想要达到的结果。请告知最佳路线。
You can use ContainerView to view your view controller. when you click on segment 1 you can set your firstviewcontroller to containerview and when you click on segment 2 you need to replace customviewcontroller in containerview. you do like this you will not lose your tab bar viewcontroller. For Swipe gesture, you can add it later if you want. Hope this can help you.