Search code examples
iosxcodestoryboardlaunch

Centering Launch Screen in xcode


I set up a Launch Screen in xcode with Inferred Size, Simulated Size: Fixed. I put a View in it that covers the whole View Controller. In that View is an image and a label. Both the image and label have height and width constraints, in addition to constraints centering both items with the superview center, yet somehow whenever I run the simulation the label is centered on the screen but the image is off to the right. Anyone know what I need to fix here? Thanks!

screenshot

Edit: It turns out I had a previous launch screen file listed in Info.plist. I updated it with the new launch screen file name and it worked. I also changed the launch screen to remove the splash.


Solution

  • Use width and height equal to, and align your view horizontally in the container..

    Also, as per Apple's human guidelines they advise against having a splash screen.