I am using a storyboard as launch screen.
It has a full size UIImageView
for artwork and a language dependent UILabel rendered over it.
I do have .png files for all possible iPhone screen sizes (iPad not necessary).
The artwork contains a circle that looks distorted when I use the same image for iPhone 4s and iPhone 5.
Approach 1
In the LaunchScreen.storyboard, I add an UIImageView
for all iPhones and use an imageSet, that is defined in Assets.xcassets
.
When I do this, the image@2x of the image set is used for iPhone 4s and for iPhone 5 5s. One of both looks bad, because iPhone 4s and 5 have different heights.
I am not aware that I can use size classes in the storyboard to distinguish between iPhone 4s and iPhone 5. Or can I?
Approach 2
create a launch image set in Assets.xcassets, which can hold all necessary image sizes.
I can't select this launch image set in the UIImageView
as image.
Question
In a full size UIImageView
in a LaunchScreen.storyboard: how do I display different pngs for
The main problem appears to distinguish between 4 + 4s and 5 + 5s.
a circle that looks distorted when I use the same image for iPhone 4s and iPhone 5.
The problem is with the content mode of the image view. Use a content mode that does not stretch the image out of its aspect ratio.