问题描述
所以我正在测试另一个 swift 项目,我想连接一个 TableViewController
,它有一个 NavigationController
使用bar按钮项和第二个 ViewController
ViewController 中>。当我控制 - 将按钮拖动到 ViewController
时,我只能得到以下选项:
So I was doing a test for another swift project and I wanted to connect a TableViewController
that had a NavigationController
embedded in to a regular ViewController
using a segue between a bar button item and the second ViewController
. When I control-drag the button to the ViewController
, I only get the following options:
根据我的理解,我应该看到很长的项目清单包括展示和展示细节。即使我用 push 或任何其他segue连接它们,如果我选择segue,我也无法选择show或show detail作为segue的类型。我究竟做错了什么?我没有对 ViewController.swift 进行修改。谢谢!
From what I understand, I should see a long list of items including show and show detail. Even if I connect them with push or any other segue, I can't select show or show detail as the type of segue if I select the segue. What am I doing wrong? I have not made modifications to ViewController.swift. Thanks!
推荐答案
新的自适应segue选项,show,show detail和present modally,以及popover presentation 仅在您使用尺寸等级时才可用。这是有道理的,因为如果你没有使用大小类,就不需要自适应segue。
The new adaptive segue choices, "show", "show detail", and "present modally", and "popover presentation" are only available if you're using size classes. This makes sense because there's no need for the segue to be adaptive if you're not using size classes.
这篇关于为什么我不能在xcode 6.1中使用show segue?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!