Click here to support Nimbus development and make a donation at www.pledgie.com !
An iOS framework whose growth is bounded by O(documentation).
Nimbus Network Image

Overview

Image views that load images from the network and efficiently store the result in memory and on disk.

Presented below is an architectural overview of the Nimbus network image library.

NINetworkImageDesign1.png
NINetworkImage Design
  1. To begin using a network image view, simply create an instance of an NINetworkImageView and use it as you would a UIImageView. The initial image you assign to the view will be used as the "loading" image and must be a locally accessible image. Note that this image will not be cropped and resized in any way, so you should take care to crop and resize it beforehand as necessary.
  2. Once you have created your network image view and assigned the initial image, the next step is to load the network image. Call any of the setPathToNetworkImage methods to fire off a network request for the image on a separate thread.
  3. A new NINetworkImageRequest thread will spin off and initiate the request to the network.
  4. Once the image has been retrieved from the net, the thread crops and resizes the image depending on the presentation configurations specified by the image view. In this example, sizeForDisplay and cropImageForDisplay are enabled. In this step the image is resized to fit the aspect ratio of the display size.
  5. We then crop the image to fit the display frame.
  6. Upon completion of all image modifications, we complete the request and return only the modified image to the image view. This helps to reduce memory usage.
  7. The resized and cropped image is then stored in the in-memory image cache for quick access in the future.
  8. At last, the image view sets the new image and displays it.

Demo Applications

BasicNetworkImage - Demos each of the image content modes. [README]

This demo sets up a scroll view of network images that each show a different UIViewContentMode of the same image. The in-memory cache size is also displayed as the images are loaded.

NINetworkImageViewExample1.png
Screenshots of the BasicNetworkImage demo application.

Modules

 User Interface
 Network Requests
Generated for Nimbus by doxygen 1.7.4-20110629