IPhone5 and iPhone 6 Image Suffix?

We are trying to create an application for all devices, building it in code only. I could see that the suffix:

@2x~ipad for ipad retina
@2x for iphone5 and iphone6
@3x for iphone6+

      

But is there something I don't get how the files for iPhone5 and 6

have the same suffix and the same name? these images have to be of different sizes and so you can't give them the same name?

We created the images for iPhone6

with @2x

and they look great in the simulator iPhone6

, but they iPhone5

don't look good on things and don't overlap.

Can't you separate these files with a different suffix?

I have read: Added image support for new iPhone 6 and 6+ apps, @ 3x?

+3


source to share


3 answers


You should use layout to determine how your UI elements are laid out on the screen, and you should use auto-layout to make sure they look correct on all devices regardless of aspect ratio.



Image size @ 2x, @ 3x refers to device families grouped by resolution. iPhone 5 and 6 are in the same family and iOS will use the @ 2x image for both. However, the size and placement of the UI element that uses this image has nothing to do with the size of the image itself.

0


source


This is because the iphone 5 and iphone 6 (not including the plus) have the same pixel density. So basically a 40x40 image will look the same on both screens and will occupy the same space. You just need to adjust the positions to cover the extra screen space on the iphone 6.



+3


source


Images for iPhone 5 and iPhone 6 are the same size and DPI. Thus, they share the same suffix (@ 2x). They don't need to be separated.

@ 3x for iPhone 6+ because it has a higher DPI and larger size than other phones. Refer to Interface Guides for images for images.

+2


source







All Articles