swift - XCode Swift : How to create a Tab Bar between 2 View Controllers, 如果 1 已经通过 Split View Controller 连接到另一个 View Controller?

标签 swift xcode uinavigationcontroller uitabbarcontroller uisplitviewcontroller

我是 Xcode 的新手,如果我犯了初学者的错误,我深表歉意。

最近,我从 website 下载了一个示例项目对于 Xcode Swift。

它有一个 Split View Controller ,用于连接 TableView Controller 和显示巧克力信息的 View Controller 。

Click here to view how the sample project's main storyboard looks like.

我想使用标签栏 Controller 将 TableView Controller 与新 View Controller 连接起来。我试图将它们都嵌入到单独的导航 Controller 中,它们都连接到选项卡栏 Controller 。我已尝试这样做,如下所示:

Click here to view how I have tried to create a Tab Bar between the Table View Controller and the New View Controller.

但是,每当我尝试启动该应用程序时,该应用程序就会崩溃。错误消息与 Split View Controller 有关,但我不确定我做错了什么。

有人可以从上面网站的链接下载示例项目并尝试帮助我在 TableView Controller 和新 View Controller 之间创建一个标签栏吗?

非常感谢!

最佳答案

您是否尝试过将选项卡嵌入到导航 Controller 中。 (除了你有一些选项卡而不是 tableView Controller 外,还有示例项目吗?

-> Split
    -> Nav
        -> Tabs
            -> Table1
            -> Table2
    -> Nav
        -> Detail

关于swift - XCode Swift : How to create a Tab Bar between 2 View Controllers, 如果 1 已经通过 Split View Controller 连接到另一个 View Controller?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/49336295/

相关文章:

ios - 创建波浪可视化视频 Swift

ios - Xcode:使用不同的选项运行两次测试

iphone - Ipad/Iphone 版本,2 个目标,1 个代码库

iphone - 带有模态 UIViewController 的透明背景

swift - 如何提取 PHAsset 的 Location 属性?

ios - Swift CocoaPod 可点击但 Xcode 找不到

swift - 使用照片框架将带有名称的图像保存到相册

ios - 设置 contentInset 时 UINavigationBar 自动折叠

ios - 将 UISearchBar 添加到嵌入到 NavigationController IOS6 中的 UICollectionviewController

ios - 在 UINavigationBar 中单击 "Back"按钮时 UIScrollView 滚动