From 0dfb649faf2048a3cbef8829fe28cf0f9ab23d2e Mon Sep 17 00:00:00 2001 From: Fernando Saragoca Date: Thu, 17 Nov 2011 15:21:57 -0200 Subject: [PATCH] Documented categories (appledoc) --- UIButton+WebCache.h | 21 +++++++++++++++++++++ UIImageView+WebCache.h | 32 ++++++++++++++++++++++++++++++++ 2 files changed, 53 insertions(+) diff --git a/UIButton+WebCache.h b/UIButton+WebCache.h index 7fc1c222..f373066c 100644 --- a/UIButton+WebCache.h +++ b/UIButton+WebCache.h @@ -11,8 +11,29 @@ @interface UIButton (WebCache) +/** + * Set the imageView `image` with an `url`. + * + * The downloand is asynchronous and cached. + * + * @param url The url that the image is found. + * @see setImageWithURL:placeholderImage: + */ - (void)setImageWithURL:(NSURL *)url; + +/** + * Set the imageView `image` with an `url` and a placeholder. + * + * The downloand is asynchronous and cached. + * + * @param url The url that the `image` is found. + * @param placeholder A `image` that will be visible while loading the final image. + */ - (void)setImageWithURL:(NSURL *)url placeholderImage:(UIImage *)placeholder; + +/** + * Cancel the current download + */ - (void)cancelCurrentImageLoad; @end diff --git a/UIImageView+WebCache.h b/UIImageView+WebCache.h index 5d76a182..7ee3517a 100644 --- a/UIImageView+WebCache.h +++ b/UIImageView+WebCache.h @@ -12,9 +12,41 @@ @interface UIImageView (WebCache) +/** + * Set the imageView `image` with an `url`. + * + * The downloand is asynchronous and cached. + * + * @param url The url that the image is found. + * @see setImageWithURL:placeholderImage: + */ - (void)setImageWithURL:(NSURL *)url; + +/** + * Set the imageView `image` with an `url` and a placeholder. + * + * The downloand is asynchronous and cached. + * + * @param url The url that the `image` is found. + * @param placeholder A `image` that will be visible while loading the final image. + * @see setImageWithURL:placeholderImage:options: + */ - (void)setImageWithURL:(NSURL *)url placeholderImage:(UIImage *)placeholder; + +/** + * Set the imageView `image` with an `url`, placeholder and custom options. + * + * The downloand is asynchronous and cached. + * + * @param url The url that the `image` is found. + * @param placeholder A `image` that will be visible while loading the final image. + * @param options A list of `SDWebImageOptions` for current `imageView`. Available options are `SDWebImageRetryFailed`, `SDWebImageLowPriority` and `SDWebImageCacheMemoryOnly`. + */ - (void)setImageWithURL:(NSURL *)url placeholderImage:(UIImage *)placeholder options:(SDWebImageOptions)options; + +/** + * Cancel the current download + */ - (void)cancelCurrentImageLoad; @end