Skip to content

Conversation

@huylv-teko
Copy link

@huylv-teko huylv-teko commented Oct 8, 2020

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 huylv-teko force-pushed the feature/limit-by-type branch from 8fd8d69 to e13ffaf Compare October 8, 2020 04:46
@huylv-teko huylv-teko force-pushed the feature/limit-by-type branch from e13ffaf to 0478932 Compare October 8, 2020 04:48
@mikaoj
Copy link
Owner

mikaoj commented Oct 20, 2020

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?

@huylv-teko huylv-teko requested a review from mikaoj October 21, 2020 09:00
@huylv-teko huylv-teko force-pushed the feature/limit-by-type branch 2 times, most recently from 7aaa5c9 to 741941c Compare October 21, 2020 09:03
@huylv-teko huylv-teko force-pushed the feature/limit-by-type branch from 741941c to 568a85f Compare October 21, 2020 09:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants