视图控制器“用作启动屏幕"之间的区别选项和启动屏幕故事板 [英] Difference between view controller "use as launch screen" option and launch screen storyboard

查看:26
本文介绍了视图控制器“用作启动屏幕"之间的区别选项和启动屏幕故事板的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我注意到位于 Main.Storyboard 中的视图控制器的文件检查器下有一个 Use as Launch Screen 选项.使用此方法将视图控制器启用为启动屏幕与使用 XCode 提供的 LaunchScreen.Storyboard 有什么区别?类似的问题是关于 Main.Storyboard 和 LaunchScreen.Storyboard 之间的区别,但没有具体询问 用作启动屏幕 选项.

I noticed there is a Use as Launch Screen option under File Inspector for a View Controller located in the Main.Storyboard. What is the difference between enabling the View Controller as a launch screen using this method and using the LaunchScreen.Storyboard that XCode provides? Similar questions are about the differences between Main.Storyboard and LaunchScreen.Storyboard but doesn't specifically ask about the Use as Launch Screen option.

推荐答案

区别在于 LaunchScreen.storyboard 有这个选项默认启用,但你可以:

The difference is that LaunchScreen.storyboard has this option enabled by default, but you can:

  • 使用初始视图控制器创建您自己的独立故事板

  • create your own separate storyboard with an initial view controller,

然后在项目设置(项目设置/常规/应用图标和启动图像/启动屏幕文件)中选择它作为您的应用的启动屏幕,

then select it as the launch screen for your app inside the project's settings (Project settings/General/App Icons and Launch Images/Launch Screen file),

...它也会以同样的方式工作.

...and it will also work in the same way.

Xcode 仅将启动屏幕放在不同的故事板中以保留有组织的视图结构.

Xcode only puts the launch screen in a different storyboard to preserve an organized view structure.

这篇关于视图控制器“用作启动屏幕"之间的区别选项和启动屏幕故事板的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆