SilenceLove / HXPHPicker

Photo/Video Selector-Supports LivePhoto, GIF selection, online download of resources on iCloud, and editing of photos/videos
MIT License
364 stars 74 forks source link

大佬可不可以限制选择图片尺寸大小 #67

Closed shandawy closed 2 years ago

shandawy commented 2 years ago

/// 照片选择的最大文件大小,为0则不限制 public var maximumSelectedPhotoFileSize: Int = 0

能限制图片尺寸吗

SilenceLove commented 2 years ago

可以通过这个回调处理 尺寸大小 photoAsset.imageSize

/// 将要选择cell 不能选择时需要自己手动弹出提示框
    /// - Parameters:
    ///   - pickerController: 对应的 PhotoPickerController
    ///   - photoAsset: 对应的 PhotoAsset 数据
    func pickerController(
        _ pickerController: PhotoPickerController,
        shouldSelectedAsset photoAsset: PhotoAsset,
        atIndex: Int
    ) -> Bool