加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 百科 > 正文

ios – segue之间有什么区别:“show”,“show detail”,“prese

发布时间:2020-12-15 01:51:58 所属栏目:百科 来源:网络整理
导读:Xcode 6中不同的segues有什么作用? 解决方法 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
Xcode 6中不同的segues有什么作用?

解决方法

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.

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

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.

Example: Tapping the + button in Calendar on iPhone.

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.

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. Custom – You may implement your own custom segue and have complete control over its appearance and transition.

– 改编自this Stack Overflow post的修订版2.

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读