|
7 | 7 | */
|
8 | 8 |
|
9 | 9 | #import <SDWebImage/SDWebImage.h>
|
10 |
| -#import "UIImage+SDWebImageFLPlugin.h" |
11 |
| - |
12 |
| -#if __has_include(<FLAnimatedImage/FLAnimatedImage.h>) |
13 | 10 | #import <FLAnimatedImage/FLAnimatedImage.h>
|
14 |
| -#else |
15 |
| -#import "FLAnimatedImage.h" |
16 |
| -#endif |
| 11 | +#import "UIImage+SDWebImageFLPlugin.h" |
17 | 12 |
|
18 | 13 | /**
|
19 | 14 | * Optimal frame cache size of FLAnimatedImage during initializer. (1.0.11 version later)
|
@@ -67,6 +62,21 @@ FOUNDATION_EXPORT SDWebImageContextOption _Nonnull const SDWebImageContextPredra
|
67 | 62 | placeholderImage:(nullable UIImage *)placeholder
|
68 | 63 | options:(SDWebImageOptions)options NS_REFINED_FOR_SWIFT;
|
69 | 64 |
|
| 65 | +/** |
| 66 | + * Set the imageView `image` with an `url`, placeholder, custom options and context. |
| 67 | + * |
| 68 | + * The download is asynchronous and cached. |
| 69 | + * |
| 70 | + * @param url The url for the image. |
| 71 | + * @param placeholder The image to be set initially, until the image request finishes. |
| 72 | + * @param options The options to use when downloading the image. @see SDWebImageOptions for the possible values. |
| 73 | + * @param context A context contains different options to perform specify changes or processes, see `SDWebImageContextOption`. This hold the extra objects which `options` enum can not hold. |
| 74 | + */ |
| 75 | +- (void)sd_setImageWithURL:(nullable NSURL *)url |
| 76 | + placeholderImage:(nullable UIImage *)placeholder |
| 77 | + options:(SDWebImageOptions)options |
| 78 | + context:(nullable SDWebImageContext *)context; |
| 79 | + |
70 | 80 | /**
|
71 | 81 | * Load the image at the given url (either from cache or download) and load it in this imageView. It works with both static and dynamic images
|
72 | 82 | * The download is asynchronous and cached.
|
@@ -139,4 +149,28 @@ FOUNDATION_EXPORT SDWebImageContextOption _Nonnull const SDWebImageContextPredra
|
139 | 149 | progress:(nullable SDImageLoaderProgressBlock)progressBlock
|
140 | 150 | completed:(nullable SDExternalCompletionBlock)completedBlock;
|
141 | 151 |
|
| 152 | +/** |
| 153 | + * Set the imageView `image` with an `url`, placeholder, custom options and context. |
| 154 | + * |
| 155 | + * The download is asynchronous and cached. |
| 156 | + * |
| 157 | + * @param url The url for the image. |
| 158 | + * @param placeholder The image to be set initially, until the image request finishes. |
| 159 | + * @param options The options to use when downloading the image. @see SDWebImageOptions for the possible values. |
| 160 | + * @param context A context contains different options to perform specify changes or processes, see `SDWebImageContextOption`. This hold the extra objects which `options` enum can not hold. |
| 161 | + * @param progressBlock A block called while image is downloading |
| 162 | + * @note the progress block is executed on a background queue |
| 163 | + * @param completedBlock A block called when operation has been completed. This block has no return value |
| 164 | + * and takes the requested UIImage as first parameter. In case of error the image parameter |
| 165 | + * is nil and the second parameter may contain an NSError. The third parameter is a Boolean |
| 166 | + * indicating if the image was retrieved from the local cache or from the network. |
| 167 | + * The fourth parameter is the original image url. |
| 168 | + */ |
| 169 | +- (void)sd_setImageWithURL:(nullable NSURL *)url |
| 170 | + placeholderImage:(nullable UIImage *)placeholder |
| 171 | + options:(SDWebImageOptions)options |
| 172 | + context:(nullable SDWebImageContext *)context |
| 173 | + progress:(nullable SDImageLoaderProgressBlock)progressBlock |
| 174 | + completed:(nullable SDExternalCompletionBlock)completedBlock; |
| 175 | + |
142 | 176 | @end
|
0 commit comments