xcode iPhone 图标大小

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

iPhone icon size

iphonexcodeicons

提问by Zaid Amir

I am developing an application for iPhone to support multiple devices, iPhone 2-4. I had an issue with the app icon as it was shown pixelated in the iPhone 4 simulatorso I have used a new image with higher resolution (300 x 300) to be precise. On the simulator its showing fine for both iPhone 4 and the iPhone device simulators. However, when I ported my app to an iPhone 3 actual device the icon did not show at all and instead I get a blank white icon. I don't have an iPhone 4 yet so I cant tell if the same issue will happen on the physical device.

我正在为 iPhone 开发一个应用程序来支持多种设备,iPhone 2-4。我遇到了应用程序图标的问题,因为它在 iPhone 4模拟器中显示为像素化,所以我使用了更高分辨率 (300 x 300) 的新图像来精确。在模拟器上,它对 iPhone 4 和 iPhone 设备模拟器都显示良好。但是,当我将我的应用程序移植到 iPhone 3 实际设备时,该图标根本没有显示,而是一个空白的白色图标。我还没有 iPhone 4,所以我不知道在物理设备上是否会发生同样的问题。

I am not sure what is the best dimensions/dpi to use for an icon to display perfectly on an iPhone 4 and older devices? Would appreciate a help if possible..

我不确定在 iPhone 4 和旧设备上完美显示图标的最佳尺寸/dpi 是多少?如果可能的话,将不胜感激。

回答by BoltClock

For older devices, save your 57x57icon as Icon.png. For the iPhone 4, save your 114x114icon as [email protected]. The image resolution doesn't matter at all; only the pixel dimensions matter.

对于较旧的设备,请将57x57图标另存为Icon.png. 对于 iPhone 4,将114x114图标另存为[email protected]. 图像分辨率根本不重要;只有像素尺寸很重要。

There are other sizes to cater to, like Spotlight/Settings icons and iPad icons. There's a full list written up in the library documentation.

还有其他尺寸可以满足,例如 Spotlight/设置图标和 iPad 图标。库文档中有完整的列表。

回答by Liam George Betsworth

As the iOS device range got a whole lot more complicated in recent years, here is a current list of icons and their requirements for each platform:

随着近年来 iOS 设备范围变得更加复杂,以下是当前的图标列表及其对每个平台的要求:

iOS 7+

iOS 7+

iPhone and iPod touch

iPhone 和 iPod touch

Both of these sizes are required:

这两种尺寸都是必需的:

120px x 120px
60px x 60px (standard resolution)

iPad

iPad

Both of these sizes are required:

这两种尺寸都是必需的:

152px x 152px
76px x 76px (standard resolution)

App Store

应用商店

Create a large version of your app icon in two sizes so that it looks good on all devices:

创建两种尺寸的大版本应用图标,使其在所有设备上看起来都不错:

1024px x 1024px
512px x 512px (standard resolution)
//Be sure to name this version of your app icon iTunesArtwork@2x and iTunesArtwork, respectively.

Spotlight search results on iPhone, iPod touch, and iPad (recommended)

在 iPhone、iPod touch 和 iPad 上聚焦搜索结果(推荐)

Create an icon in the following two sizes:

创建以下两种尺寸的图标:

80px x 80px
40px x 40px (standard resolution)

Settings on iPhone, iPod touch, and iPad (recommended /wSB)

iPhone、iPod touch 和 iPad 上的设置(推荐 /wSB)

Create an icon in the following two sizes:

创建以下两种尺寸的图标:

58px x 58px
29px x 29px (standard resolution)

iOS 6.1-

iOS 6.1-

iPhone Only

仅限 iPhone

Image(px)   File Name          Used For                          Required Status

512x512     iTunesArtwork      Ad Hoc iTunes                     Optional
1024x1024   iTunesArtwork@2x   Ad Hoc iTunes HiRes               Optional
57x57       Icon.png           App Store and Home screen         Required
114x114     [email protected]        Home screen iPhone 4/5            Optional
72x72       Icon-72.png        Home screen (iPad compatibility)  Optional
29x29       Icon-Small.png     Spotlight and Settings            Optional
50x50       Icon-Small-50.png  Spotlight (iPad compatibility)    Recommended(/wSB)
58x58       [email protected]  Spotlight and Settings iPhone 4/5 Recommended(/wSB)

iPad only

仅限 iPad

Image(px)   File Name          Used For                          Required Status

512x512     iTunesArtwork      Ad Hoc iTunes                     Optional
1024x1024   iTunesArtwork@2x   Ad Hoc iTunes HiRes               Optional
72x72       Icon-72.png        App Store and Home screen iPad    Required
144x144     [email protected]     App Store and Home screen HiRes   Optional
50x50       Icon-Small-50.png  Spotlight on iPad                 Optional
29x29       Icon-Small.png     Settings on iPad                  Recommended(/wSB)

Universal Apps

通用应用

Image(px)   File Name          Used For                          Required Status

512x512     iTunesArtwork      Ad Hoc iTunes                     Optional
1024x1024   iTunesArtwork@2x   Ad Hoc iTunes HiRes               Optional
57x57       Icon.png           App Store and Home screen         Required
114x114     [email protected]        Home screen iPhone 4/5            Optional
72x72       Icon-72.png        App Store and Home screen iPad    Required
144x144     [email protected]     App Store and Home screen HiRes   Optional
29x29       Icon-Small.png     Spotlight and Settings            Optional
50x50       Icon-Small-50.png  Spotlight iPad                    Recommended(/wSB)
58x58       [email protected]  Spotlight and Settings iPhone 4/5 Recommended(/wSB)

*(/wSB)= Recommended if you have a Settings bundle, otherwise optional but recommended

* (/wSB)= 如果您有设置包,则推荐,否则可选但推荐

回答by iwasrobbed

Red,

红色的,

Please follow these guidelines: http://developer.apple.com/iphone/library/documentation/userexperience/conceptual/mobilehig/IconsImages/IconsImages.html

请遵循以下指南:http: //developer.apple.com/iphone/library/documentation/userexperience/conceptual/mobilehig/IconsImages/IconsImages.html

I have not seen the pixelated issue on the iOS4 simulator like you did using an app that was originally written for iOS3+ with a standard 57x57 icon.

我还没有在 iOS4 模拟器上看到像素化问题,就像您使用最初为 iOS3+ 编写的带有标准 57x57 图标的应用程序一样。

回答by Andrew Hall

Ive put all the images named correctly at the correct size into a github repo, so there can be no confusion.

我已将所有以正确大小正确命名的图像放入 github 存储库中,因此不会出现混淆。

https://github.com/FattusMannus/iOS-Development-Image-Placeholders

https://github.com/FattusMannus/iOS-Development-Image-Placeholders

Just download them as a zip, edit them and copy them into your project

只需将它们下载为 zip,编辑它们并将它们复制到您的项目中

AH

回答by Zorayr

Make sure that "Icon.png" and "[email protected]" are capitalized or else the application archive will not pass the validation process.

确保“Icon.png”和“[email protected]”大写,否则应用程序存档将无法通过验证过程。

回答by tbone

You can set the various icon image names in the plist, under "icon files".

您可以在 plist 中的“图标文件”下设置各种图标图像名称。