首页 > 代码库 > 应用程序图标
应用程序图标
A) App Icons
1. CFBundleIcons
icon名字随便取,但必须是PNG格式--系统根据icon大小选择最匹配的,而不是根据icon的名字
must reside in the top level of your app bundle. (Avoid using interlaced PNGs.)
使用CFBundleIcons键,最好省略文件扩展名--如果添加了扩展名,就必须明确地添加上所有icon的文件名称(包括每一个高分辨率图标)。当省略文件扩展名后,系统自动查找高分辨率icon文件,即使它们不在数组(CFBundleIcons的键值)中
如果app运行在iOS 3.1.3 or earlier,系统不会在Info.plist文件中查找icon--CFBundleIcons是在iOS 5.0上引入的,CFBundleIconFiles是在iOS 3.2上引入
2. Specific Filenames
(在iOS 3.1.3 and earlier中,必须使用特殊的命名格式)
- Icon.png--for the app icon on iPhone or iPod touch
- Icon-72.png--for the app icon on iPad
- Icon-Small.png--for the search results icon on iPhone and iPod touch/for the Settings icon on all devices
- Icon-Small-50.png--for the search results icon on iPad
固定的特殊命名格式只兼容iOS早期版本。即使使用这些固定的命名格式,app也应该在Info.plist中包含CFBundleIcons或者CFBundleIconFiles键值。
3. iTunesArtwork
Apps being distributed via ad-hoc distribution may also include a 512 x 512 pixel version of their icon in the CFBundleIcons key.
The name of this file must be iTunesArtwork and not have a filename extension.
The high resolution version of this icon should be 1024 x 1024 pixels and have the name iTunesArtwork@2x.
Do not include this icon in your app bundle if you are not distributing your app via ad-hoc distribution.
B) App Launch Images
Launch image的名字表达了它的目的和它如何使用
launch image推荐使用的命名格式:
<basename> <usage_specific_modifiers> <scale_modifier> <device_modifier> .png
<basename>--要么是Default,要么是UILaunchImageFile[Info.plist]中自定义值
<scale_modifier>--@2x(可选字符串),仅适配Retina显示屏的launch image
You must use these modifiers if your app targets iOS 6.1 or earlier.
如果app运行iOS 7 or later,Xcode会自动在info.plist上添加UILaunchImages键
Device | Portrait | Landscape | <basename> |
iPhone and iPod touch | 320 x 480 640 x 960(@2x) | Not supported | Default Default@2x |
iPhone 5 and iPod touch(5th) | 640 x 1136(@2x) | Not supported | Default-568h@2x |
iPad | 768 x 1024 1536 x 2048(@2x) | 1024 x 768 2048 x 1536(@2x) |
Launch Images for Different Orientations
在iOS 3.2 and later,iPad app可以提供横屏和竖屏的launch image
每个指定方向的launch image必须包含特定的修饰字符串,命名格式:
<basename> <orientation_modifier> <scale_modifier> <device_modifier> .png
<orientation_modifier>--used in iPad apps only
Modifier |
-PortraitUpsideDown |
-LandscapeLeft |
-LandscapeRight |
-Portrait |
-Landscape |
(none) |
No matter which launch image is displayed by the system, your app always launches in a portrait orientation initially and then rotates as needed to the correct orientation.
<device_modifier>--仅能在iOS 4.0 and later上识别
~ipad / ~iphone
Launch Images for Custom URL Schemes
In this case, the format for your launch image filenames are as follows:
<basename> -<url_scheme> <scale_modifier> <device_modifier> .png
<basename> -<url_scheme> <orientation_modifier> <scale_modifier> <device_modifier> .png