Reputation: 71
Why iPhone app's splash screen takes more time for loading?
Can we set the time for few second only? it takes almost one minute at the moment.
Upvotes: 4
Views: 893
Reputation: 69469
Well the splash screen is shown as long as your app is starting, meaning not returning from the - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
method.
If you are doing a lot of thing in this method then you should spilt up that code to do then at an other point in the start up of your app.
You should keep the startup time of your app as short as possible, start maintance code in separate thread, try lazy loading for every thing else.
Upvotes: 7
Reputation: 38475
Are you timing this while in XCode? If you are then don't - XCode has to attach debuggers and all sorts of things before the app starts up.
To get a real time, build a release version and put it on a device. Then disconnect the device and start your app. that should give you a real-world indication of how long it will take.
Upvotes: 2
Reputation: 185842
The splash screen stays up until your app finishes initialising. Either speed up your initialisation code, or move the slow bits into a background task.
Upvotes: 2