如何显示启动图像 [英] How to display launch image

查看:125
本文介绍了如何显示启动图像的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是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?

我遵循的过程是:

  1. 我创建启动Screen.storyboard ,我创建了不同大小的 在Photoshop中启动屏幕图像.
  2. 在常规"选项卡中,选择主界面"主要".
  3. 在应用程序图标和启动图像中>启动图像源"品牌资产".
  4. 我单击品牌资产"旁边的箭头,然后放置不同尺寸的图像. (iPhone- iOS 8,9,iPad- iOs 7-9(纵向和横向),iPhone纵向).
  5. 启动屏幕文件为"".我什么也没选择.
  6. 毕竟我在iPhone 5模拟器上运行.它什么也没显示,只是黑屏出现.
  1. I create Launch Screen.storyboard I create different sizes of launch screen images in Photoshop.
  2. In General tab, Choose Main Interface "Main".
  3. In App icons and launch images> Launch images source "Brand Assets".
  4. 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).
  5. Launch Screen File is "empty". I didn't choose anything.
  6. 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:

  1. 将图像视图放入LaunchScreen.storyboard中存在的视图控制器中
  2. 根据需要使用自动布局来调整图像视图.
  3. 选择图像视图,转到属性检查器并更改图像.
  4. 击中奔跑

这篇关于如何显示启动图像的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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