Reputation: 9136
I have the UIImageView pinned to all the borders of the LaunchScreen.storyboard:
I am using Assets.xcassets for providing the image to the UIImageView:
I would like that launchscreen's image to be shown properly on iPhone 5, 5S, 6, 6S, 7.
I am not sure what sizes I should make for the Image.
Thanks!
Upvotes: 5
Views: 2018
Reputation: 7741
First approach:
You can use LaunchImage in your assets catalog to add images for every screen resolution you support. Also you can check screen resolution for all devices here.
After you add your images select them here:
Your target
-> General
-> App Icons and Launch Images
section -> Launch Images Source
Second approach:
If for some reason you don't want to use static images and prefer to have LaunchScreen.storyboard
with UIImageView
, you can just add the biggest resolution for each scale (1x, 2x, 3x):
1x -> iPhone 4: 320x480
You don't need this image if you don't support iOS 7 and lower.
2x -> iPhone 6/6s: 750 x 1334
Yes, you have other devices with different resolution:
Aspect Fill
content mode for your image view and it will crop top and bottom3x -> iPhone 6 plus: 1242 x 2208
Upvotes: 4