使用故事板从MasterDetail iPad应用程序更改详细信息视图 [英] Change detail view from MasterDetail iPad app using storyboard
问题描述
我建议你使用替换segue 。
只需使用样式创建一个由您的行启动的所需视图的segue:替换和目的地:详细信息拆分。
在iOS 5 SDK中引入了Segues
编辑:
这些是完成所需工作的分步说明。
从现在开始:
- 应该按下以执行操作的项目(主视图中的按钮或行) )= *按钮;
- 您想要放置在iPad的详情视图中的视图= *详细信息。
为了便于说明,只需点名称
- 按住 ctrl 点击 *按钮,然后按住并拖动到 *详细信息并释放以创建您的segue。
- 在弹出式选择替换
- 选择您的segue,打开属性检查器并设置目的地到细节分割
这就是全部。
有关segues的更多信息: http://www.scott-sherwood。 com /?p = 219
I'm little lost here. I have a basic master-detail aplication, and I want to change the detail view according to the selected row in MasterViewController, but the views have different content, one has an image gallery, and the other one will load a video on full screen. It's not just refresh the detail view, have to load another view. How is the better(fast) way to do that?
I'll suggest you to use a replace segue.
Just create a segue to the desired view initiated by your row with a Style: Replace, and Destination: Detail Split.
Segues were introduced in the iOS 5 SDK
EDIT:
These are step-by-step instructions to accomplish what you need. From now on:
- the item that should be pressed for the action to take place (a button or row in master view) = *Button;
- the view you want to be placed in the iPad's detail view = *Detail.
just a bit for naming for ease of explanation
- Hold ctrl click on *Button then hold and drag to *Detail and release to create your segue.
- In the popup pick Replace
- Select your segue, open Attributes inspector and set Destination to Detail Split
That's all.
More on segues: http://www.scott-sherwood.com/?p=219
这篇关于使用故事板从MasterDetail iPad应用程序更改详细信息视图的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!