ImagePickerControllerImpl
@MainActor
open class ImagePickerControllerImpl : NSObject, ImagePickerPlugin, @unchecked Sendable
自定义图片选取插件
-
单例模式
Declaration
Swift
@objc(sharedInstance) @MainActor public static let shared: ImagePickerControllerImpl
-
是否显示相册列表控制器,默认为NO,点击titleView切换相册
Declaration
Swift
@MainActor open var showsAlbumController: Bool
-
自定义相册列表控制器句柄,默认nil时使用自带控制器
Declaration
Swift
@MainActor open var albumControllerBlock: (@MainActor @Sendable () -> ImageAlbumController)?
-
自定义图片预览控制器句柄,默认nil时使用自带控制器
Declaration
Swift
@MainActor open var previewControllerBlock: (@MainActor @Sendable () -> ImagePickerPreviewController)?
-
自定义图片选取控制器句柄,默认nil时使用自带控制器
Declaration
Swift
@MainActor open var pickerControllerBlock: (@MainActor @Sendable () -> ImagePickerController)?
-
自定义图片裁剪控制器句柄,预览控制器未自定义时生效,默认nil时使用自带控制器
Declaration
Swift
@MainActor open var cropControllerBlock: (@MainActor @Sendable (UIImage) -> ImageCropController)?
-
自定义视频导出质量,默认nil时不处理
Declaration
Swift
@MainActor open var videoExportPreset: String?
-
图片选取全局自定义句柄,show方法自动调用
Declaration
Swift
@MainActor open var customBlock: (@MainActor @Sendable (ImagePickerController) -> Void)?
-
Declaration
Swift
@MainActor open func showImagePicker( filterType: ImagePickerFilterType, selectionLimit: Int, allowsEditing: Bool, customBlock: (@MainActor @Sendable (Any) -> Void)?, completion: @escaping @MainActor @Sendable ([Any], [Any], Bool) -> Void, in viewController: UIViewController )