ios 无法在 Xcode 6 的新故事板中设置初始视图控制器

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/26224171/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-31 03:02:49  来源:igfitidea点击:

No Way to Set Initial View Controller in New Storyboard in Xcode 6

iosxcode

提问by Clifton Labrum

Here's what I did in Xcode 6.0.1:

这是我在 Xcode 6.0.1 中所做的:

Step 1:Create a new project with a single view.

步骤 1:创建一个具有单一视图的新项目。

enter image description here

在此处输入图片说明

Step 2:Add an additionalstoryboard to the project.

第 2 步:向项目添加额外的故事板。

enter image description here

在此处输入图片说明

Step 3:Compare the original storyboard with the newly added one. Note how there is no arrow to designate the initial view controller. I can't find a way to add one, either.

第 3 步:将原始故事板与新添加的故事板进行比较。请注意没有箭头来指定初始视图控制器。我也找不到添加一个的方法。

enter image description hereenter image description here

在此处输入图片说明在此处输入图片说明

Is this expected behavior? Can you only have one initial view controller per application? I thought I could have one per storyboard.

这是预期的行为吗?每个应用程序只能有一个初始视图控制器吗?我以为每个故事板可以有一个。

Thanks in advance.

提前致谢。

回答by rob mayoff

Select the view controller, then use the “Is Initial View Controller”?checkbox in the attributes inspector.

选择视图控制器,然后使用属性检查器中的“Is Initial View Controller”?复选框。

initial view controller

初始视图控制器

回答by Rick Yuan

In Xcode 6.2, there is no longer an "Is Initial View Controller" checkbox in the attributes inspector. Instead, you set the initial view controller by adding the Storyboard Entry Point found in the Object Library.

在 Xcode 6.2 中,属性检查器中不再有“是初始视图控制器”复选框。相反,您可以通过添加在对象库中找到的 Storyboard 入口点来设置初始视图控制器。

回答by Bertl

"Is initial View Controller" is back in XCode 6.3.x.

“是初始视图控制器”又回到了 XCode 6.3.x 中。

回答by Fuad Kamal

In Xcode 6, use a "Storyboard Entry Point" from the object library. Drag the control onto the View Controller you wish to designate as the initial View Controller.

在 Xcode 6 中,使用对象库中的“故事板入口点”。将控件拖到您希望指定为初始视图控制器的视图控制器上。

回答by Ivan Zhang

The Story Entry Point does not exist in Object Library in Xcode 6.x, and cannot upgrade to Xcode 6.3.x for now in china.

在 Xcode 6.x 的 Object Library 中不存在 Story Entry Point,在china暂时无法升级到 Xcode 6.3.x。