几种segue的使用场景

最为刚入门的菜鸟,我也有这同样的疑问,只是刚刚搜索其他问题时看到了这个疑问,赶紧收藏下来。

参考链接:http://stackoverflow.com/questions/26287247/does-anyone-can-explain-the-difference-between-segues-show-show-detail-presen

Refer this link

  1. Show - Pushes the destination view controller onto the navigation stack, moving the source view controller out of the way (destination slides overtop from right to left), providing a back button to navigate back to the source - on all devices.

Example: Navigating inboxes/folders in Mail.

  1. Show Detail - Replaces the detail/secondary view controller when in a UISplitViewController with no ability to navigate back to the previous view controller.

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.

  1. 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.

Example: Tapping the + button in Calendar on iPhone.

  1. 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.

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).

  1. Custom - You may implement your own custom segue and have complete control over its appearance and transition.
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值