开发者

How to setup normal Icon for iPhone3 and Retina for iPhone 4

I heard somewhere of an workaround by adding the following files to your xcode project:

  • Icon.png - 57x57 pixels application icon for standard resolution iPhone
  • Icon@2x.png - 114x114 pixels application icon for high resolution iPhone 4
  • Icon-72.png - 72x72 pixels application icon for iPad
  • Icon-Small.png - 29x29 pixels settings icon for standard resolution iPhone
  • Icon-Small@2x.png - 58x58 pixels settings icon for high resolution iPhone
  • Icon-Small-50.png - 50x50 pixels settings icon for iPad

Then setup your CFBundleIconFile to "Icon" (without extention).

The compiler will put a warning because your icon does not have an extention. If you just ignore it - it will work like a charm - UNTIL YOU WANT TO UPLOAD YOUR BINARY!

If you upload your binary through webinterface everything is working开发者_运维问答 fine - but if you use the "apploader" it will not upload your app because of the missing extention..

is there a known way how to setup correctly the icons so you can use it for iPhone3 and iPhone4?

There is a "CFBundleIconFiles" Key for iPhone 3.2 and later - is it possible to use both?


Just set the Icon filename to Icon.png or delete the key all together from the info.plist file and let the OS do the work for you. It will select the correct one based on the device.

As long as both an Icon.png and an Icon@2x.png are added to the app bundle, the OS will load the correct one.


See Apple's Technical Q&A QA1686 which describes the exact naming conventions, Info.plist keys, and other details for the various icon sizes required for each device.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜