English 中文(简体)
XCode 中更改目标图标
原标题:Change Icon of Target in XCode
  • 时间:2012-05-25 14:22:50
  •  标签:
  • ios
  • xcode

昨天我注意到我的目标突然有了图标(而不是默认的 A 图标 ) 。 然而,我无法确定修改它时的设置是什么, 它现在又恢复到默认。 我将Info. plist 中的所有图标设置都更改为无效 。

最佳回答

您是否在您的项目根文件夹中添加了 < engeneráccode> icon. png ? 我认为这样行得通 。

问题回答

重置目标图标

  • try to find in the project all the images with the icon name from info.plist;
  • check the files Target Membership (File Inspector section)

它们不必在工程根中。 如果在不同的工程文件夹中存在多个图标文件, 每个图标都是它自己目标的一部分, 那么您就会有不同的目标图标, 其图标名称相同( 当然, 唯一的图标文件会被复制到捆绑根 ) 。

在 TRARGET-info.plist 中,添加密钥“强” Icon 文件

值应该为“ icon. png ”, 除非您的图标名称不同 。

""https://i.sstatic.net/H5J5q.png" alt="此处输入图像描述"/ >

The issue has to do with the Info.plist not being created correctly initially. When the app icons are set in the Summary Tab, it writes to Icon Files (iOS5) Dictionary in the TARGET-Info.plist (Raw Key: CFBundleIcons). While this is recognized on devices and the simulator to store the icon information, it is not understood by XCode. Instead, we need to rename this key to Icon Files (Raw Key: CFBundleIconFiles). Renaming this will reset the app icons to be empty, so drag the icon files into their respective spots on the summary tab. Now, the icons will be set for the Target and Product (if the Product icon is not showing, Build and Restart XCode).

然后回到 Info.plist 上, 您将会看到 BOTH CFBundlincons (iOS 5) 和 CFBundlincon Files (又称为 UIPrendered Icon 的额外密钥) 的条目。 删除 CFBundlincon (iOS 5 之一), 因为这是多余的 。

启动图像必须具有非常具体的名称, 因此这些不会出现在 Info. plist 中 。





相关问题
How to change out-of-focus text selection color in Xcode?

Okay, I ll bite. I ve got really pleasant code/window colors set up in Xcode. Ordinarily, my selection color is very visible. When I am doing a project search and iterating through the results, ...

Iphone NSTimer Issue

Hi I am new to objective c. I am trying to make an app for iphone. I have a button on my view, and the click on which the function playSound is called. This is working properly. It does plays the ...

Include a .txt file in a .h in C++?

I have a number of places where I need to re-use some template code. Many classes need these items In a .h could I do something like: #include <xxx.txt> and place all of this code in the ....

Iterating over string/strlen with umlauted characters

This is a follow-up to my previous question . I succeeded in implementing the algorithm for checking umlauted characters. The next problem comes from iterating over all characters in a string. I do ...

Xcode open two editor windows with same file

Is it possible to open the same file in two separate windows in Xcode. I can open a file in one window and the same file in the main Xcode editor window, but I wanted two separate fulltime editor ...

Forcing code signing refresh in Xcode

In our environment, we share resources across multiple projects and platforms. When building for iPhone, only a subset of those resources are needed. Since that subset is still considerable, we have ...

热门标签