xcassets中应用程序图标的正确尺寸是多少

xcassets中应用程序图标的正确尺寸是多少

本文介绍了Images.xcassets中应用程序图标的正确尺寸是多少的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Images.xcassets中的我的AppIcon组有4个框,您可以在其中放置不同设备和iOS版本的图标。但是,我尝试过在网上找到的几个不同的图标尺寸,当我尝试构建,存档或验证项目时,每个图标都会产生某种形式的错误。

My AppIcon group in Images.xcassets has 4 boxes where you can place icons for different devices and iOS versions. However, I have tried several different icon dimensions I have found online, and each of them produces some form of error when I try to build, archive, or validate the project.

AppIcon集的正确应用图标尺寸是多少?

What are the correct app icon dimensions for the AppIcon set?

推荐答案

要查看尺寸,请选择您的空白图像空间有兴趣并点击尺寸检查员。尺寸显示在底部RHS以及它所针对的iOS版本。

To view the sizes, select the blank image space that you are interested in and click the size inspector. The size shows up at the bottom RHS along with the iOS version that it is targeted to.

您的屏幕看起来应该是这样的。

Your screen should look something like this.

iPhone 6需要两张新图片。

iPhone 6 requires two new images.

180x180
[email protected]


87x87
[email protected]

如果你看看appiconset的JSON应该看起来像这样。第一行有大小。请注意,某些图标用于多个位置。名称是任意的,但我保持与以前相同的命名约定。

If you look at the JSON for the appiconset it should look something like this. The first line has the sizes. Note that some icons are used in multiple places. The names are arbitrary but I kept the same naming convention as before.

{
  "images" : [
    {
      "size" : "29x29",
      "idiom" : "iphone",
      "filename" : "Icon-Small.png",
      "scale" : "1x"
    },
    {
      "size" : "29x29",
      "idiom" : "iphone",
      "filename" : "[email protected]",
      "scale" : "2x"
    },
    {
      "size" : "29x29",
      "idiom" : "iphone",
      "filename" : "[email protected]",
      "scale" : "3x"
    },
    {
      "size" : "40x40",
      "idiom" : "iphone",
      "filename" : "[email protected]",
      "scale" : "2x"
    },
    {
      "size" : "40x40",
      "idiom" : "iphone",
      "filename" : "[email protected]",
      "scale" : "3x"
    },
    {
      "size" : "57x57",
      "idiom" : "iphone",
      "filename" : "Icon.png",
      "scale" : "1x"
    },
    {
      "size" : "57x57",
      "idiom" : "iphone",
      "filename" : "[email protected]",
      "scale" : "2x"
    },
    {
      "size" : "60x60",
      "idiom" : "iphone",
      "filename" : "[email protected]",
      "scale" : "2x"
    },
    {
      "size" : "60x60",
      "idiom" : "iphone",
      "filename" : "[email protected]",
      "scale" : "3x"
    },
    {
      "size" : "29x29",
      "idiom" : "ipad",
      "filename" : "Icon-Small.png",
      "scale" : "1x"
    },
    {
      "size" : "29x29",
      "idiom" : "ipad",
      "filename" : "[email protected]",
      "scale" : "2x"
    },
    {
      "size" : "40x40",
      "idiom" : "ipad",
      "filename" : "Icon-40.png",
      "scale" : "1x"
    },
    {
      "size" : "40x40",
      "idiom" : "ipad",
      "filename" : "[email protected]",
      "scale" : "2x"
    },
    {
      "size" : "50x50",
      "idiom" : "ipad",
      "filename" : "Icon-Small-50.png",
      "scale" : "1x"
    },
    {
      "size" : "50x50",
      "idiom" : "ipad",
      "filename" : "[email protected]",
      "scale" : "2x"
    },
    {
      "size" : "72x72",
      "idiom" : "ipad",
      "filename" : "Icon-72.png",
      "scale" : "1x"
    },
    {
      "size" : "72x72",
      "idiom" : "ipad",
      "filename" : "[email protected]",
      "scale" : "2x"
    },
    {
      "size" : "76x76",
      "idiom" : "ipad",
      "filename" : "Icon-iPad-76.png",
      "scale" : "1x"
    },
    {
      "size" : "76x76",
      "idiom" : "ipad",
      "filename" : "[email protected]",
      "scale" : "2x"
    }
  ],
  "info" : {
    "version" : 1,
    "author" : "xcode"
  },
  "properties" : {
    "pre-rendered" : true
  }
}

这篇关于Images.xcassets中应用程序图标的正确尺寸是多少的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-30 18:23