我将 UITabBarController 从对象库拖到 Storyboard。
我想使用滑动手势识别器从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.
关于ios - 在 UITabBarController 内部,如何从一个 View Controller 切换到另一个 View Controller 并保留选项卡栏?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/44755603/