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,可以去除蘋果為每個圖標加上的默認高光

 

 

另外,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顯示屏,豎屏)   啟動畫面

 

其中后面括號內的尺寸不包含狀態欄

 

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM