FWImagePlugin
@protocol FWImagePlugin <NSObject>
图片插件协议,应用可自定义图片插件
-
获取imageView正在加载的URL插件方法
Declaration
Objective-C
- (nullable NSURL *)imageURL:(nonnull UIImageView *)imageView;
-
imageView加载网络图片插件方法
Declaration
Objective-C
- (void)imageView:(nonnull UIImageView *)imageView setImageURL:(nullable NSURL *)imageURL placeholder:(nullable UIImage *)placeholder options:(FWWebImageOptions)options context:(nullable NSDictionary<FWImageCoderOptions, id> *)context completion:(nullable void (^)(UIImage *_Nullable __strong, NSError *_Nullable __strong))completion progress:(nullable void (^)(double))progress;
-
imageView取消加载网络图片请求插件方法
Declaration
Objective-C
- (void)cancelImageRequest:(nonnull UIImageView *)imageView;
-
image下载网络图片插件方法,返回下载凭据
Declaration
Objective-C
- (nullable id) downloadImage:(nullable NSURL *)imageURL options:(FWWebImageOptions)options context:(nullable NSDictionary<FWImageCoderOptions, id> *)context completion:(nonnull void (^)(UIImage *_Nullable __strong, NSError *_Nullable __strong))completion progress:(nullable void (^)(double))progress;
-
image取消下载网络图片插件方法,指定下载凭据
Declaration
Objective-C
- (void)cancelImageDownload:(nullable id)receipt;
-
创建动画视图插件方法,默认使用UIImageView
Declaration
Objective-C
- (nonnull UIImageView *)animatedImageView;
-
image本地解码插件方法,默认使用系统方法
Declaration
Objective-C
- (nullable UIImage *) imageDecode:(nonnull NSData *)data scale:(CGFloat)scale options:(nullable NSDictionary<FWImageCoderOptions, id> *)options;
-
image本地编码插件方法,默认使用系统方法
Declaration
Objective-C
- (nullable NSData *) imageEncode:(nonnull UIImage *)image options:(nullable NSDictionary<FWImageCoderOptions, id> *)options;