Using the UIImageView+MKNetworkKitAdditions.h category and caching the images

In this recipe we will expand on the ITunesEngine header file created in the Creating and using the MKNetworkKit engine recipe of this chapter by adjusting the caching settings of MKNetworkEngine. We will also use the UIImageView+MKNetworkKitAdditions category to download images and display them once the download is complete.

This recipe will introduce two concepts: the MKNetworkKit caching capability and using the categories that come with MKNetworkKit. We will also get a better understanding of why we subclass MKNetworkEngine.

Getting ready

This recipe is compatible with both iOS and OS X. We will need to download the framework from https://github.com/MugunthKumar/MKNetworkKit ...

Get iOS and OS X Network Programming Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.