ImagePreviewPluginImpl
@MainActor
open class ImagePreviewPluginImpl : NSObject, ImagePreviewPlugin, @unchecked Sendable
默认图片预览插件
-
单例模式
Declaration
Swift
@objc(sharedInstance) @MainActor public static let shared: ImagePreviewPluginImpl
-
自定义图片预览控制器句柄,默认nil时使用自带控制器,显示分页,点击图片|视频时关闭,present样式为zoom
Declaration
Swift
@MainActor open var previewControllerBlock: (@MainActor @Sendable () -> ImagePreviewController)?
-
图片预览全局自定义句柄,show方法自动调用
Declaration
Swift
@MainActor open var customBlock: (@MainActor @Sendable (ImagePreviewController) -> Void)?
-
showImagePreview(imageURLs:
imageInfos: currentIndex: sourceView: placeholderImage: renderBlock: customBlock: in: ) Declaration
Swift
@MainActor open func showImagePreview( imageURLs: [Any], imageInfos: [Any]?, currentIndex: Int, sourceView: (@MainActor @Sendable (Int) -> Any?)?, placeholderImage: (@MainActor @Sendable (Int) -> UIImage?)?, renderBlock: (@MainActor @Sendable (UIView, Int) -> Void)?, customBlock: (@MainActor @Sendable (Any) -> Void)? = nil, in viewController: UIViewController )