Mugunth
Mugunth

Reputation: 14499

Displaying a "Loading..." screen in a UITableView like the AppStore App

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...

Upvotes: 1

Views: 1557

Answers (1)

Nathaniel Martin
Nathaniel Martin

Reputation: 2092

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.

Upvotes: 2

Related Questions