longitachi / ZLPhotoBrowser

Wechat-like image picker. Support select photos, videos, gif and livePhoto. Support edit image and crop video. 微信样式的图片选择器,支持预览/相册内拍照及录视频、拖拽/滑动选择,编辑图片/视频,支持多语言国际化等功能;
MIT License
4.8k stars 975 forks source link

ZLClipImageViewController外部无法使用的问题 #946

Closed zhhehj13 closed 1 week ago

zhhehj13 commented 4 weeks ago

ZLClipImageViewController控制器怎么外部无法使用啊

zhhehj13 commented 4 weeks ago

最新版本4.5.6

longitachi commented 1 week ago

ZLClipImageViewController的权限没有设为public,所以外界无法直接使用,可以通过下面的配置来直接调用ZLClipImageViewController

ZLPhotoConfiguration.default()
    .editImageConfiguration
    .tools([.clip])
    .showClipDirectlyIfOnlyHasClipTool(true)

ZLEditImageViewController.showEditImageVC(
    parentVC: UIViewController?,
    animate: Bool = false,
    image: UIImage,
    editModel: ZLEditImageModel? = nil,
    cancel: (() -> Void)? = nil,
    completion: ((UIImage, ZLEditImageModel?) -> Void)?
)