O'Reilly logo

iOS and OS X Network Programming Cookbook by Jon Hoffman

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Using the UIImageView+AFNetworking category

AFNetworking makes downloading images incredibly easy and provides a category for the UIImageView class that adds a method to download images asynchronously from the Internet and display them. The method added to the UIImageView class is setImageWithURL:placeholder:, which places a temporary image in the UIImageView class while it downloads the final image asynchronously from the URL provided. As you will see in this recipe, this method is really useful when building a UITableView, where each cell contains an image that needs to be downloaded from the Internet.

In the Creating a web client using AFHTTPSessionManager recipe, we created our ITunesClient class to call the iTunes Search API. Then, in the ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required