使用故事板从MasterDetail iPad应用程序更改详细信息视图 [英] Change detail view from MasterDetail iPad app using storyboard

查看:161
本文介绍了使用故事板从MasterDetail iPad应用程序更改详细信息视图的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在这里迷路了。我有一个基本的主 - 细节应用程序,我想根据MasterViewController中的选定行更改详细视图,但视图有不同的内容,一个有图像库,另一个将全屏加载视频。它不仅仅是刷新细节视图,还必须加载另一个视图。如何更好(快速)地做到这一点?

解决方案

我建议你使用替换segue



只需使用样式创建一个由您的行启动的所需视图的segue:替换目的地详细信息拆分



在iOS 5 SDK中引入了Segues



编辑:



这些是完成所需工作的分步说明。
从现在开始:




  • 应该按下以执行操作的项目(主视图中的按钮或行) )= *按钮;

  • 您想要放置在iPad的详情视图中的视图= *详细信息



为了便于说明,只需点名称


  1. 按住 ctrl 点击 *按钮,然后按住并拖动到 *详细信息并释放以创建您的segue。

  2. 在弹出式选择替换

  3. 选择您的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

  1. Hold ctrl click on *Button then hold and drag to *Detail and release to create your segue.
  2. In the popup pick Replace
  3. 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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆