简体   繁体   English

LaunchScreen.storyboard如何重定向到Main.storyboard

[英]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.storyboardMain.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.storyboardMain.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 和其他重定向到LaunchScreenMain.storyboard,您可以参考项目中的info.plist文件以及AppDelegate.hAppDelegate.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.

相关问题 LaunchScreen.storyboard无法打开Main.storyboard Navigation Controller - LaunchScreen.storyboard not opening Main.storyboard Navigation Controller iOS中的LaunchScreen.storyboard和Main.storyboard有什么不同? - what's different LaunchScreen.storyboard and Main.storyboard in iOS? launchscreen.storyboard和main.storyboard之间有什么区别 - What is the difference between launchscreen.storyboard and main.storyboard LaunchScreen.storyboard 和 Main.storyboard 的显示方式不同(iOS 13 / Swift 5) - LaunchScreen.storyboard and Main.storyboard displaying differently (iOS 13 / Swift 5) 错误:找不到构建输入文件:Xcode 中的 LaunchScreen.storyboard 和 Main.storyboard - error: Build input file cannot be found: LaunchScreen.storyboard and Main.storyboard in Xcode CompileStoryboard LaunchScreen.storyboard - CompileStoryboard LaunchScreen.storyboard 从LaunchScreen看到Main.Storyboard中的viewController? - Segue from LaunchScreen to a viewController in Main.Storyboard? LaunchScreen.storyboard和SwiftGif - LaunchScreen.storyboard & SwiftGif 没有出现LaunchScreen.storyboard中的UIImageView图像。 如何解决这个问题? - UIImageView image in LaunchScreen.storyboard does not appear. How to fix this? Xamarin Studio:LaunchScreen.storyboard不存在 - Xamarin Studio : LaunchScreen.storyboard does not exists
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM