Xcode6中segue取消原push与modal选项后新增选项的解释

转载请注明出处

http://blog.csdn.net/shuai1iu/article/details/41186819


答案源于StackOverFlow


push与modal被弃用后,分别被新的show与present modally取代,根据苹果文档,这些新segues更进一步的划分了其适应的类,旧有的push与Modal将仅可用于iOS8以下的版本。


下面链接指向的苹果文档给出了各种可用segues的详细解释,包括新旧各个选项


Adding a Segue Between Scenes in a Storyboard


为避免这个URL在未来发生变化,摘录文档内容如下


Show

根据当前屏幕中的内容,在master area或者detail area中展示内容。

例如:如果app当前同时显示master和detail视图,内容将会压入detail区域。

           如果app当前仅显示master或者detail视图,内容则压入当前视图控制器堆栈中的顶层视图。


Show Detail

在detail area中展现内容。

例如:即使app同时显示master和detail视图,那么内容将被压入detail区域

           如果app当前仅显示Master或者detail视图,那么内容将替换当前视图控制器堆栈中的顶层视图。


Present Modally

使用模态展示内容。属性面板中提供presentation style (UIModalPresentationStyle)与 transition style (UIModalTransitionStyle)两种选项


Present as Popover

在某个现有视图中的锚点处使用弹出框展示内容。这个选项可指定显示在弹出框视图一边上的箭头可用方向,同时也是指定锚点视图的一个选项。


=======================翻译水平有限,以下是原文====================================

As was mentioned before the "push" and "modal" segues were deprecated, and have been replaced by "show" and "present modally" respectively. According to Apple's documentation, the new segues have been further divided into segues that adapt to size classes. The older ones should only be used to support iOS versions older than iOS 8.

The document in the following link explains that and the description of all the available segues, old and new.

Adding a Segue Between Scenes in a Storyboard

In case the URL changes in the future, this is the explanation given for each new segue:

Show

Present the content in the detail or master area depending on the content of the screen. If the app is displaying a master and detail view, the content is pushed onto the detail area. If the app is only displaying the master or the detail, the content is pushed on top of the current view controller stack.

Show Detail

Present the content in the detail area. If the app is displaying a master and detail view, the new content replaces the current detail. If the app is only displaying the master or the detail, the content replaces the top of the current view controller stack.

Present Modally

Present the content modally. There are options to choose a presentation style (UIModalPresentationStyle) and a transition style (UIModalTransitionStyle).

Present as Popover

Present the content as a popover anchored to an existing view. There is an option to specify the possible directions of the arrow shown on one edge of the popover view (UIPopoverArrowDirection). There is also an option to specify the anchor view.


  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 2
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值