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
hunche
3,339 PointsHow to wait a server's response for download a thumbnail picture
I had one question about my slow speed server,how should I modify my study code to wait my server response.In TableViewController viewDidLoad the code is below: for (NSDictionary *bpDictionary in blogPostsArray) {blogPost.thumbnail = [bpDictionary objectForKey:@"thumbnail"]; [self.blogPosts addObject:blogPost]; } cellForRowAtIndexPath is NSData *imageData = [NSData dataWithContentsOfURL:blogPost.thumbnailURL]; UIImage *image = [UIImage imageWithData:imageData]; cell.imageView.image = image; Thanks!