iPhone 4S/6 fixing resolution by scale?

78 views Asked by At

We know that iPhone 4/4S and iPhone 6 have the same @2x field inside the image.xcassets. But, due to the different screen size, is not possible for me to create a single image that fits both the devices.

For instance: A logo image with resolution 600 x 300 will work fine within iPhone 6 but will result too much bigger for iPhone 4/4S.

I know that maybe is not the best way to achieve that but my question was: instead of create a -480h version of every single image and overload the project, what if I handle the size different programmatically?

This is what I mean:

...

#define kSCALE_FACTOR 0,83

...

if(iPhone_4) {
    image2xForiPhone6.xScale = kSCALE_FACTOR;
    image2xForiPhone6.yScale = kSCALE_FACTOR;
}

This was just an idea. What do you think about that?

Edit: In case this question will result useless or stupid, can you give me any advice for handle my images catalog? :(

0

There are 0 answers