如何添加iPhoneX启动映像 [英] How to Add iPhoneX Launch Image

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

问题描述

使用Xcode版本9.0(9A235),我试图在请求的2436px×1125px(横向)上添加iPhoneX的启动图像。目前我使用的是Storyboard,它看起来像这样:





'launchimage'是链接到图像集的图像视图:





图像集如下:





我获得iPhoneX大小图像的唯一地方是启动图像集:





但是当我尝试选择Launch Im时故事板上的图像视图中的年龄无法选择:





有关如何为iPhoneX添加正确尺寸的启动图像的任何帮助,还是回到启动图像?我更喜欢正确尺寸的图像,而不是拉伸的图像。



更新:



我想解释一下为什么我希望图像与每个像素完全相同的像素。遵循



然后您可以这样做:





导致:





但是在构建时会收到警告:





所以哟你需要这个用于LaunchImage:





结果in:





并且没有警告。 ...并且LaunchImage适用于所有iPhone / iPad。



图像尺寸为:



iPhoneX(iPhone X风景iOS 11+):2436 x 1125



Retina HD 5.5(iPhone风景iOS 8,9):2208 x 1242



2x(iPhone Portrait iOS 7-9):640 x 960



Retina4(iPhone Portrait iOS 7-9):640 x 1136



1x(iPad版iOS 7-9):1024 x 768



2x(iPad版iOS 7-9): 2048 x 1536



系统明显凌乱,需要适当的r由Apple开发。


Using Xcode Version 9.0 (9A235), I am trying to add a Launch Image for iPhoneX at the requested 2436px × 1125px (landscape). Currently I am using a Storyboard and it looks like this:

'launchimage' is an Image View linked to an Image Set:

And the Image Set is as follows:

The only place I get an iPhoneX sized image is in a Launch Image set:

But when I try to select a Launch Image in the Image View on the storyboard it can't be selected:

Any help on how to add the correct sized launch image for iPhoneX or is it back to Launch Images? I would prefer the correct sized image, not a stretched one.

UPDATE:

I would like to explain why I want the image to be exactly the same pixel per pixel. Following the Guidelines in https://developer.apple.com/ios/human-interface-guidelines/icons-and-images/launch-screen/ my launch image is a static version of the first page of the App. If the Launch Image is stretched then there is a noticeable switch from Launch Image to First Page. Which sort of defeats the object of the guidelines. Apple recommend using a storyboard launch, but it seems you can't follow their guidelines if you do. Typical, really.

解决方案

Using Xcode Version 9.1 (9B55), thanks to the answers above (especially Stoull), however my experience is slightly different. My original question was basically: "How to get launch image (in storyboard or LaunchImage) which matches the bg of the first game scene without a rescaling blip on all resolutions?"

I have resolved this and it works using LaunchImage. However, there are complications.

Add a LaunchImage to the Assets folder, then specify it in the project settings:

Then you would expect to do this:

resulting in:

BUT on Build you get the warning:

so you need this for the LaunchImage:

resulting in:

and there is no warning.... and LaunchImage works on all iPhones/iPads.

The image sizes are:

iPhoneX (iPhone X Landscape iOS 11+) : 2436 x 1125

Retina HD 5.5" (iPhone Landscape iOS 8,9) : 2208 x 1242

2x (iPhone Portrait iOS 7-9) : 640 x 960

Retina4 (iPhone Portrait iOS 7-9) : 640 x 1136

1x (iPad Landscape iOS 7-9) : 1024 x 768

2x (iPad Landscape iOS 7-9) : 2048 x 1536

The system is clearly messy and needs a proper revamp by Apple.

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

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