Full-screen image sizes and naming in xcode

I am a bit confused. If, say, I want to set the image as the background (full screen) for my ios application (iphone), what are the sizes of the image I have to make? I googled and did not find a clear answer.

The use of image objects also provides no explanation. I tried to create a new set of images, it just shows 3 slots for 1x, 2x and 3x. How does xcode distinguish which image to use for iphone 5 and iphone 6 (different ratios)?

EDIT

I don’t seem to understand the question. If the image for iphone 5 and 6 is the same, is the aspect ratio different? It will be stretched on one device or vice versa on the other, and I do not want this. Back to iphone 6, I just create an .png image, @ 2x.png and -568h@2x.png in sizes 320x480, 640x960 and 640 × 1136. So my question is: for iphone 6 and 6+, what are the names and size for my images?

+4
source share
2 answers

If, say, I want to set the image as the background (full screen) for my ios application (iphone), what are the sizes of the image I have to make?

[UIScreen mainScreen].bounds, .

3 1x, 2x 3x

, ( ). xxx.png , xxx@2x.png xxx@3x.png .

xcode , iphone 5 iphone 6 ( )?

UIImageView -setContentMode:, UIViewContentModeScaleAspectFill , .

+2

Source: https://habr.com/ru/post/1607949/


All Articles