检测indexPath行并将新的视图控制器推送到分割视图控制器
我有一个拆分视图控制器,左侧有一个表格,右侧有一个空的详细视图控制器。对于 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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
为此,您需要确保拆分视图控制器的详细信息侧有一个 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.
您可以在此处查看此示例
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
您是否尝试过直接访问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..