ImagePreviewPluginImpl

@MainActor
open class ImagePreviewPluginImpl : NSObject, ImagePreviewPlugin, @unchecked Sendable

默认图片预览插件

Accessor

  • 单例模式

    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)?

ImagePreviewPlugin