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. Here below is what I found
我正在寻找在Xcode 7中设置映像资产的最佳解决方案,我在谷歌上搜索并发现了许多正在讨论映像资产设置的线程。下面是我的发现。
- 1x images are for the original iPhone through the 3GS - 'standard' resolution devices (3.5" screens)
- 1x图像通过3GS -“标准”分辨率设备(3.5英寸屏幕)为原始iPhone提供
- 2x images are for the iPhone 4 and 4S (3.5" Retina screens) and are
also used for the iPhone 6. - iPhone 4和iPhone 4(3.5英寸视网膜屏幕)都有2x的图像,iPhone 6也是如此。
- Retina 4 2x are for the iPhone 5 and 5s (4" Retina screens)
- 视网膜42x是iPhone 5和5s(4英寸视网膜屏幕)
- 3x images are for the new iPhone 6+ (5.5" super-Retina [3x] screen)
- 3x图像是为新的iPhone 6+ (5.5" super-Retina [3x]屏幕)提供的
as also shown in attached image.
如图所示。
But there is no more Retina-4 option so I am confuse how to set accurately in below attached image.
但是现在已经没有视网膜4选项了,所以我不知道如何在下图中准确设置。
1x: is for non retina
是指非视网膜
2x: is for retina (confuse here either for iPhone 4 Retina, 5 Retina or 6)
2x:是视网膜(在这里混淆iPhone 4视网膜,5视网膜或6)
3x: is for 6 plus.
3x: 6加。
Correct me if I am wrong. Looking for clarification. Thanks
如果我错了请纠正我。寻求澄清。谢谢
2 个解决方案
#1
1
You will get all the information regarding Asset from top to bottom on this link.
您将在这个链接上从上到下获得关于资产的所有信息。
对资产目录
According to your Question you can find information in proper detail on this link iosdesign-guidelines
根据您的问题,您可以在这个链接iosdesignguidelines上找到适当的详细信息
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. Then when retina screens came along, 1pt became 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首次推出时,这两个单元是相同的:1pt = 1px。当视网膜屏幕出现时,1pt变成了2px。因此,可以将点作为原始iPhone中的值,像素作为根据像素密度(iPhone 4,5,6 = @2x, iPhone 6 Plus = @3x)确定的真实值。
Check here for resolution ultimate-guide-to-iphone-resolutions
点击这里查看手机分辨率最终指南
#2
1
I am not 100% clear on the question, here are the sizes: http://makeappicon.com/ios8icon
我对这个问题不是百分百清楚,这里有大小:http://makeappicon.com/ios8icon。
I often do the following:
我经常这样做:
- Look for the following in your file:
- 在您的文件中查找以下内容:
- Then I have the following, with multiple sizes of the same image, named to match their respective size:
- 然后我有如下的,有多个大小相同的图像,命名为匹配它们各自的大小:
-
The Contents.json then has the following:
内容。然后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" } }
-
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.
如果大小不正确,则图像将不在其各自的位置。
#1
1
You will get all the information regarding Asset from top to bottom on this link.
您将在这个链接上从上到下获得关于资产的所有信息。
对资产目录
According to your Question you can find information in proper detail on this link iosdesign-guidelines
根据您的问题,您可以在这个链接iosdesignguidelines上找到适当的详细信息
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. Then when retina screens came along, 1pt became 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首次推出时,这两个单元是相同的:1pt = 1px。当视网膜屏幕出现时,1pt变成了2px。因此,可以将点作为原始iPhone中的值,像素作为根据像素密度(iPhone 4,5,6 = @2x, iPhone 6 Plus = @3x)确定的真实值。
Check here for resolution ultimate-guide-to-iphone-resolutions
点击这里查看手机分辨率最终指南
#2
1
I am not 100% clear on the question, here are the sizes: http://makeappicon.com/ios8icon
我对这个问题不是百分百清楚,这里有大小:http://makeappicon.com/ios8icon。
I often do the following:
我经常这样做:
- Look for the following in your file:
- 在您的文件中查找以下内容:
- Then I have the following, with multiple sizes of the same image, named to match their respective size:
- 然后我有如下的,有多个大小相同的图像,命名为匹配它们各自的大小:
-
The Contents.json then has the following:
内容。然后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" } }
-
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.
如果大小不正确,则图像将不在其各自的位置。