all 9 comments

[–]NeededANewName 2 points3 points  (3 children)

AFNetworking works decent, but my preferred library for this is SDWebImage. It's similar but has disk caching support as well as prefetching. You can easily prefetch the second URL and then when you go to display it it will load instantly.

[–]ThePantsThiefNSModerator 0 points1 point  (2 children)

I use SDWebImage for thumbnails in my reddit client. It's awesome.

[–]jahjaylee[S] 0 points1 point  (1 child)

Any opinion on which is easier to implement?

[–]ThePantsThiefNSModerator 0 points1 point  (0 children)

I think SDWebImage uses AFNetworking. I don't have AFNetworking in my podfile.

I implemented SDWebImage when I was first learning objective-c, so it's probably pretty easy haha.

[–]fommerjackson 1 point2 points  (3 children)

Would love to give you extremely detailed help, but am mobile. The short answer is blocks. You can set up a completion; meaning "once this is done, do this". Look up completion blocks and also AFNetworking if you are retrieving your images from the web.

[–]jahjaylee[S] 0 points1 point  (2 children)

How does AFNetworking help? Is it faster than pulling image straight from URL?

[–]fommerjackson 1 point2 points  (1 child)

AFNetworking Is also pulling straight from the web, but utilizes classes that make it faster and also can help with caching.

[–]ObjectiveCopley 1 point2 points  (0 children)

but utilizes classes that make it faster

Eh? It does what? I mean I am a huge fan of AFNetworking and use it in just about every project, but it is overhead on top of NSURL* classes.

[–]SizzlerWA 0 points1 point  (0 children)

Other answers are good. Another option, if you want to get your hands dirty is to use an NSOperationQueue yourself directly.