1
votes

The logo of my launch screen appears for a moment then disappears. The reason why I separated the logo and the background is because I want to make sure that the logo aspect ratio stays the same on different devices (iPad, iPhone).

The constraints I added to the logo are:

  • Align Center X to: Superview
  • Align Center Y to: Superview 62:85
  • Aspect Ratio Proportional Width to: Background

The constraints I added to background are:

  • Trailing Space to: Superview
  • Leading Space to: Superview
  • Bottom Space to: Superview
  • Top Space to: Superview
  • Proportional width to: logo

Appears now

Disappears now

1
Does the initial controller have the same background of the launchscreen? - Kerberos

1 Answers

0
votes

LaunchScreen only appears for short amount of time when application is initialising, then it's showing initial ViewController instantly. For simulator builds and faster devices and smaller apps that loads really fast it will be just a blink.

Also LaunchScreen itself is really limited - you cannot add any custom classes there, code - all you can do is layout it using Constraints.

Only way to animate it nicely is to prepare initial ViewController having exactly same constraints as your LaunchScreen - basically making a copy of it and animate your logo out of the screen nicely via code inside your initial ViewController.

Transition between LaunchScreen and your initial ViewController will be completely invisible for user and it will let you take full control on what is happening next and how transition will look like.