如何显示启动图像 [英] How to display launch image
问题描述
我是iOS的新手. 我的Xcode版本是7.2.1,我正在尝试使用Swift在iOS9上运行. 我的问题是我对应该如何创建启动屏幕图像非常困惑. 我发现有很多方法可以为不同版本的iOS创建启动屏幕图像. 有人可以向我解释如何设置启动图像吗?
I'm a very new to iOS. My Xcode version is 7.2.1 and I'm trying to run on iOS9 using Swift. My problem is that I'm very confused with how I should be creating the Launch Screen Image. I found that there are many ways of creating the launch screen images for different version of iOS. Can someone please explain to me how to setup my launch images?
我遵循的过程是:
- 我创建启动Screen.storyboard ,我创建了不同大小的 在Photoshop中启动屏幕图像.
- 在常规"选项卡中,选择主界面"主要".
- 在应用程序图标和启动图像中>启动图像源"品牌资产".
- 我单击品牌资产"旁边的箭头,然后放置不同尺寸的图像. (iPhone- iOS 8,9,iPad- iOs 7-9(纵向和横向),iPhone纵向).
- 启动屏幕文件为"空".我什么也没选择.
- 毕竟我在iPhone 5模拟器上运行.它什么也没显示,只是黑屏出现.
- I create Launch Screen.storyboard I create different sizes of launch screen images in Photoshop.
- In General tab, Choose Main Interface "Main".
- In App icons and launch images> Launch images source "Brand Assets".
- I click on the arrow beside of Brand Assets, and then I put different sizes of images. (iPhone- iOS 8,9 , iPad- iOs 7-9 (Portrait and landscape), iPhone portrait).
- Launch Screen File is "empty". I didn't choose anything.
- After all I run on iPhone 5 simulator. It did not show anything and just black screen appear.
我想知道的一件事是,我需要在Launchscreen.storyboard
中放入一个UIImageView
吗?
它不是自动从Images.xcassets
文件夹中检索到的吗?
One thing I want to know is that do I need to put a UIImageView
in my Launchscreen.storyboard
?
Isn't it automatically retrieved from the Images.xcassets
folder?
推荐答案
开始新项目时,将获得LaunchScreen.storyboard,以下是您应遵循的步骤:
When you start a new project, you get LaunchScreen.storyboard below are the steps you should follow:
- 将图像视图放入LaunchScreen.storyboard中存在的视图控制器中
- 根据需要使用自动布局来调整图像视图.
- 选择图像视图,转到属性检查器并更改图像.
- 击中奔跑
这篇关于如何显示启动图像的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!