I am using photoAndVideo and multiple selectable settings. I want to be able to select only photos and only videos.How can i do
I ask a question for the first time. First, I'm sorry if I make a mistake.
I am planning to select multiple items such as config.library.maxNumberOfItems = 3.
But if you select a photo, you don't want to let the video select. If you select a video, you don't want to let the photo select.
It may be possible to judge MediaType with the DidSelect method of CollectionView in YPLibraryVC + CollectionView.swift and process alerts and non-selection based on the judgment. But I don't know after that.
I hope someone will support me. thank you.
※ I had a similar question, but I don't know if it's solved. ・How does YPImagePicker set it to not be able to select both video and image at the same time #431 ・How to disable multiple selection if video item is being selected? #486
Did you see ?
/// Choose what media types are available in the library. Defaults to `.photo`
public var mediaType = YPlibraryMediaType.photo
@keiitix I'm afraid the feature you're describing does not exist. Also, such a feature might look odd UX-wise, as after selection the first video, all pictures would disappear from the library screen.I think UX wise you might be better of solving that by having two buttons prior to showing the picker: "Choose videos" & "Choose photos" and customise each picker accordingly. Hope this helps ( and congrats for your first question 👏 ) !