Mostly every iOS application has a view with an image as background. Is there any image sizing guide out there? For example here is an iOS screen designed in Sketch:
As you can see there is a background image. Now there are lots of Apple devices every application should support. The new iOS 10 supports all devices from iPhone 5 to iPhone 6s Plus. They have different screen sizes and resolutions. When creating Xcode assets, I am giving 3 background images with different sizes - @1x, @2x, @3x
. What sizes should they be?
If you still have the same problem then you can try this one. For this you have to add only one image with good resolution and below code..
There is design nuance in full size background images.Mostly if scale aspect fill good enough for different sizes you need to design only biggest device size after than rest of them scale to fit as it is.Sometimes some part of background need to keep visible or purpose of keeping low memory print in small device sets you need to create smaller alternatives.
Whenever you make decision with design size of asset you need to create @3x,@2x variants.
One more thing i need to point about vector designs.if your design made only with vectors you can choose pdf vector export.Storyboard can accept vector assets and they are doing very good when scaling in full backgrounds.
The background images you only need to give are @2x and @3x, because @1x devices are now long gone in the dusty pages of history.
Speaking of @2x and @3x, the image resolutions you give to the developer should be the same with the highest resolution iPhone that uses that given size.
Down-scaling shouldn't be a problem because the aspect ratios of all iPhones that support iOS 10 are the same(16:9).
Note for Developer(s):
The way I see it you have 2 options:
if iphone5c { setImage("iphone5cImage") }
etc etc..Also, don't forget to check this thread: How to handle image scale on all the available iPhone resolutions?. It will give you clues of what exactly you are dealing with. TL;DR, It's the options I wrote.
I use background images in my Apps. To solve this problem I use one image that has the resolution to cover all iPhones and all the iPads except the large one. The image size is
2048x2048 points
or1024x1024 pixels at @2x
to cover the 9.7 inch iPad.The image is compressed JPG to keep the size down. Note that I allow it to scale for iPhone 6 Pluse (@3x) and 12.7 inch iPad Pro (@2x) as the quality doesn't seem to be affected. I can justify the scaling for the larger devices, because if I provided image for the 12.7 inch iPad Pro, it will be
5464x4096 points
(@2x) and2732x2048 pixels
and then the JPG compression would have to be so high (if I wanted to keep the size down), that the quality of the image was low anyway compared with scaling.If you need high quality try both JPG and PNG for comparison, because the PNG becomes very large for complex images, but gives the best quality.
There are 3 kinds of Apple Devices (iPhone and iPad) that is
Normal device which terms to 1 pixel = 1 point@1x (Older iPhone and iPad devices)
Retina device which terms to 4 pixels(2 x 2) = 1 point@2x (iPhone 5+)
Retina iPhone6 and iPad which terms to 9 pixels (3 x 3) = 1 point@3x (iPhone6+)
For iOs 10 that will not support iPhone 4s so you only require @2x and @3x images.
As you can see above attached image iPhone 6 also support @2x Scale so use image size for @2x is of 750*1334 and for @3x is of 1242*2208 with image mode.