rs/SDWebImage — Issue #64: Setting the delegate for UIImageView (UIImageView+WebCache.h)
Author: jmattos
Created: 2012-02-05 17:59:31+00:00
State: open

I think this may be a stupid question, but what I have is a ViewController with a UIImageView that is loading up an image from a URL using setImageWithURL, and that's working like a charm.

I have a UIActivityIndicator over the image, and I start it animating just before I make the call, and I'd like to stop it from animating when the download is complete (or fails)

I'd like to make my View Controller the delegate for the UIImageView (conforming to SDWebImageDownloaderDelegate so that I can be notified when the download is complete so I can do this.

How do I set the View controller to be the Image view's delegate? I was thinking that UIImageView+WebCache.h would have a delegate property I could set, but there isnt... am I totally missing something obvious here? I suspect I am...