FWImagePreviewPluginController
@protocol FWImagePreviewPluginController <NSObject>
图片预览插件控制器协议,使用图片预览插件
-
显示图片预览(简单版)
Declaration
Objective-C
- (void)showImagePreviewWithImageURLs:(nonnull NSArray *)imageURLs imageInfos:(nullable NSArray *)imageInfos currentIndex:(NSInteger)currentIndex sourceView: (nullable id _Nullable (^)(NSInteger))sourceView;
Parameters
imageURLs
预览图片列表,支持NSString|UIImage|PHLivePhoto|AVPlayerItem类型
imageInfos
自定义图片信息数组
currentIndex
当前索引,默认0
sourceView
来源视图,可选,支持UIView|NSValue.CGRect,默认nil
-
-showImagePreviewWithImageURLs:
imageInfos: currentIndex: sourceView: placeholderImage: renderBlock: customBlock: 显示图片预览(详细版)
Declaration
Objective-C
- (void) showImagePreviewWithImageURLs:(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
imageURLs
预览图片列表,支持NSString|UIImage|PHLivePhoto|AVPlayerItem类型
imageInfos
自定义图片信息数组
currentIndex
当前索引,默认0
sourceView
来源视图句柄,支持UIView|NSValue.CGRect,默认nil
placeholderImage
占位图或缩略图句柄,默认nil
renderBlock
自定义渲染句柄,默认nil
customBlock
自定义句柄,默认nil