Search code examples
iosswiftuiimageimage-sizelaunchimage

How to add Images for different screen size from Assets.xcassets in Xcode 8?


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 ?

enter image description here


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? enter image description here


Solution

  • 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)