I'm trying to make my LaunchScreen.storyboard
work for every device, from iPhone 4 to iPad Pro. This way, I created 3 resolutions images:
launchScreen@3x = 1366x1024 (iPad Pro/maximum size)
launchScreen@2x = 911x683 (1366*2/3 x 1024*2/3)
launchScreen = 455x341 (1366*1/3 x 1024*1/3)
but when I add them to the project and add missing constraints, they won't work proberly, as you can see below.
I know that I'm doing something wrong, but I don't know what. I've searched in many places, but couldn't find anything. Is there anything I can do to make this work?
Thanks in advance,
Luiz.
First if all remove all constraint from your image view.
After that set your imageView
content mode to Scale To Fill
.
Then give constraint to your imageView
like this:
And your result will be:
And here is your sample code for more info.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.