iphone开发必知点之--app图标设置

来源:互联网 发布:mac移动硬盘不能写入 编辑:程序博客网 时间:2024/06/09 20:48

一、应用图标

ios3.2之前

不支持在Info.plist文件里指定图标,需要遵循苹果图标命名规范,如下

Icon.png        57x57     iphone          应用图标

Icon@2x.png       114x114     iphone(Retina显示屏)  应用图标

Icon-72.png       72x72      ipad            应用图标

Icon-72@2x.png    144x144    ipad(Retina显示屏)    应用图标

Icon-Small.png     29x29     iphone          系统设置和搜索结果图标

Icon-Small@2x.png    58x58     iphone(Retina显示屏)  系统设置和搜索结果图标 

Icon-Small-50.png    50x50    iPad            系统设置和搜索结果图标

Icon-Small-50@2x.png 100x100  ipad(Retina显示屏)    系统设置和搜索结果图标

ios3.2及之后~ios5.0之前

需要在Info.plist里设置,添加key为Icon files的值,分别添加上面对应图标名称,到列表,例如

相应的source code为

<key>CFBundleIconFiles</key><array>    <string>Icon-72.png</string>    <string>Icon-72@2x.png</string></array>

 

ios5.0及之后

需要在Info.plist里设置,添加key为Icon files (iOS 5)的值,分别添加上面对应的图标名称,到子项Primary Icon里面的Icon files列表里

例如:

其中,Icon already includes gloss effects设为YES,可以去除苹果为每个图标加上的默认高光

 

 

另外,xcode5下编译时, 去除高光还需一个步骤:

 

选中工程资源目录的APPIcon,在右侧栏勾选ios icon is pre-rendered

 

 

 

如果Icon files (iOS 5)下面有Newsstand icon项,如果不设置可以删除,否则有可能会报错

相应的source code为

复制代码
<key>CFBundleIcons</key><dict>    <key>CFBundlePrimaryIcon</key>    <dict>        <key>CFBundleIconFiles</key>        <array>            <string>Icon-72.png</string>            <string>Icon-72@2x.png</string>        </array>        <key>UIPrerenderedIcon</key>        <true/>    </dict></dict>
复制代码

如果开发的项目悲催的是:(1)可以跑iphone也可以跑ipad的应用(universal app)

(2)支持ios3.2之前版本到现在最新版本的所有版本

就需要以上的设置全部

 

二、iTunes应用商店展示图标

iTunesArtwork     512x512    iTunes    展示图标

名称为iTunesArtwork的png文件,但不许有后缀“.png”

 

三、启动画面默认图

iphone

Default.png        320 × 480             iphone(只有竖屏)        启动画面

Default@2x.png      640 × 960(或640x920)     iphone(Retina显示屏,只有竖屏) 启动画面

ipad2:

Default-Landscape.png  1024x768 (或1024x748)    ipad横屏              启动画面

Default-Portrait.png     768 × 1024(或768 × 1004)     ipad竖屏              启动画面

 ipad3:

Default-Landscape@2x~ipad.png  2048x1536(或2048x1496)  ipad(Retina显示屏,横屏)    启动画面

Default-Portrait@2x~ipad.png    1536x2048(或1536x2008)  ipad(Retina显示屏,竖屏)   启动画面

 

其中后面括号内的尺寸不包含状态栏

0 0