iOS如何设置应用程序图标和启动图像 [英] iOS how to set app icon and launch images

查看:157
本文介绍了iOS如何设置应用程序图标和启动图像的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何设置图片以便存档和验证我的应用?屏幕现在看起来像这样:





所以第一个说 29pt ,但它还说 2x 。那么我将 29x29 图片或 58x58 图片放入?我在哪里放置所有其他的? (我知道有超过 29 40 60 )。



无论如何,我试过的是将 29x29 png拖到第一个插槽上,第二个是 40x40 ,第三个和第四个是 60x60 。当我去 Product-> Archive 时,我得到


/ Users / kendon / Documents / iPhone Apps / Sales Tool / Sales Tool / Images.xcassets:名为AppIcon的应用程序图标集没有任何适用的内容。



解决方案

图标大小







这将为您提供一个空的应用程序图标集。





现在只需将正确大小的图像(以.png格式)从Finder拖到应用程序集中的每个空白处即可。应用程序图标现在应该全部设置。



如何创建合适尺寸的图像



最顶部告诉iOS 9中每个点大小的像素大小。但是,即使我没有为iOS的未来版本更新此答案,您仍然可以使用下面的方法找出正确的像素大小。



查看空图像集上每个空白点数(pt)。如果图像是1x,则像素与点相同。点数增加2倍,积分增加3倍。因此,例如,在上面的第一个空白(29pt 2x)中,您需要一个58x58像素的图像。



您可以从1024x1024像素图像开始,然后将其缩小为正确的尺寸。您可以自己完成,也可以使用网站和脚本来获得合适的尺寸。搜索ios app icon generator或类似内容。



我认为只要你的尺寸正确,但一般命名都不重要约定如下:

  Icon-29.png // 29x29像素
Icon-29@2x.png / / 58x58像素
Icon-29@3x.png // 87x87像素



启动图像



虽然您可以将图像用于启动屏幕,但请考虑使用启动屏幕故事板文件。这将方便地调整每个尺寸和方向的大小。查看此SO答案或以下文档以获取相关帮助。



有用的文件





Xcode这篇文章中的图片是用Xcode 7创建的。


How do I set the images so that I can archive and validate my app? The screen looks like this now:

So the first one says 29pt, but then it also says 2x. So do I put a 29x29 image or a 58x58 image? And where do I put all of the other ones? (I know that there are more sizes than 29, 40, and 60).

Anyway, what I tried was I dragged a 29x29 png onto the first slot, a 40x40 onto the second, and a 60x60 onto the third and fourth. When I went to Product->Archive, I get

/Users/kendon/Documents/iPhone Apps/Sales Tool/Sales Tool/Images.xcassets: The app icon set named "AppIcon" did not have any applicable content.

解决方案

Icon sizes

Above image from Designing for iOS 9. They are the same for iOS 10.

How to Set the App Icon

Click Assets.xcassets in the Project navigator and then choose AppIcon.

This will give you an empty app icon set.

Now just drag the right sized image (in .png format) from Finder onto every blank in the app set. The app icon should be all set up now.

How to create the right sized images

The image at the very top tells the pixels sizes for for each point size that is required in iOS 9. However, even if I don't get this answer updated for future versions of iOS, you can still figure out the correct pixel sizes using the method below.

Look at how many points (pt) each blank on the empty image set is. If the image is 1x then the pixels are the same as the points. For 2x double the points and 3x triple the points. So, for example, in the first blank above (29pt 2x) you would need a 58x58 pixel image.

You can start with a 1024x1024 pixel image and then downsize it to the correct sizes. You can do it yourself or there are also websites and scripts for getting the right sizes. Do a search for "ios app icon generator" or something similar.

I don't think the names matter as long as you get the dimensions right, but the general naming convention is as follows:

Icon-29.png      // 29x29 pixels
Icon-29@2x.png   // 58x58 pixels
Icon-29@3x.png   // 87x87 pixels

Launch Image

Although you can use an image for the launch screen, consider using a launch screen storyboard file. This will conveniently resize for every size and orientation. Check out this SO answer or the following documentation for help with this.

Useful documentation

The Xcode images in this post were created with Xcode 7.

这篇关于iOS如何设置应用程序图标和启动图像的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆