您的位置:首页 > 移动开发

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

2013-02-27 11:42 218 查看




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

一、应用图标
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,可以去除苹果为每个图标加上的默认高光
如果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显示屏,竖屏)   启动画面

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

内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: