mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-24 07:05:35 +00:00
[Documentation] Added docs for ASBasicImageDownloader & ASPINRemoteImageDownloader (#2327)
* Added docs for ASBasicImageDownloader & ASPINRemoteImageDownloader * Had wrong @return syntax for sharedPINRemoteImageManager
This commit is contained in:
@@ -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.")));
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user