Xcode 如何更改启动时首先加载的 viewController

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/15840449/
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-09-15 03:08:37  来源:igfitidea点击:

Xcode how to change which viewController loads first at start-up

xcodeuiviewcontrollerstoryboard

提问by mablecable

I am using storyboards, xcode 4.6.1. I have created an app, but now I want to go back and add a new view controller to the beginning. How do I assign this view controller to be the first one to load up at run-time?

我正在使用故事板,xcode 4.6.1。我已经创建了一个应用程序,但现在我想返回并在开头添加一个新的视图控制器。我如何将这个视图控制器分配为第一个在运行时加载的控制器?

回答by u.gen

Choose your viewcontroller in storyboard , click show the attributes inspector

在情节提要中选择您的视图控制器,单击 show the attributes inspector

and choose initial scene: is initial view controller

并选择 initial scene: is initial view controller

enter image description here

在此处输入图片说明

回答by yoAlex5

Xcode 10.3

Xcode 10.3

Storyboard -> View Controller

Show Inspectors -> Show the Attributes inspector -> Is Initial View Controller

It will update the Initial view controller in the same .storyboard.

它将更新同一个 .storyboard 中的初始视图控制器。