如何从Xcode 8中的Assets.xcassets添加不同屏幕尺寸的图像? [英] How to add Images for different screen size from Assets.xcassets in Xcode 8?

查看:489
本文介绍了如何从Xcode 8中的Assets.xcassets添加不同屏幕尺寸的图像?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我为登录屏幕创建了不同大小的背景图像。
我参考苹果链接






另一个问题是当我创建图像集时,应该将哪个图像大小拖到哪个位置。我不知道那个。或者我们只需要3张图片(通用行)?

那么,景观图像怎么样?我应该把它放在哪里?

解决方案

我会创建以下尺寸:



iPhone:




  • @ 1x - 640 x 1136(iPhone SE)

  • @ 2x - 750 x 1334(iPhone 7,6S)

  • @ 3x - 1242 x 2208(iPhone 7 Plus, iPhone 6S Plus)



iPad:




  • @ 2x - 2048 x 1536(iPad Air,Retina iPad 1st& 2nd Generation / 3rd& 4th& Pad Mini 2nd& 3rd Generation)


I create different sizes of background image for my Login screen.
I refer to the apple link https://developer.apple.com/ios/human-interface-guidelines/graphics/launch-screen/
But I'm not doing Launch Screen and I just want to add background to Login screen.

I would like to know which is 1x , 2x and 3x ?


Another problem is when I create Image Set, which size of image should be drag to which place. I have no idea of about that. Or do we need only 3 images (in universal row)?
And then , how about for Landscape image? Where should I put this?

解决方案

I would have created the following sizes:

iPhone:

  • @1x - 640 x 1136 (iPhone SE)
  • @2x - 750 x 1334 (iPhone 7, 6S)
  • @3x - 1242 x 2208 (iPhone 7 Plus, iPhone 6S Plus)

iPad:

  • @2x - 2048 x 1536 (iPad Air, Retina iPad 1st & 2nd Generation / 3rd & 4th & Pad Mini 2nd & 3rd Generation)

这篇关于如何从Xcode 8中的Assets.xcassets添加不同屏幕尺寸的图像?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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