如何在 UISplitViewController 中包含 UITabBarController?

发布于 2025-01-06 16:58:28 字数 256 浏览 4 评论 0原文

大家好, 我在 github 中找到了 这个 通用应用程序。他们的任何示例 iPad 应用程序是否与具有以下链接的链接相关:标签栏控制器。我想在纵向模式下创建一个 UISplitViewController,就像在带有 UITabBarController 的“设置”应用程序中一样。我该怎么做呢?请帮助我克服这个问题。提前致谢。

Hello every one,
I found this universal app in github.Is their any sample iPad app related to link which have tab bar controller. I want to make a UISplitViewController in portrait mode just like in the Settings app with the UITabBarController. How can I do it? Please help me to overcome this problem. thanks in advance.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

永言不败 2025-01-13 16:58:28

首先,根据 iOS 指南,SplitViewController 应该是应用程序的根视图控制器。因此从法律上讲,您不能在 tabBarController 上添加拆分视图控制器。至少包含 splitView 控制器的视图控制器必须位于窗口上或者必须是根视图控制器。

您必须将 tabBarController 设置为根视图控制器,并添加一个分割视图控制器作为 tabBar 的视图控制器之一。我已经成功尝试过

First of all, according to iOS guidelines a SplitViewController should be the root view controller of application. So legally you cannot add split View Controller on tabBarController. At least the view controller containing splitView controller must be on window OR must be root view controller

You will have to make tabBarController your root view controller and add a split view controller as one of the view controllers of tabBar. I have tried this successfully

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文