Authored by Olivier Poitrey

Quick and dirty documentation

Showing 1 changed file with 19 additions and 2 deletions
1 Dailymotion Web Image 1 Dailymotion Web Image
2 ===================== 2 =====================
3 3
4 -This library provides a drop-in remplacement for UIImageVIew with support for image coming from the web. 4 +This library provides a drop-in remplacement for UIImageVIew with support for remote images coming from the web.
5 5
6 -TODO: doc  
  6 +It provides:
  7 +- Drop-in replacement to UIImageView
  8 +- Memory + disk image caching
  9 +- Uses NSOperation to perform parallel downloads and caching
  10 +- Handles cache expiration transparently
  11 +
  12 +How To Use It
  13 +-------------
  14 +
  15 +Most common use is in conjunction with an UITableView. Just place an UIImageView in you UITableViewCell in interface builder, and set its class to DMImageView in the identity panel. Then, in tableView:cellForRowAtIndexPath:, you just have to send a setImageWithURL: to the DMWebImage view with the URL of the image.
  16 +
  17 +If in interface builder, an image was configured in the UIImageView, this image will be used as a placeholder, waiting for the web image to be loaded.
  18 +
  19 +Future Enhancements
  20 +-------------------
  21 +
  22 +- Allow setup of the queue size (current default setup is 8 parallel downloads and 2 parallel cache-ins)
  23 +- Easy way to use it with default UITableView styles without requiring to create a custom UITableViewCell