当您使用 Xcode 制作 iPhone 应用程序时,如何更改应用程序的图标?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/1317419/
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

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-09 03:07:08  来源:igfitidea点击:

When you are using Xcode to make an iPhone app, how do you change the app's icon?

iphonexcodeicons

提问by Aidan

When you are using Xcode to make an iPhone app, how do you change the app's icon? Right now my icon for my app is just plain white.

当您使用 Xcode 制作 iPhone 应用程序时,如何更改应用程序的图标?现在我的应用程序图标只是纯白色。

回答by Tim

Create a 57x57 PNG file and import it into your project bundle. Then open the .plist file that is included in your project and edit the value for the key "Icon File" to match the name of the icon you provided (CFBundleIconFileis the actual key, but the Xcode editor will display the nicer name for you).

创建一个 57x57 PNG 文件并将其导入到您的项目包中。然后打开项目中包含的 .plist 文件并编辑键“图标文件”的值以匹配您提供的图标的名称(CFBundleIconFile是实际的键,但 Xcode 编辑器会为您显示更好的名称) .

回答by pixelfreak

In Xcode 4, you can go to your app's Summarypage and there is a section called App Icons. Then just drag and drop an image into one of the "drop zones". It just works! :D

在 Xcode 4 中,您可以转到应用程序的摘要页面,其中有一个名为App Icons的部分。然后只需将图像拖放到“拖放区”之一即可。它只是有效!:D

回答by Stefan Kendall

If you don't specify the icon in the Info.plist file, then Xcode assumes that a file named "icon.png" in your resources folder is the icon for the application.

如果您没有在 Info.plist 文件中指定图标,那么 Xcode 会假定您的资源文件夹中名为“icon.png”的文件是应用程序的图标。

回答by ashokbabuy

In Xcode4 go to your applications summary section by selecting target project there you see section with name app icons.select your icon image of size 57x57.just do it it will work

在 Xcode4 中,通过选择目标项目转到您的应用程序摘要部分,在那里您会看到带有名称应用程序图标的部分。选择大小为 57x57 的图标图像。这样做就可以了

回答by mikebz

In Xcode 5 you can do it very simply: 1) go to images.xcassets 2) click on AppIcon 3) select Show Overview instead of Slicing 4) drag and drop the appropriate icon sizes onto the icon slots 5) rebuild - and you are good to go.

在 Xcode 5 中,您可以非常简单地执行此操作:1) 转到 images.xcassets 2) 单击 AppIcon 3) 选择 Show Overview 而不是 Slicing 4) 将适当的图标大小拖放到图标插槽上 5) 重建 - 您是很高兴去。