[英]Removing gloss effect from an icon in iOS 4.3
我目前正在嘗試使用XCode 4從iOS圖標中刪除光澤效果。
我已將'Icon已包含光澤效果'(UIPrerenderedIcon)屬性設置為YES / true。
當我通過iPhone 5.0模擬器運行我的應用程序時,光澤效果已從圖標中成功刪除。
但是,當我通過iPhone 4.3模擬器運行應用程序時,光澤效果仍然可見。
誰能告訴我如何在兩個iOS版本中禁用光澤效果?
我的info.plist文件如下所示
<key>CFBundleIconFiles</key>
<array>
<string>Icon.png</string>
<string>Icon@2x.png</string>
<string>Icon-72.png</string>
</array>
<key>CFBundleIcons</key>
<dict>
<key>CFBundlePrimaryIcon</key>
<dict>
<key>CFBundleIconFiles</key>
<array>
<string>Icon.png</string>
<string>Icon@2x.png</string>
<string>Icon-72.png</string>
</array>
<key>UIPrerenderedIcon</key>
<true/>
</dict>
</dict>
清理您的構建,從模擬器/設備中刪除..! 它會工作
我有同樣的問題。 “CFBundleIcons”適用於iOS 5.0,“CFBundleIconFiles”適用於4.3.2和5.0。 4.3.2無法識別較新的“CFBundleIcons”圖標屬性。 我通過在頂層包含“UIPrerenderedIcon”= true來匹配“CFBundleIconFiles”數組來解決這個問題。 示例代碼中嵌套的“UIPrerenderedIcon”鍵僅適用於iOS 5.0。 如果要為4.3.2和5.0填寫字段,則應跳過“CFBundleIcons”。
我認為你的plist應該是這樣的(刪除“CFBundleIcons”數組):
<key>CFBundleIconFiles</key>
<array>
<string>Icon.png</string>
<string>Icon@2x.png</string>
<string>Icon-72.png</string>
</array>
<key>UIPrerenderedIcon</key>
<true/>
在此頁面上搜索“CFBundleIcons”: http : //developer.apple.com/library/IOs/#documentation/iPhone/Conceptual/iPhoneOSProgrammingGuide/App-RelatedResources/App-RelatedResources.html
技術文檔聲明您必須確保此值為布爾值而不是字符串文本“是”。 檢查您是否通過將plist視為源列表來定義正確的值。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.