BSImagePicker icon indicating copy to clipboard operation
BSImagePicker copied to clipboard

Limit number of image or video

Open huylv-teko opened this issue 5 years ago • 1 comments

If you want to limit number of image or video when select, set this:

imagePicker.settings.fetch.assets.supportedMediaTypes = [.image(max: 2), .video(max: 1)]

And when you select the third image, it should invoke this function:

func imagePicker(_ imagePicker: ImagePickerController, didReachSelectionLimitForType type: PHAssetMediaType)

huylv-teko avatar Oct 08 '20 04:10 huylv-teko

I don't mind adding a per asset type selection limit. But this to me looks like it can be confusing to use as there now is multiple ways to set a selection limit.

Do you think there is any way you can re-think how it is implemented?

mikaoj avatar Oct 20 '20 17:10 mikaoj