Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial


Anthony Rasolofonirina
Anthony Rasolofonirina
2,310 Points

Transition between View Controllers

How do you show an Activity Spinner over a UITableView? I have a DetailViewController that's populated from a URL provided by a ListViewController; loading the data from the URL takes some time and the app is hung up on the ListViewController with the selected row highlighted. During this delay I want to display an activity indicator (loader) and hide it when data is loaded and the view did load.

1 Answer

Amit Bijlani
Amit Bijlani
Treehouse Guest Teacher

@Anthony You should be using a library like AFNetworking so you can load the data in another thread to prevent blocking the main thread. If you want to learn more about multi-threading check out this article: http://www.raywenderlich.com/4295/multithreading-and-grand-central-dispatch-on-ios-for-beginners-tutorial