longitachi / ZLPhotoBrowser

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

'editImageClipRatios' is deprecated: Use editImageConfiguration, this property will be removed #683

Closed skywalkerlw closed 2 years ago

skywalkerlw commented 2 years ago

How to replace editImageClipRatios with editImageConfiguration in my example below

let ac = ZLPhotoPreviewSheet()
            let config = ZLPhotoConfiguration.default()
            config.editImageClipRatios = [.circle]  //here
            config.maxSelectCount = 1
            config.allowSelectVideo = false
            ac.selectImageBlock = { images, _, _ in
                if let image = images.first {
                    self.shopAvatarImage = image
                }
            }
            ac.showPhotoLibrary(sender: topViewController)
longitachi commented 2 years ago

https://github.com/longitachi/ZLPhotoBrowser/wiki/How-to-use-(Swift)#Use-image-editor