longitachi / ZLPhotoBrowser

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

iPad项目,只设置两种横屏模式的时候,编辑图片时崩溃 #807

Closed OriTheElf closed 1 year ago

OriTheElf commented 1 year ago

iPad项目,只设置两种横屏模式的时候,编辑图片时崩溃

Description

项目中设置iPad Orientation:Landscape Left和Landscape Right,运行项目选择图片-编辑图片,项目崩溃 错误提示: Thread 1: "Supported orientations has no common orientation with the application, and [ZLPhotoBrowser.ZLEditImageViewController shouldAutorotate] is returning YES"

Info

ZLPhotoBrowser version: e.g. 4.3.9 Device: e.g. iPad Device version: e.g. iOS 16.3.1 Xcode version: e.g. Xcode 14.2

Configuration code of ZLPhotoConfiguration

        let config = ZLPhotoConfiguration.default()
            .maxSelectCount(count)
            .allowSelectVideo(false)
            .allowTakePhotoInLibrary(false)
            .allowEditImage(allowsEditing)
            .allowSelectOriginal(false) // 不允许选择原图

        config.cameraConfiguration
            .allowRecordVideo(false)

        config.editImageConfiguration
            .tools([.clip])
            .clipRatios([.wh1x1])

        let ps = ZLPhotoPreviewSheet()
        ps.selectImageBlock = {
            [unowned self] results, isOriginal in
            ...
        }
        ps.showPhotoLibrary(sender: self)