[英]how does LaunchScreen.storyboard redirect to Main.storyboard
I'm newbie of iOS developer, and I know that is very simple question but I really can't understand reason. 我是iOS开发人员的新手,我知道这是一个非常简单的问题,但我真的无法理解原因。
when I build SingleViewApplication
, Xcode auto generate LaunchScreen.storyboard
and Main.storyboard
, 当我建立SingleViewApplication
,Xcode的自动生成LaunchScreen.storyboard
和Main.storyboard
,
but I can't find any code like [self.navigationController pushViewController:]
which may choose that what view controller enter stack as last one of top-level view, 但我找不到像[self.navigationController pushViewController:]
那样的代码,它可以选择哪个视图控制器进入堆栈作为顶级视图的最后一个,
I only find ViewController.{h,m}
as first and see no logic that change view from LaunchScreen.storyboard
to Main.storyboard
. 我只能找到ViewController.{h,m}
作为第一和看不到逻辑改变视图从LaunchScreen.storyboard
到Main.storyboard
。
could anyone help? 有人可以帮忙吗? thanks.. 谢谢..
Main.storyboard file and LaunchScreen is define in your project property. Main.storyboard文件和LaunchScreen在项目属性中定义。 you can find it by click on project in xcode and then in below target you can find this two name you can choose your own by selecting dropdown given beside label. 您可以通过单击xcode中的项目找到它,然后在下面的目标中找到这两个名称,您可以通过选择标签旁边的下拉列表来选择自己的名称。
and other redirecting to LaunchScreen to Main.storyboard you can refer info.plist file in your project and also AppDelegate.h and AppDelegate.m 和其他重定向到LaunchScreen到Main.storyboard,您可以参考项目中的info.plist文件以及AppDelegate.h和AppDelegate.m
Most probably the iOS first looks for LaunchScreen.storyboard file and shows it for some time and when it is done with it, it looks for Main.storyboard. 很可能iOS首先查找LaunchScreen.storyboard文件并显示它一段时间,当它完成后,它会查找Main.storyboard。
These names are hardwired in the plist as mentioned by Tejas in his answer and you can change these. 正如Tejas在他的回答中所提到的那样,这些名字在plist中是硬连线的,你可以改变它们。
I don't think the the LaunchScreen.storyboard
is pushing the Main.storyboard
. 我不认为LaunchScreen.storyboard
正在推动Main.storyboard
。 Everything is managed behind the scenes and you can't change this behavior. 一切都在幕后管理,你不能改变这种行为。
What you can change is the initial View Controller
in your Main.storyboard
so that it is instantiated immediately after the LaunchScreen.storyboard
disappears and the app is fully loaded. 您可以更改的是Main.storyboard
的初始View Controller
,以便在LaunchScreen.storyboard
消失且应用程序完全加载后立即实例化。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.