                 self.image = placeholderImage
             }
             
-            let request = UIImageView.sharedImageDownloader().downloadImage(
+            let request = UIImageView.sharedImageDownloader.downloadImage(
                 URLRequest: URLRequest,
                 success: { [weak self] request, response, image in
                     if let strongSelf = self {

        }
    }
    
    // MARK: Private - Properties
    
    private var activeTask: NSURLSessionTask? {
        get {
            let userDefinedTask: AnyObject! = objc_getAssociatedObject(self, &activeTaskKey)
            return userDefinedTask as? NSURLSessionTask
        }
        set(newTask) {
            objc_setAssociatedObject(self, &activeTaskKey, newTask, UInt(OBJC_ASSOCIATION_RETAIN_NONATOMIC))
        }
    }
    
    // MARK: Image Cache Methods
    
    public class func sharedImageCache() -> ImageCache {
        let userDefinedCache: AnyObject! = objc_getAssociatedObject(self, &sharedImageCacheKey)
        
        if let userDefinedCache = userDefinedCache as? ImageCache {
            return userDefinedCache
        } else {
            struct Static { static let imageCache = ImageViewCache() }
            return Static.imageCache
        }
    }
    
    public class func setSharedImageCache(imageCache: ImageCache) {
        objc_setAssociatedObject(self, &sharedImageCacheKey, imageCache, UInt(OBJC_ASSOCIATION_RETAIN_NONATOMIC))
    }
    
    // MARK: Image Downloader Methods
    
    public class func sharedImageDownloader() -> ImageDownloader {
        let userDefinedImageDownloader: AnyObject! = objc_getAssociatedObject(self, &sharedImageDownloaderKey)
        
        if let userDefinedImageDownloader = userDefinedImageDownloader as? ImageDownloader {
            return userDefinedImageDownloader
        } else {
            return ImageDownloader.defaultInstance
        }
    }
    
    public class func setSharedImageDownloader(imageDownloader: ImageDownloader) {
        objc_setAssociatedObject(self, &sharedImageDownloaderKey, imageDownloader, UInt(OBJC_ASSOCIATION_RETAIN_NONATOMIC))
    }
    
    // MARK: Remote Image Methods

                            }
                        }
                        
                        UIImageView.sharedImageCache.cacheImage(image, forRequest: URLRequest)
                    }
                },
                failure: { [weak self] request, response, error in
                    if let strongSelf = self {
                        failure?(request, response, error)
                        strongSelf.activeRequest = nil
                    }
                }
            )
            
            self.activeRequest = request
        }
    }
    
    public func cancelImageRequest() {
        self.activeRequest?.cancel()
    }
}

private var sharedImageDownloaderKey = "UIImageView.SharedImageDownloader"
private var sharedImageCacheKey = "UIImageView.SharedImageCache"
private var activeRequestKey = "UIImageView.ActiveRequest"
