简体   繁体   English

为所有iPhone设备准确设置Xcode 7中的资产

[英]Set accurately Assets in Xcode 7 for all iPhone devices

I am looking for best solution for setting image assets in Xcode 7, I googled and found many threads those are discussing on setting on image assets. 我正在寻找在Xcode 7中设置图像资源的最佳解决方案,我用Google搜索并找到了许多关于设置图像资源的线程。 Here below is what I found 以下是我发现的内容

  • 1x images are for the original iPhone through the 3GS - 'standard' resolution devices (3.5" screens) 1x图像适用于原始iPhone通过3GS - “标准”分辨率设备(3.5“屏幕)
  • 2x images are for the iPhone 4 and 4S (3.5" Retina screens) and are 2x图像适用于iPhone 4和4S(3.5英寸Retina屏幕)
    also used for the iPhone 6. 也用于iPhone 6。
  • Retina 4 2x are for the iPhone 5 and 5s (4" Retina screens) Retina 4 2x适用于iPhone 5和5s(4英寸Retina屏幕)
  • 3x images are for the new iPhone 6+ (5.5" super-Retina [3x] screen) 3x图像适用于新款iPhone 6+(5.5英寸超级Retina [3x]屏幕)

as also shown in attached image. 如附图所示。 Facebook图片

But there is no more Retina-4 option so I am confuse how to set accurately in below attached image. 但是没有更多的Retina-4选项,所以我很困惑如何准确设置下面的附加图像。 Xcode 7图像资产

1x: is for non retina 1x:用于非视网膜

2x: is for retina (confuse here either for iPhone 4 Retina, 5 Retina or 6) 2x:用于视网膜(这里混淆了iPhone 4 Retina,5 Retina或6)

3x: is for 6 plus. 3x:是6加。

Correct me if I am wrong. 如果我错了,请纠正我。 Looking for clarification. 寻求澄清。 Thanks 谢谢

I am not 100% clear on the question, here are the sizes: http://makeappicon.com/ios8icon 我不是100%明确的问题,这里是尺寸: http//makeappicon.com/ios8icon

I often do the following: 我经常做以下事情:

  1. Look for the following in your file: 在您的文件中查找以下内容:

位置

  1. Then I have the following, with multiple sizes of the same image, named to match their respective size: 然后我有以下,具有相同图像的多个尺寸,命名以匹配其各自的大小:

有图像

  1. The Contents.json then has the following: 然后Contents.json具有以下内容:

     "images" : [ { "size" : "29x29", "idiom" : "iphone", "filename" : "icon-58.png", "scale" : "2x" }, { "size" : "29x29", "idiom" : "iphone", "filename" : "icon-87.png", "scale" : "3x" }, { "size" : "40x40", "idiom" : "iphone", "filename" : "icon-80.png", "scale" : "2x" }, { "size" : "40x40", "idiom" : "iphone", "filename" : "icon-120.png", "scale" : "3x" }, { "size" : "60x60", "idiom" : "iphone", "filename" : "icon-121.png", "scale" : "2x" }, { "size" : "60x60", "idiom" : "iphone", "filename" : "icon-180.png", "scale" : "3x" } ], "info" : { "version" : 1, "author" : "xcode" } } 
  2. Then check your assets in Xcode 然后在Xcode中检查您的资产

在哪里看

If you have done everything correctly, they should all be filled: 如果你已经正确地完成了所有事情,那么它们应该被填满:

所有图标填写

If a size is not correct, the image will not be in it's respective spot. 如果尺寸不正确,图像将不在其各自的位置。

You will get all the information regarding Asset from top to bottom on this link. 您将在此链接上从上到下获取有关资产的所有信息。

About Asset Catalogs 关于资产目录

According to your Question you can find information in proper detail on this link iosdesign-guidelines 根据您的问题,您可以在此链接iosdesign-guidelines上找到相应详细信息

Developers work with point values, so it is important to understand the difference with pixels . 开发人员使用点值,因此了解像素的差异非常重要。 When the iPhone was first introduced, the two units were the same: 1pt equals 1px. 当iPhone首次推出时,两个单元是相同的:1pt等于1px。 Then when retina screens came along, 1pt became 2px. 然后当视网膜屏幕出现时,1pt变为2px。 So think of points as the values in the original iPhone, and pixels as the real values depending on the pixel density ( iPhone 4,5,6 = @2x , iPhone 6 Plus = @3x ). 因此,将点视为原始iPhone中的值,将像素视为实际值,具体取决于像素密度( iPhone 4,5,6 = @ 2xiPhone 6 Plus = @ 3x )。

Check here for resolution ultimate-guide-to-iphone-resolutions 检查此处的分辨率终极指南到iPhone的分辨率

在此输入图像描述 在此输入图像描述

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM