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
Gregory Serfaty
37,140 Pointsadapting data for display
How to download the data with asynchronous, cause if your server is very low, you block the user interface ?
4 Answers
Dale Gardner
9,838 PointsGregory Serfaty
37,140 PointsI'm not talking about the generation JSon but data processing by xcode
Ben Jakuben
Treehouse TeacherThere are different ways to do this, and we will definitely be covering them here in the future. Until then, check out Apple's documentation about NSURLConnection, which is the default way to do asynchronous processing.
If you're familiar with Blocks (to be covered soon here), you can try the NSURLConnection method sendAsynchronousRequest:queue:completionHandler:, like this example from StackOverflow.
EDIT: Forgot to mention my favorite: search GitHub for something like "iOS asynchronous" to find some cool 3rd party libraries for this, like AFNetworking. This is an awesome networking framework that I highly recommend.
Gregory Serfaty
37,140 PointsThanks it is exactly what i'm looking for.
I have an other question what is the difference between uses GCD or AFNetworking? What is the better?
Ps: sorry for my english ;)