如何为iPhone3设置普通图标,为iPhone 4设置Retina图标
我听说有一种解决方法,可以将以下文件添加到您的 xcode 项目中:
- Icon.png - 标准分辨率 iPhone 的 57x57 像素应用程序图标
- [电子邮件受保护] - 适用于高分辨率 iPhone 4 的 114x114 像素应用程序图标
- Icon-72.png - 适用于 iPad 的 72x72 像素应用程序图标
- Icon-Small.png - 适用于标准的 29x29 像素设置图标分辨率 iPhone
- [电子邮件受保护] - 高分辨率 iPhone
- 图标 的 58x58 像素设置图标-Small-50.png - iPad 的 50x50 像素设置图标
然后将 CFBundleIconFile 设置为“图标”(无扩展名)。
编译器会发出警告,因为您的图标没有扩展名。如果你只是忽略它 - 它会像魅力一样发挥作用 - 直到你想上传你的二进制文件!
如果您通过网络界面上传二进制文件,一切工作正常 - 但如果您使用“apploader”,由于缺少扩展名,它不会上传您的应用程序..
是否有一种已知的方法如何正确设置图标,以便您可以将其用于iPhone3和iPhone4?
iPhone 3.2 及更高版本有一个“CFBundleIconFiles”密钥 - 是否可以同时使用两者?
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
- [email protected] - 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
- [email protected] - 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?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
只需将
Icon
文件名设置为Icon.png
或从info.plist
文件中删除所有密钥,然后让操作系统完成工作你。它将根据设备选择正确的一个。只要
Icon.png
和[ email protected]
添加到应用程序包中,操作系统将加载正确的电子邮件。Just set the
Icon
filename toIcon.png
or delete the key all together from theinfo.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[email protected]
are added to the app bundle, the OS will load the correct one.请参阅 Apple 的技术问答 QA1686,其中描述了确切的命名每个设备所需的各种图标大小的约定、Info.plist 键和其他详细信息。
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.