[Documentation] Added docs for ASBasicImageDownloader & ASPINRemoteImageDownloader (#2327)

* Added docs for ASBasicImageDownloader & ASPINRemoteImageDownloader

* Had wrong @return syntax for sharedPINRemoteImageManager
This commit is contained in:
Garrett Moon
2016-10-05 17:47:45 -07:00
committed by appleguy
parent 874dda00cf
commit 27cccc74ae
2 changed files with 23 additions and 0 deletions

View File

@@ -17,6 +17,14 @@ NS_ASSUME_NONNULL_BEGIN
*/
@interface ASBasicImageDownloader : NSObject <ASImageDownloaderProtocol>
/**
* A shared image downloader which can be used by @c ASNetworkImageNodes and @c ASMultiplexImageNodes
*
* This is a very basic image downloader. It does not support caching, progressive downloading and likely
* isn't something you should use in production. If you'd like something production ready, see @c ASPINRemoteImageDownloader
*
* @note It is strongly recommended you include PINRemoteImage and use @c ASPINRemoteImageDownloader instead.
*/
+ (instancetype)sharedImageDownloader;
+ (instancetype)new __attribute__((unavailable("+[ASBasicImageDownloader sharedImageDownloader] must be used.")));

View File

@@ -20,8 +20,23 @@ NS_ASSUME_NONNULL_BEGIN
@interface ASPINRemoteImageDownloader : NSObject <ASImageCacheProtocol, ASImageDownloaderProtocol>
/**
* A shared image downloader which can be used by @c ASNetworkImageNodes and @c ASMultiplexImageNodes
*
* This is the default downloader used by network backed image nodes if PINRemoteImage and PINCache are
* available. It uses PINRemoteImage's features to provide caching and progressive image downloads.
*/
+ (ASPINRemoteImageDownloader *)sharedDownloader;
/**
* The shared instance of a @c PINRemoteImageManager used by all @c ASPINRemoteImageDownloaders
*
* @discussion you can use this method to access the shared downloader. This is useful to share a cache
* and resources if you need to download images outside of an @c ASNetworkImageNode or
* @c ASMultiplexImageNode
*
* @return An instance of a @c PINRemoteImageManager
*/
- (PINRemoteImageManager *)sharedPINRemoteImageManager;
@end