diff --git a/AsyncDisplayKit/Details/ASBasicImageDownloader.h b/AsyncDisplayKit/Details/ASBasicImageDownloader.h index 3472cab108..b4c268fe72 100644 --- a/AsyncDisplayKit/Details/ASBasicImageDownloader.h +++ b/AsyncDisplayKit/Details/ASBasicImageDownloader.h @@ -17,6 +17,14 @@ NS_ASSUME_NONNULL_BEGIN */ @interface ASBasicImageDownloader : NSObject +/** + * 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."))); diff --git a/AsyncDisplayKit/Details/ASPINRemoteImageDownloader.h b/AsyncDisplayKit/Details/ASPINRemoteImageDownloader.h index 1c2d4ee5f3..4521e29b77 100644 --- a/AsyncDisplayKit/Details/ASPINRemoteImageDownloader.h +++ b/AsyncDisplayKit/Details/ASPINRemoteImageDownloader.h @@ -20,8 +20,23 @@ NS_ASSUME_NONNULL_BEGIN @interface ASPINRemoteImageDownloader : NSObject +/** + * 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