检测indexPath行并将新的视图控制器推送到分割视图控制器

发布于 2024-10-07 08:44:31 字数 147 浏览 0 评论 0原文

我有一个拆分视图控制器,左侧有一个表格,右侧有一个空的详细视图控制器。对于 iPhone,我知道可以将视图控制器和笔尖推送到导航堆栈中。我想知道在用户点击表格单元格后是否可以在详细视图上推送视图控制器+笔尖。 我尝试简单地在用户点击详细视图后推送我所拥有的视图,但是没有任何反应。

I have a split view controller that has a table on the left hand side, and a empty detail view controller on the right had side. For iphone, I know its possible to push a view controller and a nib in a navigational stack. I want to know if its possible to push a view controller + nib on the detail view, after a user taps the table cell.
I tried simply pushing the view i have after a user taps to the detail view, however nothing happens.

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

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

发布评论

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

评论(3

み青杉依旧 2024-10-14 08:44:31

为此,您需要确保拆分视图控制器的详细信息侧有一个 UINavigationController。您可以将导航控制器设置为包含拆分视图的笔尖中的详细信息项。您可以将导航控制器设置为拆分视图委托,并使用委托属性将视图推送到堆栈上,以响应根视图端发生的事件。

To do this you'll need to make sure you have a UINavigationController on the detail side of your split view controller. You can set a navigation controller as the detail item within the nib that contains the split view. You can set the navigation controller as the split view delegate and use the delegate property to push views onto the stack in response to events happening on the root view side.

情魔剑神 2024-10-14 08:44:31

您可以在此处查看此示例

http:// developer.apple.com/library/ios/#samplecode/MultipleDetailViews/Introduction/Intro.html

并在分割视图的详细视图中创建导航控制器,请在此处检查示例

http://www.cimgf.com/2010/05/24/fixing-the-uisplitviewcontroller-template/

我想这会对你有帮助

ya u can do that check out this example here

http://developer.apple.com/library/ios/#samplecode/MultipleDetailViews/Introduction/Intro.html

and to make navigation controller in detailview of split view check example here

http://www.cimgf.com/2010/05/24/fixing-the-uisplitviewcontroller-template/

i think it will help you

请你别敷衍 2024-10-14 08:44:31

您是否尝试过直接访问developer.apple.com并使用Apple的标准示例,这正是您所说的?

单元 1 = 加载 Xib1

单元 2 = 加载 Xib2。

也许可以尝试一下..

Have you tried just going to the developer.apple.com and use the standard example from Apple, which does exactly what ur saying?

Cell 1 = loads Xib1

Cell 2 = loads Xib2.

Maybe give that a go..

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