iOS 靜態載入畫面和圖示大小

每次要製作iOS 靜態載入畫面和圖示大小都得Google一番,在Slackoverflow遊一下花園才找到要找的東西……

還是乖乖的一post過寫下來,免煩。

   320x480(2x) ->   640x960: [email protected]~iphone.png
   320x568(2x) ->  640x1136: [email protected]~iphone.png
   375x667(2x) ->  750x1334: [email protected]~iphone.png
   414x736(3x) -> 1242x2208: [email protected]~iphone.png
  768x1024(1x) ->  768x1024: Default-Portrait~ipad.png
  1024x768(1x) ->  1024x768: Default-Landscape~ipad.png
  768x1024(2x) -> 1536x2048: [email protected]~ipad.png
  1024x768(2x) -> 2048x1536: [email protected]~ipad.png

另外,App Icon也可以在網上的工具,甚至是用Shell script從大圖 (至少1024 x 1024) 轉存出來:

FILE="largeicon.png"
# iTunes Artwork
sips --resampleWidth 1024 "${FILE}" --out "[email protected]"
sips --resampleWidth 512 "${FILE}" --out "iTunesArtwork.png"
# iPhone iOS 7, 8
sips --resampleWidth 58 "${FILE}" --out "[email protected]"
sips --resampleWidth 87 "${FILE}" --out "[email protected]"
sips --resampleWidth 80 "${FILE}" --out "[email protected]"
sips --resampleWidth 120 "${FILE}" --out "[email protected]"
sips --resampleWidth 120 "${FILE}" --out "[email protected]"
sips --resampleWidth 180 "${FILE}" --out "[email protected]"
# iPad iOS 7, 8
sips --resampleWidth 29 "${FILE}" --out "icon-ipad-29.png"
sips --resampleWidth 58 "${FILE}" --out "[email protected]"
sips --resampleWidth 40 "${FILE}" --out "icon-ipad-40.png"
sips --resampleWidth 80 "${FILE}" --out "[email protected]"
sips --resampleWidth 76 "${FILE}" --out "icon-ipad-76.png"
sips --resampleWidth 152 "${FILE}" --out "[email protected]"
# Apple Watch
sips --resampleWidth 48 "${FILE}" --out "[email protected]"
sips --resampleWidth 55 "${FILE}" --out "[email protected]"
sips --resampleWidth 58 "${FILE}" --out "[email protected]"
sips --resampleWidth 87 "${FILE}" --out "[email protected]"
sips --resampleWidth 80 "${FILE}" --out "[email protected]"
sips --resampleWidth 88 "${FILE}" --out "[email protected]"
sips --resampleWidth 172 "${FILE}" --out "[email protected]"
sips --resampleWidth 196 "${FILE}" --out "[email protected]"

About Author: