tags:

views:

360

answers:

3

Hi,

I am retrieving some data from server when launching my application itself. So whenever launch my application it shows a blank screen for few seconds(means it is downloading data from server) and then launches the first view. I don't want to show the blank screen to user. I want to add an image and activity indicator there. Please route me into right direction to capture this task.

I appreciate your helps.

thanks.

Clave/

+5  A: 

Put an image in your resources (MainBundle) with the filename of "Default.png" and that gets displayed before your app even gets the first call. After that, you can either display the same image or display that and an animated progress bar as you download your data.

mahboudz
Great thanks. I'll do that.
Clave Martin
MiRAGe's suggestion seems nicer to the user if your download takes a few seconds.
Ölbaum
Adding Default.png is still a good idea, because startup time of even empty trivial app is still a noticeable period and Default.png makes it look smoother.
tequilatango
As I said, as soon as you do get control, in your AppDelegate or even in main if you want, you can start putting up a different graphic, a progress bar, etc.
mahboudz
Yes, there is some period of time where the screen is blank, before you even have a chance to run another thread, or do anything, really.
mahboudz
+2  A: 

Use threads to split the view from the data loading. This way, you can load the app's view and other resources, while (in the background) loading its content. Great usability boost.

MiRAGe
A: 

You might want to read James Thomson's article "How To Make Your iPhone App Launch Faster". He describes some techniques for showing a loading indicator immediately, making an application seem to launch faster.

Brad Larson