FWImagePreviewPlugin
@protocol FWImagePreviewPlugin <NSObject>
图片预览插件协议,应用可自定义图片预览插件实现
-
-viewController:showImagePreview: imageInfos: currentIndex: sourceView: placeholderImage: renderBlock: customBlock: 显示图片预览方法
Declaration
Objective-C
- (void)viewController:(nonnull UIViewController *)viewController showImagePreview:(nonnull NSArray *)imageURLs imageInfos:(nullable NSArray *)imageInfos currentIndex:(NSInteger)currentIndex sourceView:(nullable id _Nullable (^)(NSInteger))sourceView placeholderImage: (nullable UIImage *_Nullable (^)(NSInteger))placeholderImage renderBlock:(nullable void (^)(__kindof UIView *_Nonnull __strong, NSInteger))renderBlock customBlock:(nullable void (^)(id _Nonnull __strong))customBlock;Parameters
viewController当前视图控制器
imageURLs预览图片列表,支持NSString|UIImage|PHLivePhoto|AVPlayerItem类型
imageInfos自定义图片信息数组
currentIndex当前索引,默认0
sourceView来源视图句柄,支持UIView|NSValue.CGRect,默认nil
placeholderImage占位图或缩略图句柄,默认nil
renderBlock自定义渲染句柄,默认nil
customBlock自定义配置句柄,默认nil
FWImagePreviewPlugin Protocol Reference