Reputation:
yet another basic question ... I have an app that takes about 4-5 secs to load.
I want to use the time and show a startup screen that
How can I build that into my app?
Upvotes: 0
Views: 1832
Reputation: 113747
Looks like a job for Default.png
http://iosdevelopertips.com/cocoa/defaultpng-the-secret-of-the-load-screen.html
Don't forget to be careful of your capitalization.
Upvotes: 2
Reputation: 12413
Default.png is just the starting point. That will give you a splash screen (the Apple user interface guidelines suggest that the splash screen should look like the first screen to make the app look as if its loading faster - but that's actually a bad user experience IMHO).
The splash screen disappears as soon as the first view is shown. However, if your code is still doing stuff that renders the interface unusable, it can be worthwhile to make your first view look like the splash screen, possibly adding a progress bar, then swap that out for the first real view when your app is actually ready for user input.
Upvotes: 5
Reputation: 37494
Have your application start with a view that shows the initialization progress and after the initialization is complete, replace it with your app's main view. Make sure to defer the initialization step with -performSelector:afterDelay
or place the initialization code in -applicationDidFinishLaunching
, so that the Default.png doesn't show up but for a very small amount of time and you can show your progress view.
Upvotes: 1
Reputation: 125510
Refer to this StackOverflow question. However, if your app takes 4-5 seconds to load, I would focus on improving its performance. Can you do some operations later, rather than at startup? Splash screens are generally a bad user experience and are discouraged in the Apple Human Interface Guidelines.
Upvotes: 0