views:

463

answers:

3

the App Store app and fairly a lot many apps display a view that says "Loading.." while the content is being retrieved.

How can we do this? Should I remove the UITableView and call addSubView and then once the data is available, add the tableview back? Or is there any other shortcut?

If my question is not clear, please see this image... http://www.flickr.com/photos/mugunthkumar/3774575906/

I want to know how to create a temporary loading view like this till my tableview contents are ready...

+1  A: 

The easiest way is to add the activity viewer and "loading" label into your view, and hide them.

Then, when you start loading your data, hide the table, show the activity viewer and label, start the activity viewer animating, and start loading your data in a background thread.

Once the thread finishes, hide the activity viewer and label, and show your table again.

Nathaniel Martin
A: 

Hi,

even though I did not do the asking this helped a lot. Any ideas if I don;t want to use the standard activity indicator and want to create a custom waiting screen? Thanks

John

John
A: 

I need this too...

Can anyone provide a code snippet?

Thanks

JR