在 "Show" 和 "ShowDetail" 之间更改故事板 segue `kind`:为什么更改在 运行 模拟器时不生效?

Changing storyboard segue `kind` between "Show" and "ShowDetail": why does the change not take effect when running the simulator?

首先请注意,这不是关于"how to finish my app?""why is my app not working?"的问题,而是涵盖了我在玩一个简单的应用程序时偶然发现的一个问题,我无法为我的世界解释。也许 SO 的某个人可以解释为什么会出现这个明显的问题。


为了学习,我一直在玩一个简单的应用程序,其中包含一个 UITableViewController 嵌入在一个 Navigation Controller 中。从 table 视图单元格(UITableViewCell 的子类)可以导航到一个简单的 UIViewController。请参阅下面的应用程序故事板概述,请注意,这显示了在 table 视图单元格与视图控制器之间设置 segue 转换之前应用程序的状态(开发)。

现在,在我的应用程序中,我在 table 视图单元和视图控制器之间测试了两种不同类型的转场,即

  1. A "Show" 从单元格到视图控制器,as can be seen in this gif。
  2. A "ShowDetail" 从单元格到视图控制器,as can be seen in this gif。

基于 Apple documentation on storyboard segues,我预计,当 运行 应用程序时,我的应用程序的视图控制器部分会出现以下行为:

上述情况 1. 和 2. 分别产生了它们的预期结果,即行为 (A) 和 (B)。

现在我无法解释的部分:

  1. 我将我的 segue 设置为 "Show",然后在属性检查器中将 segue 更改为类型 "ShowDetail"、as can be seen in this gif。更改后,情节提要中的一切看起来都很好(视图控制器中没有导航控制器栏),但是当 运行 应用程序时,我仍然得到行为 (A),即 [=91= 预期的行为] 继续。
  2. 如果我反之亦然;创建一个 "ShowDetail" segue 并通过属性检查器(as can be seen in this gif)更改为 "Show",我得到了同样的意外(对我来说)行为,即行为(B),即预期的行为对于 "ShowDetail" segue(无导航控制器栏)

我还可以通过记录以下布尔值来跟踪同样的意外行为:

// In the ViewController code (ViewController.swift)
let presentingViewIsNavigationController = 
    presentingViewController is UINavigationController

问题:为什么segue种类的改变"Show" to/from "ShowDetail"---在属性检查器中执行--- 运行app在模拟器中貌似没有生效?

我在模拟器中运行Xcode7.2,iOS9.2(模拟一个iPhone6s plus)

我在测试时发现的一个 segue 问题是当您更改 segue 种类时 action 属性不会改变:

<segue destination="YYV-02-abX" kind="show" identifier="segueshow" id="X7i-33-rvh"/>
<segue destination="YYV-02-abX" kind="showDetail" identifier="segueshowdetails" id="crf-TU-94x"/>
<segue destination="YYV-02-abX" kind="showDetail" identifier="segueshowtoshowdetails" action="showViewController:sender:" id="w2L-45-p7H"/>
<segue destination="YYV-02-abX" kind="show" identifier="segueshowdetailstoshow" action="showDetailViewController:sender:" id="7Z4-mJ-Pbh"/>

所以这可能是 Apple 方面的一个错误。