Xcode 或 iOS 不会在 iPad 上使用我的 Icon-72.png
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/3259857/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Xcode or iOS won't use my Icon-72.png on the iPad
提问by nicjohnson
I have created 3 files for the app icon: Icon.png, Icon-72.png, and [email protected]. [email protected] shows up fine on the actual iPhone 4. The simulator, however, only uses the 57px version. With the iPad neither the simulator nor the iPad itself uses the Icon-72.png file. Only the 57px version.
我为应用程序图标创建了 3 个文件:Icon.png、Icon-72.png 和 [email protected]。[email protected] 在实际的 iPhone 4 上显示良好。然而,模拟器只使用 57px 版本。对于 iPad,模拟器和 iPad 本身都不使用 Icon-72.png 文件。只有 57px 版本。
Help! :)
帮助!:)
回答by christophercotton
Did you add the icons to the Info.plist? You will need to make sure you added in an entry for "CFBundleIconFiles" and add each into the list. You can see it at the Apple Developer website with screenshots there:
您是否将图标添加到 Info.plist 中?您需要确保为“CFBundleIconFiles”添加了一个条目,并将每个条目添加到列表中。您可以在 Apple Developer 网站上看到它,并附有屏幕截图:
http://developer.apple.com/iphone/library/qa/qa2010/qa1686.html#IPHONEADDITEMS
http://developer.apple.com/iphone/library/qa/qa2010/qa1686.html#IPHONEADDITEMS
If you don't do that, it will only use the one icon.
如果你不这样做,它只会使用一个图标。
回答by Nick
If you want the iPad to pick up multiple icons without specifying their names, make sure CFBundleIconFile
(the singular of the other suggestion) is unset. If it's set to a particular icon file, that icon will always be used, regardless of which device you're on.
如果您希望 iPad 在不指定名称的情况下选择多个图标,请确保CFBundleIconFile
(其他建议的单数) 是unset。如果将其设置为特定的图标文件,则无论您使用哪种设备,都将始终使用该图标。
Though christophercotten is correct about the 3.2+ method for specifying multiple icon files, if they're different from the default values.
尽管 christophercotten 关于指定多个图标文件的 3.2+ 方法是正确的,但如果它们与默认值不同。
回答by lucius
This is what works for me across 6 different projects on iPhone and iPad. The Info.plist file has these entries:
这对我在 iPhone 和 iPad 上的 6 个不同项目中都有效。Info.plist 文件包含以下条目:
<key>CFBundleIconFile</key>
<string>Icon</string>
<key>CFBundleIconFiles</key>
<array>
<string>Icon.png</string>
<string>Icon-58.png</string>
<string>Icon-72.png</string>
<string>Icon-114.png</string>
<string>Icon-Small-50.png</string>
<string>Icon-Small.png</string>
</array>
Note that the CFBundleIconFile is set. I have had no problems with including it.
请注意,已设置 CFBundleIconFile。我在包含它时没有任何问题。
And the icon files are all in PNG format and have these file names and sizes:
并且图标文件都是 PNG 格式,并具有以下文件名和大小:
- Icon.png, 57px.
- Icon-58.png, 58px
- Icon-72.png, 72px
- Icon-114.png, 114px.
- Icon-Small.png, 29px.
- Icon-Small-50.png, 50px.
- 图标.png,57px。
- Icon-58.png, 58px
- Icon-72.png, 72px
- Icon-114.png, 114px。
- 图标-Small.png, 29px。
- Icon-Small-50.png, 50px。
Make sure your project is copying the icon PNG files to your app bundle for all targets. I'm building and linking against the iOS 4.0 SDK, with the Deployment target set to 3.1.3.
确保您的项目将图标 PNG 文件复制到所有目标的应用程序包中。我正在构建和链接 iOS 4.0 SDK,部署目标设置为 3.1.3。