I want to make Launchcreen.storyboard for my SwiftUI project, and need to resize image for all devices, that width of image = width of screen with saving image proportion. When i fix size on iPhone SE - i have this problem on iPad:
And when i fix height on iPad, i have problem on iPhones:
How can i do it, if i can't change height programmatically in viewDidLoad() (because this is LaunchScreen)?
First, make sure your image content mode is .aspectFit
, then you would have to apply the following constraints: