Skip to content
This repository was archived by the owner on Aug 3, 2022. It is now read-only.

Commit c22d83c

Browse files
committed
Fix some header issue
1 parent c44728b commit c22d83c

File tree

2 files changed

+44
-6
lines changed

2 files changed

+44
-6
lines changed

Diff for: SDWebImageFLPlugin/Classes/FLAnimatedImageBridge/FLAnimatedImageView+WebCache.h

+40-6
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,8 @@
77
*/
88

99
#import <SDWebImage/SDWebImage.h>
10-
#import "UIImage+SDWebImageFLPlugin.h"
11-
12-
#if __has_include(<FLAnimatedImage/FLAnimatedImage.h>)
1310
#import <FLAnimatedImage/FLAnimatedImage.h>
14-
#else
15-
#import "FLAnimatedImage.h"
16-
#endif
11+
#import "UIImage+SDWebImageFLPlugin.h"
1712

1813
/**
1914
* Optimal frame cache size of FLAnimatedImage during initializer. (1.0.11 version later)
@@ -67,6 +62,21 @@ FOUNDATION_EXPORT SDWebImageContextOption _Nonnull const SDWebImageContextPredra
6762
placeholderImage:(nullable UIImage *)placeholder
6863
options:(SDWebImageOptions)options NS_REFINED_FOR_SWIFT;
6964

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+
7080
/**
7181
* 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
7282
* The download is asynchronous and cached.
@@ -139,4 +149,28 @@ FOUNDATION_EXPORT SDWebImageContextOption _Nonnull const SDWebImageContextPredra
139149
progress:(nullable SDImageLoaderProgressBlock)progressBlock
140150
completed:(nullable SDExternalCompletionBlock)completedBlock;
141151

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+
142176
@end

Diff for: SDWebImageFLPlugin/Classes/FLAnimatedImageBridge/FLAnimatedImageView+WebCache.m

+4
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,10 @@ - (void)sd_setImageWithURL:(nullable NSURL *)url placeholderImage:(nullable UIIm
2525
[self sd_setImageWithURL:url placeholderImage:placeholder options:options progress:nil completed:nil];
2626
}
2727

28+
- (void)sd_setImageWithURL:(nullable NSURL *)url placeholderImage:(nullable UIImage *)placeholder options:(SDWebImageOptions)options context:(nullable SDWebImageContext *)context {
29+
[self sd_setImageWithURL:url placeholderImage:placeholder options:options context:context progress:nil completed:nil];
30+
}
31+
2832
- (void)sd_setImageWithURL:(nullable NSURL *)url completed:(nullable SDExternalCompletionBlock)completedBlock {
2933
[self sd_setImageWithURL:url placeholderImage:nil options:0 progress:nil completed:completedBlock];
3034
}

0 commit comments

Comments
 (0)