Reputation: 473
I am moving my launch screen from the launch asset to the new approach of launchscreen.storyboard. However I am confused as to what size images do i need to provide for the 1x 2x and 3x image assets. The images are full-screen images with a little bit of text. Ideally I want the images to be generic so that they are visible properly on all sorts of iphone devices from iph5 to iph11.
I have tried a few images but they seem to get stretch or behave differently on regular iphones and iphone x variants(the images seem vertically stretched). I tried looking on apple forums for a solution but couldnt find anything concrete.
Upvotes: 1
Views: 5928
Reputation: 2859
For each scale factor (@1x, @2x, @3x) you'd want to have an image that is large enough for the largest device you support.
For example, the resolution of a 12.9" iPad Pro is 2048x2732 with a scale factor of 2x. Therefore, if you want to have a universal background image for all @2x devices supporting both display orientation (portait and landscape), you'd need a 2732x2732 image (i.e. 1366x1366@2x). The same is for the @3x iPhones where you want a 2688x2688 (i.e. 896x896@3x) image because the resolution of the large Plus iPhones is 1242x2688. If you support old non-retina devices, you'd probably go with 1024x1024@1x, that was enough for non-retina iPads.
On the launch storyboard, you need to set the constraints and the content mode of your image view depending on your background image.
iOS Human Interface Guidelines provide a list of different image sizes for various devices.
However, if your launch screen doesn't have a complex background but rather a solid color fill, consider getting rid of the background image completely.
Upvotes: 1