iPad SplitViewController 的使用 - 已经有分割视图后不允许推送 SplitViewController 的设计理念是什么?

发布于 2024-12-12 03:10:08 字数 914 浏览 0 评论 0原文

由于我刚刚开始开发 iPad 应用程序 &已经开始习惯 UISplitViewController(在 Storyboard 中)。我遇到的直接问题是,当我尝试从一个 splitViewController 跳转到另一个 splitViewController 时,我收到错误,并收到诸如以下错误:

  • “拆分视图控制器无法推送到导航控制器”和
  • “应用程序试图呈现一个拆分视图控制器模式”。

希望能得到一些关于在这里布局 iPad 应用程序方面的反馈 - 我的想法(可能是有缺陷的)如下:拥有一个应用程序,其中(a)用户可以选择的视图列表,(b)视图项目列表特定视图,将它们称为“项目”,以及 (c)“项目详细信息”。全部都是 TableViews... 将具有以下概念:

  • (a)第一个 SplitViewController - 在左侧有 ViewList,在右侧有 Items,以及
  • (b)第二个 SplitViewController - 在左侧有 ItemsList,在 信息
  • 因此,您会看到,如果在 (a) 上单击右侧窗格中的某个项目,这将触发用户,然后看到一个新的总体视图,其中 (b) 项目位于左侧,其中突出显示了按下的项目和详细 对于此项目右边的。如果您知道我的意思,则可以有效地将视图向左滑动...

通过将新的 SplitViewController 推到现有的视图上似乎不可能?我正在思考的问题是:

  • a) 我的上述要求概念对于 iPad 应用程序来说可以吗?如果不是,你会怎么做?
  • b) 如果是,您将如何实施这些?您是否必须坚持使用相同的 splitViewController 并以编程方式交换分配给它的 tableViewController,在这种情况下,您使用我在 XCode 4.2 中使用的 Storyboard 方法会失去页面流的可读性?

As I'm just starting to develop an iPad application & have started getting used to UISplitViewController (within Storyboard). The immediate issue I'm hitting is that I'm getting errors as I try to jump from one splitViewController to another, and getting errors such as:

  • "Split View Controllers cannot be pushed to a Navigation Controller " and
  • "Application tried to present a Split View Controllers modall".

Would appreciate some feedback in terms of laying out an iPad app here - my thinking (which perhaps is flawed) was as follows: Have an app with (a) list of views the user can select, (b) list of view items for a particular view, call them Items, and (c) Item Details. All are TableViews... Was going to have the concept of:

  • (a) 1st SplitViewController - has ViewList on left hand side and Items on right hand side, and
  • (b) 2nd SplitViewController- has ItemsList on left hand side and Item Details on right hand side
  • So you see if on (a) you click on an Item in the right hand pane, this would trigger the user then seeing a new overall view with (b) Items on the left, with the one pressed highlighted and the details for this item on the right. Effectively sliding the views across one to the left if you know what I mean...

This doesn't seem to be possible via pushing a new SplitViewController onto an existing one? Questions I am pondering are:

  • a) Is my requirements concept above ok for an iPad app? If not how would you do this?
  • b) If yes, how would you implement these? Do you have to stick with the same splitViewController and programmatically swap out the tableViewControllers allocated to it, in which case you kind of lose the readability of the page flow using the Storyboard approach I'm using in XCode 4.2?

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

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

发布评论

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

评论(1

-黛色若梦 2024-12-19 03:10:08

首先,根据 iOS 指南,SplitViewController 应该是应用程序的根视图控制器。因此,从法律上讲,您不能在导航控制器上推送拆分视图控制器。
但是,您可以根据您的要求设计自己的 splitview 尝试以下链接

此链接可能会有所帮助

https://github.com /grgcombs/IntelligentSplitViewController

https://github.com/SlavaBushtruk/APSplitViewController

https://github .com/mattgemmell/MGSplitViewController

First of all, according to iOS guidelines a SplitViewController should be the root view controller of application. So legally you cannot push split View Controller on navigation controller.
However, you can design your own splitview according to your requirement try following links

This link might be helpful

https://github.com/grgcombs/IntelligentSplitViewController

https://github.com/SlavaBushtruk/APSplitViewController

OR

https://github.com/mattgemmell/MGSplitViewController

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