xcode iPad Pro 启动图像和应用程序图标

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/32875678/
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-15 07:58:26  来源:igfitidea点击:

iPad Pro launch image and App icon

xcodeipadios9ios9.1xcode7.1

提问by Shiim

iPad Pro requires 167x167 App icon and 2732 x 2048 (landscape) launch image. But where should I put them? Xcode 7.1 Asset Catalogs don't provide any place to add iPad Pro specific icons or images.

iPad Pro 需要 167x167 的应用程序图标和 2732 x 2048(横向)的启动图像。但是我应该把它们放在哪里呢?Xcode 7.1 Asset Catalogs 不提供任何添加 iPad Pro 特定图标或图像的地方。

My launch image is size specific, so using storyboard for this isn't a good option.

我的启动图像是特定于尺寸的,因此为此使用故事板不是一个好的选择。

回答by Stan

Apple commented on this issue: "Latest beta (7.2b3) added 83.5@2x app icon slot to asset catalogs, and Developer relations reported in a radar comment that they no longer support launch images and will not be adding the iPad pro launch image size to asset catalogs."

Apple 对此问题发表评论:“最新测试版 (7.2b3) 在资产目录中添加了 83.5@2x 应用程序图标槽,开发者关系在雷达评论中报告说他们不再支持启动图像并且不会添加 iPad pro 启动图像大小到资产目录。”

Taken from here.

取自这里

回答by Slyv

Use Launch Screen storyboard.

使用启动屏幕故事板。

You can also disable Launch Screen File and Launch Images Source from project General settings and use the old way - define all Launch Images in Info.plist.

您还可以从项目常规设置中禁用启动屏幕文件和启动图像源,并使用旧方法 - 在 Info.plist 中定义所有启动图像。

Info.plist:

信息.plist:

<key>UILaunchImages</key>
<array>
    <dict>
        <key>UILaunchImageMinimumOSVersion</key>
        <string>8.0</string>
        <key>UILaunchImageName</key>
        <string>DefaultPro-Landscape</string>
        <key>UILaunchImageOrientation</key>
        <string>Landscape</string>
        <key>UILaunchImageSize</key>
        <string>{1366, 1024}</string>
    </dict>
...
</array> 

More info about UILaunchImages in Info.plist in this post: How do I create launch images for iPhone 6 / 6 Plus Landscape Only Apps?

在这篇文章中有关 Info.plist 中 UILaunchImages 的更多信息: 如何为 iPhone 6 / 6 Plus Landscape Only Apps 创建启动图像?

回答by MoLice

You should use Launch Screen Filesfor iPad Pro instead of Launch Images. First, from iPad Pro, iOS don't support Launch Images, so you can not find the right sizes for iPad Pro's launch images in Xcode 7.1. Second, if you don't use Launch Screen File, you app running on iPad Pro will be scaled, which is so called 'Display Zoom'.

您应该使用iPad Pro 的启动屏幕文件而不是启动图像。首先,从 iPad Pro 开始,iOS 不支持 Launch Images,因此您无法在 Xcode 7.1 中为 iPad Pro 的启动图像找到合适的尺寸。其次,如果您不使用 Launch Screen File,您在 iPad Pro 上运行的应用程序将被缩放,这就是所谓的“显示缩放”。

回答by archsten

It looks like you'll need to use the Launch Screen storyboard or xib file to support launch screens specific for iPad Pro.

看起来您需要使用 Launch Screen storyboard 或 xib 文件来支持特定于 iPad Pro 的启动屏幕。

Per Apple, you should be able to use both the launch image assets to support pre-iOS8, and the Launch Screen file for iOS8+. From the Apple App Distribution Guide:

对于 Apple,您应该能够使用启动图像资产来支持 iOS8 之前的版本,以及用于 iOS8+ 的启动屏幕文件。来自Apple App Distribution Guide

"For iOS 7 deployment targets, you can supply both a launch screen file and launch images. In iOS 8, the launch screen file is used, and in iOS 7, the launch images are used."

“对于 iOS 7 部署目标,您可以同时提供启动屏幕文件和启动图像。在 iOS 8 中,使用启动屏幕文件,而在 iOS 7 中,使用启动图像。”

also these docsstate:

这些文档还指出:

"If you also need to support earlier versions of iOS, you can continue to supply static launch images in addition to a launch file."

“如果您还需要支持早期版本的 iOS,除了启动文件之外,您还可以继续提供静态启动图像。”

However, in my case even though I have a LaunchScreen.storyboard file, it isn't getting used when I have launch images in an asset catalog. i.e.: I always see the asset catalog launch images instead of the launch screen. I verified the Launch Screen file is set in the info.plist and that it has the "Use as Launch Screen" flag set. I'm also using size classes and auto layout.

但是,就我而言,即使我有 LaunchScreen.storyboard 文件,当我在资产目录中启动图像时也不会使用它。即:我总是看到资产目录启动图像而不是启动屏幕。我验证了启动屏幕文件是在 info.plist 中设置的,并且它设置了“用作启动屏幕”标志。我也在使用尺寸类和自动布局。

回答by FrankV

If you don't find the "wells" where to put the icons in asset catalogue, perhaps you changed your App settings from iPhone to iPad at a later point and then the iPad "wells" are not visible. You can turn them on by doing this:

如果您没有找到在资产目录中放置图标的“井”,也许您稍后将应用程序设置从 iPhone 更改为 iPad,然后 iPad 的“井”不可见。您可以通过执行以下操作来打开它们:

The set will only contain image wells for icons that are relevant depending upon your project's configuration at the time the asset catalog was created. If an image well is missing, expand the settings inspector and check the appropriate boxesunder the App Icon pane depending upon your project's deployment target and supported devices.

该集合将仅包含与创建资产目录时项目配置相关的图标的图像井。如果缺少图像井,请展开设置检查器并根据项目的部署目标和支持的设备选中“应用程序图标”窗格下的相应框