5

Activity indicator in launch screen doesn't animate. How to make it work? I can't do startAnimating() because cannot assign class to launch screen. The checkbox in the attribute inspector does't work as well.

rmaddy
  • 314,917
  • 42
  • 532
  • 579
Roei Klein
  • 93
  • 1
  • 3

2 Answers2

9

The launch screen is not a splash screen. It is, in effect, just a picture, hiding the gap between the time the user summons your app and the time your app runs. You cannot do anything in the launch screen because, by definition, if the launch screen is visible your app is not yet running.

matt
  • 515,959
  • 87
  • 875
  • 1,141
0

LaunchScreen is use to display a logo of your app or something like that when app is launch. It runs before your app code and you can't modify or do any functionality here just show an image label or change background color of view.

If you want to customize your Launch Screen you should have to use a trick to make a controller same as launch screen same constraints and color schemes with same image if any. Then add some functionality as you animate imageView or show activity indicator and make the controller to initial controller or root view controller.

After showing the activity indicator or animation in Customize Launch Controller you just present the Home Controller or whatever your app's first screen as transition style cross dissolve and presentation style over full screen.

Zeeshan Ahmad II
  • 1,047
  • 1
  • 5
  • 9