为什么 XCode 会显示启动图像警告?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/8374024/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-14 22:39:54  来源:igfitidea点击:

Why does XCode show launch image warnings?

iphoneiosxcodeipadxcode4

提问by TigerCoding

I get the following warnings in my iPad launch images, but not the iPhone images:

我在 iPad 启动图像中收到以下警告,但在 iPhone 图像中没有:

launch images ipad

启动图像 ipad

I can't find the text related to the warnings anywhere.

我在任何地方都找不到与警告相关的文本。

Here are my plist settings:

这是我的 plist 设置:

plist ipad images

plist ipad 图片

And my image files:

还有我的图像文件:

image file names

图像文件名

When I tried "Default-iPad.png" it didn't fix it either.

当我尝试“Default-iPad.png”时,它也没有修复。

The image dimensions are 768 x 1024 (portrait) and 1024 x 768 (landscape).

图像尺寸为 768 x 1024(纵向)和 1024 x 768(横向)。

回答by Matthias Bauch

Make your mouse cursor hover over the warning sign and the warning should appear.

将鼠标光标悬停在警告标志上,应该会出现警告。

It'll tell you that iPad Launch Images should be 768 x 1004 and 1024 x 748
That means you have to remove the status bar from the image.

它会告诉你 iPad 启动图像应该是 768 x 1004 和 1024 x 748
这意味着你必须从图像中删除状态栏。

回答by B-Money

Here's the deal for launch images which work for all iPads.This should tell you exactly what to do and what you need. You need four images, either the first group or the second one, depending on if your app is set to show the top status bar or not. Notice that the names are the same whether your image has room for the status bar or not.

这是适用于所有 iPad 的启动图像的交易。这应该会准确地告诉您该做什么以及您需要什么。您需要四张图片,第一组或第二组,具体取决于您的应用是否设置为显示顶部状态栏。请注意,无论您的图像是否有用于状态栏的空间,名称都是相同的。

Description : image width x height - image name

描述:图像宽度 x 高度 - 图像名称



iPad - with status bar turned ON (shows wifi connection, time, etc)

iPad - 状态栏打开(显示 wifi 连接、时间等)

Portrait : 768x1004 - Default-Portrait.png

人像:768x1004 - 默认-Portrait.png

Landscape : 1024x748 - Default-Landscape.png

景观:1024x748 - 默认-Landscape.png

Portrait Retina : 1536x2008 - [email protected]

人像视网膜:1536x2008 - 默认-人像@2x.png

Landscape Retina : 2048x1496 - [email protected]

风景视网膜:2048x1496 - 默认风景@2x.png



iPad - with status bar turned OFF (more screen real estate)

iPad - 状态栏关闭(更多屏幕空间)

Portrait : 768x1024 - Default-Portrait.png

人像:768x1024 - 默认-Portrait.png

Landscape : 1024x768 - Default-Landscape.png

风景:1024x768 - 默认风景.png

Portrait Retina : 1536x2048 - [email protected]

人像视网膜:1536x2048 - 默认-人像@2x.png

Landscape Retina : 2048x1536 - [email protected]

风景视网膜:2048x1536 - 默认风景@2x.png

回答by codingFriend1

You can either resize your images to be 20px smaller in height, or you can make the status bar hide during app launch.

您可以将图像大小调整为高度减小 20 像素,也可以在应用启动期间隐藏状态栏。

In new versions of XCode (I use 4.5.2), there is a checkbox to hide the status bar in the Project > Target > Summarysettings, right above the launch image previews:

在新版本的 XCode(我使用 4.5.2)中,有一个复选框可以隐藏Project > Target > Summary设置中的状态栏,就在启动图像预览的正上方:

enter image description here

在此处输入图片说明