I have added an image to UIImageView
in my LaunchScreen.xib
file and made it aspect fit the screen of the device. I've added image.png, [email protected] and [email protected] but iPhone 4/4s, 5/5s and 6 all are using [email protected] which leaves borders outside the image.
How do I specify which image to use to make it fit every device screen?
In IOS 8 and above you don't need to add conditions for iPhone or iPad. you can set a one image for all type of platform using size classes.
Just use size classes and set your image to view. it will look better for all iphones and ipads.
This is a comment from apple : -
Size classes. Size classes for iOS 8 enable designing a single universal storyboard with customized layouts for both iPhone and iPad. With size classes you can define common views and constraints once, and then add variations for each supported form factor. iOS Simulator and asset catalogs fully support size classes as well.