0

I need help getting a very basic LaunchScreen.storyboard working. My launch screen is just an image. I need the storyboard to handle the image by letterboxing it if the device ratio is not 4:3 (iPad).

I have a Universal app (iPad/iPhone) created with Xcode 8 with iOS 10.3 as deployment target. I used Xcode's app template for this new Swift 3 SpriteKit project. Its a simple SpriteKit app. The app is viewed on iPad and iPhone in 4:3 ratio, landscape only. AspectFit is properly respected in my SpriteKit views on all devices. So on iPhone its letterboxed, which looks and works great for my needs.

The app is well tested on multiple devices and today tested through xcode 9 builds on iOS 11.

All good!

Now I'm dealing with LaunchScreen.storyboard madness. All I want is my launch image (same size as my other SpriteKit background images) do display in letterbox form, for non 4:3 devices, to fit the screen.

I feel like I've done 100 Google queries, read as many blog posts and forums and tried a couple hundred different things in Xcode and am getting nowhere.

Any help appreciated.

Ahmad F
  • 30,560
  • 17
  • 97
  • 143
  • Thanks for the editing Ahmad ;) – jhancock Sep 24 '17 at 09:12
  • What constraints have you set on your image view in the launch storyboard? If you select aspect fit then all you should need to do is constraint the image view to all four edges of the superview. – Paulw11 Sep 24 '17 at 10:44
  • 1
    Thanks @Paulw11. I thought I had added "constraints" by ensuring the parent View was marked as aspectFit as well as its contained ImageView. I finally found the secret tiny icon at the bottom of the screen to add further constraints....clicking on each of the four sides of the image and fixing it to the parent with 0 margin did the trick. This is truly (for a newb) an odd place to bury such an important control setting. Thanks for your suggestion to look further. – jhancock Sep 25 '17 at 22:18

0 Answers0