Proper way to have an initializing screen in iOS application

940 Views Asked by At

Looking to see where the best place to call some endpoints for initial data is.

In some apps (mostly games) there is a loading screen before the menu. Is this the "Launch Screen" or is it a view set up during viewDidLaunchWithOptions, or is it simply an initial view?

If my searching was correct, there is no way to "perform logic" during the launch screen. So are apps that have a loading screen simply not using a launch screen and just setting up their own loading screen (which appears as a "launch screen")?

2

There are 2 best solutions below

0
On BEST ANSWER

You can't execute any code in the launch image or launch storyboard scene, as it is displayed while your app is loading and before it has started executution.

A common approach is to create the first scene of your app to be identical to the launch storyboard scene, so that the transition between the launch image and the initial scene is seamless. You can then perform the loading in the initial scene, while providing appropriate feedback (spinner, progress bar etc)

0
On

Mostly it is recommended to use Launch screen Because if your first screen which you are using to shows animation takes long time to prepare itself then user will see white screen. And then perform animations on app's root view controller which always appear at app launch.