IOS 8资产目录图像大小令人困惑 [英] IOS 8 asset catalog image sizes confusing

查看:145
本文介绍了IOS 8资产目录图像大小令人困惑的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

假设我想在@ 1x上制作一个占据iPhone屏幕(肖像)宽度一半的按钮。这将是160像素,@ 2x这将是320像素。

Say I want to make a button that takes up half the width of the iPhone screen (portrait) at @1x. This would be 160 pixels, @2x this would be 320 pixels.

现在使用iPhone 6和iPhone 6加上它会让人感到困惑。 iPhone 6的宽度为750像素,使用的是@ 2x,但资产目录只有一个用于添加@ 2x图像的盒子,所以我的图像是320像素还是375像素?

Now with iPhone 6 and iPhone 6 plus it gets confusing. The iPhone 6 has 750 pixels width and uses @2x but the asset catalog has only one box for adding @2x images, so do I make my image 320 pixels or 375 pixels?

此外,iPhone 6 Plus的宽度为1080像素或1242像素(任何一个想法?),但我的标准图像为160像素乘以3 = 480像素但iPhone 6 Plus屏幕的一半是540像素或621像素?

Also, the iPhone 6 Plus has width of 1080 pixels or 1242 pixels (any idea which one?), but my standard image of 160 pixels multiplied by 3 = 480 pixels but half the iPhone 6 Plus screen is either 540 pixels or 621 pixels??

我应该制作多大的图像以及为什么?

What size I should be making my images and why?

推荐答案

iPhone 6和6 Plus具有与iPhone 5 / 5C / 5S相同的纵横比,因此它们会自动缩放屏幕图像。对于iPhone 6,你的图像应该是320像素,就像4英寸屏幕一样。

The iPhone 6 and 6 Plus have the same aspect ration as the iPhone 5/5C/5S, so they automatically scale the image for your screen. For the iPhone 6, your image should be 320 pixels, just like with a 4-inch screen.

对于6 Plus,你应该为它做480像素理由。

For the 6 Plus, you should make it 480 pixels for the same reason.

这篇关于IOS 8资产目录图像大小令人困惑的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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