问题描述
Xcode 6中不同的segues有什么作用?
What do the different segues do in Xcode 6?
推荐答案
示例:浏览Mail中的收件箱/文件夹。
Example: Navigating inboxes/folders in Mail.
2。显示详细信息 - 在UISplitViewController中替换详细/辅助视图控制器,无法导航回上一个视图控制器。
2. Show Detail - Replaces the detail/secondary view controller when in a UISplitViewController with no ability to navigate back to the previous view controller.
示例:在邮件中iPad横向显示,点击侧边栏中的电子邮件会替换右侧的视图控制器以显示新电子邮件。
Example: In Mail on iPad in landscape, tapping an email in the sidebar replaces the view controller on the right to show the new email.
3。呈现模式 - 以Presentation选项定义的各种不同方式呈现视图控制器,覆盖以前的视图控制器 - 最常用于呈现从底部开始动画并覆盖iPhone上整个屏幕的视图控制器,但在iPad上,通常以中心框格式显示,使底层视图控制器变暗。
3. Present Modally - Presents a view controller in various different ways as defined by the Presentation option, covering up the previous view controller - most commonly used to present a view controller that animates up from the bottom and covers the entire screen on iPhone, but on iPad it's common to present it in a centered box format overtop that darkens the underlying view controller.
示例:点击iPhone上日历中的+按钮。
Example: Tapping the + button in Calendar on iPhone.
4。弹出式演示文稿 - 在iPad上运行时,目标显示在一个小的弹出窗口中,点击此弹出窗口外的任何位置都会将其关闭。在iPhone上,也支持弹出窗口,但默认情况下,如果它执行Popover Presentation segue,它将在整个屏幕上以模态方式显示目标视图控制器。
4. Popover Presentation - When run on iPad, the destination appears in a small popover, and tapping anywhere outside of this popover will dismiss it. On iPhone, popovers are supported as well but by default if it performs a Popover Presentation segue, it will present the destination view controller modally over the full screen.
示例:攻丝iPad上的日历中的+按钮(或iPhone,实现它转换为全屏显示而不是实际的弹出窗口)。
Example: Tapping the + button in Calendar on iPad (or iPhone, realizing it is converted to a full screen presentation as opposed to an actual popover).
5。自定义 - 您可以实现自己的自定义segue并完全控制其外观和过渡。
5. Custom - You may implement your own custom segue and have complete control over its appearance and transition.
- 改编自修订版2 。
— adapted from revision 2 of this Stack Overflow post.
这篇关于segues之间有什么区别:“show”,“show detail”,“present modally”,“present as popover”?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!