zoukankan      html  css  js  c++  java
  • What's the difference between all the Selection Segues

    relationship -A "relationship" segue is the segue between a container view controller and its child or children -- so, the initial controller of a navigation controller, the view controllers in the tabs of a tab bar controller, and the master and detail controllers of a split view controller.

    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

    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

    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 as a centered box overtop that darkens the underlying view controller and also animates up from the bottom
    Example: Tapping the + button in Calendar on iPhone

    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)

    embed -  An "embed" segue is the segue between a container view and the controller that's embedded in that container view that you get automatically when you add a container view to a controller's view.

    Custom - You may implement your own custom segue and have complete control over its appearance and transition.

    Note that you may see these segues termed as Selection Segues, Manual Segues, or Adaptive Segues. The deprecated segues are not adaptive for various devices. These segue types are deprecated in iOS 8: Push, Modal, Popover, Replace. They're basically the non-adaptive equivalent of those described above.

    Check out Building Adaptive Apps with UIKit, Session 216, that Apple presented at WWDC 2014. They talked about how you can build adaptive apps using these new Adaptive Segues, and they built a demo project that utilizes these segues.

    Both of these segues are executed as soon as the parent controller gets instantiated. You do not call them, but you can implement prepareForSegue, and pass information to the destination view controller.

  • 相关阅读:
    Azure 存储简介
    Databricks 第6篇:Spark SQL 维护数据库和表
    Databricks 第5篇:Databricks文件系统(DBFS)
    Databricks 第4篇:pyspark.sql 分组统计和窗口
    IDEA分析JAVA内存溢出和内存泄漏
    Caused by: org.h2.jdbc.JdbcSQLNonTransientConnectionException: Connection is broken: "session closed" [90067-200] 解决
    Java 中初始化 List 集合的 8 种方式!
    java list算法问题(给定一 int 数组返回倒序的最大连续递增的区间(至少大于等于2)数组倒序)
    uni-app知识点:页面滚动到指定位置(即锚点实现)、设置背景颜色backgroundColor无效的问题、导航栏设置角标及动态控制修改角标数字
    @Transactional注解为什么不生效
  • 原文地址:https://www.cnblogs.com/welhzh/p/4317224.html
Copyright © 2011-2022 走看看