ios - 如何在不同 Storyboard 的标签栏上显示 Split View Controller ?

标签 ios uisplitviewcontroller uicontainerview uisplitview uisplitviewdelegate

下面是我的 Main.storyboard,它有标签栏 Controller 。我希望在其中一个选项卡中显示一个 Split View Controller 。 splitVC 在其他 Storyboard中,如第二张图所示

The below is my Main.storyboard and it is having tab bar controller. I wish to show a split view controller in one of the tabs of it. The splitVC is in other storyboard as shown in second picture

这是第二个 Storyboard,它有一个 Split View Controller 。

This is second storyboard which has a split view controller.

我无法使用以下方法在主 Storyboard中显示它: • 使用容器 View :我尝试以编程方式在容器 View 中显示 splitVC,但它抛出错误提示:ContainerView 必须在索引 1 处具有 View Controller (我尝试了容器 View ,如第一张图片所示。)

谁能建议在标签栏上显示它的最佳方式?或者如果我没有正确地使用容器方法?

最佳答案

嗨@Divjyot Answers here might help苹果建议 UISplitViewController 应该始终是 rootviewcontroller

这是苹果的笔记

You cannot push a split view controller onto a navigation stack. Although it is possible to install a split view controller as a child in some other container view controllers, doing is not recommended in most cases. Split view controllers are normally installed at the root of your app’s window. For tips and guidance about ways to implement your interface,

关于ios - 如何在不同 Storyboard 的标签栏上显示 Split View Controller ?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/38450947/

相关文章:

ios - 主 - 详细项目未按预期工作

ios - 从 Split ViewController 中的 Master ViewController 转到另一个 View Controller

swift - 如何在我的容器 View 上手动触发一个方法?

ios - 快速分段控制的容器 View

ios - 最佳编码实践 - 在同一函数中画线和圆 - 结构、开关、类函数

ios - NSDictionaryOfVariableBindings 快速等效?

ios - iPad 的 SplitView 和 iPhone 的菜单抽屉

ios - 从嵌入式 View Controller 执行父 segue

ios - iOS 的 Firebase 云消息本地化争论?

ios - 使用静态方法时如何获取特定实例