如何使应用程序中的 iPhone 3GS 图标成为 iPhone-4 savvy
我有一个非常简单的问题,关于 iPhone 3/3GS 和 iPhone 4 之间屏幕尺寸的差异。我用谷歌搜索过,但无法找到一个很好的解释。
事情是这样的:标签栏图标。我所有的图标都是 30x30 和 60x60。我将高分辨率的命名为 [icon]@2x.png。当我在自己的 iPhone 3GS 上加载应用程序时,一切都很顺利。但是,当我在模拟器中加载应用程序并模拟具有视网膜显示屏的 4 时,图标看起来像素化,并且显然是错误的分辨率。
我做错了什么?这些是我遵循的确切步骤,但我可能遗漏了一些东西。我需要在 plist 中设置类似选项之类的东西吗?
非常感谢任何帮助!
亲切的问候,
雷德尔
I have a quite simple question concerning the difference in screen size between the iPhone 3/3GS and the iPhone 4. I've googled around, but was unable to come up with a good explanation.
Here's the thing: tabbar icons. All my icons are 30x30 and 60x60. I named the high resolution ones like [icon]@2x.png. When I load my app on my own iPhone 3GS, all goes fine. But when I load the app in Simulator, simulating a 4 with retina-display, the icon looks pixelated and is clearly the wrong resolution.
What am I doing wrong? These were the exact steps I followed, but I'm probably missing something. Is there something like an option I need to set in the plist?
Any help is greatly appreciated!
Kind regards,
Reinder
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
您需要根据需要命名图标并编辑 plist 文件
以下链接应该有所帮助
http://developer.apple.com/library/ios/#qa /qa2010/qa1686.html
确保清理和构建并从手机和模拟器中删除现有应用程序以查看结果
完整的图标大小集是
Icon.png – iPhone 3 的主屏幕图标 ( 57×57)
[电子邮件受保护] – iPhone 4 的主屏幕图标 ( 114×114)
Icon-72.png – iPad 的主屏幕图标 (72×72)
Icon-Small.png - iPhone 3 的设置/聚光灯图标 (29×29)
[电子邮件受保护] – iPhone 4 的设置/聚光灯图标 (58×58)
Icon-Small-50.png – iPhone 4 的聚光灯图标iPad (50×50)
iTunesArtwork – iTunes AdHoc 分发的图标 (512×512)
You need to name the icons as you have and edit your plist file
The following link should help
http://developer.apple.com/library/ios/#qa/qa2010/qa1686.html
Make sure you clean and build and remove the existing application from your phone and the simulator to see the results
The complete set of icon sizes distilled is
Icon.png – Home screen icon for iPhone 3 (57×57)
[email protected] – Home screen icon for iPhone 4 (114×114)
Icon-72.png – Home screen icon for iPad (72×72)
Icon-Small.png - Settings/Spotlight icon for iPhone 3 (29×29)
[email protected] – Settings/Spotlight icon for iPhone 4 (58×58)
Icon-Small-50.png – Spotlight icon for iPad (50×50)
iTunesArtwork – Icon for iTunes AdHoc distribution (512×512)
看来你的做法是正确的。您是否尝试从模拟器中删除该应用程序?清理项目?重新导入图标图像文件?
It seems that you're doing it the right way. Did you try to remove the app from the simulator? Clean up the project? Re-import the icon image files?
尝试(在模拟器停止的情况下)清理所有目标并重新构建。有时 xcode 对它所拥有的文件感到困惑,需要被告知清除其缓存的构建并重新开始。它位于“构建”菜单或 ctrl-shift-K 中。
Try (with the simulator stopped) cleaning all targets and re-building. Sometimes xcode gets dumb about what files it's got and needs to be told to clear its cached build and start fresh. It's in the "build" menu, or ctrl-shift-K.