2011-12-16 95 views
1
<key>UINewsstandApp</key> 
<true/> 
<key>UINewsstandIcon</key> 
<dict> 
    <key>CFBundleIconFiles</key> 
    <array> 
     <string>images/AppIcon-114.png</string> 
    </array> 
</dict> 

我有一个图像位于图像/ AppIcon-114.png,它不会在我的应用程序的报摊上加载此图标。它显示像图标这样的默认纸张。iOS 5报亭应用程序图标

什么是相对路径?

+0

如果您暂时将png图标放入主文件夹(即与images文件夹相同的级别),并修改plist中的字符串数组,那么这是否解决了问题? – 2011-12-16 19:47:43

+0

不,它仍然显示默认图标。 – 2011-12-16 19:49:55

回答

5

我刚做了一个快速测试。在我的项目中,我将图标文件放在main.m所在的主应用程序目录中。它们被称为Icon.png和[email protected]用于应用程序图标,Newsstand-Cover-Icon.png和[email protected]

* .plist文件的CFBundleIcons部分(找到在主app目录中)看起来是这样的:

<key>CFBundleIcons</key> 
<dict> 
    <key>CFBundlePrimaryIcon</key> 
    <dict> 
     <key>CFBundleIconFiles</key> 
     <array> 
      <string>Icon.png</string> 
      <string>[email protected]</string> 
     </array> 
    </dict> 
    <key>UINewsstandIcon</key> 
    <dict> 
     <key>CFBundleIconFiles</key> 
     <array> 
      <string>Newsstand-Cover-Icon.png</string> 
      <string>[email protected]</string> 
     </array> 
     <key>UINewsstandBindingType</key> 
     <string>UINewsstandBindingTypeMagazine</string> 
     <key>UINewsstandBindingEdge</key> 
     <string>UINewsstandBindingEdgeLeft</string> 
    </dict> 
</dict> 

其他的*的.plist文件的相关部分被设置成这样:

<key>UIBackgroundModes</key> 
<array> 
    <string>newsstand-content</string> 
</array> 


<key>UINewsstandApp</key> 
<true/> 

您可能必须建立并启动设备上您的应用程序几次,在图书馆出现在报亭货架上之前。

您可以使用TextWrangler(免费),TextMate(付费)或MacVim(免费)等文本编辑器编辑* .plist文件。

希望这会有所帮助!

0

如果它仍然显示默认图标,即使.png文件位于正确的位置,某事告诉我您的图标格式不正确(很可能这不是正确的大小)。

检查出"App Icons" section of the iOS programming guide的图标大小。

而且也,在"Contents of the UINewstandIcon Icon Dictionary" documentation,它建议使用扩展名(即获得plist中的数组中摆脱.png位)。

+0

我可以让我的应用程序图标显示,但在报摊图标上有什么区别。我应该看到报亭图标而不是应用程序图标吗? – 2011-12-16 20:42:37