Ensures the order in which they were picked (with numbered badge selection)
This commit is contained in:
1 parent
c08e4a2fdd
commit
ca5da7b5cd
1 file changed
+1
-1
@@ -117,7 +117,7 @@ struct MediaPicker: UIViewControllerRepresentable {
|
||||
var configuration = PHPickerConfiguration(photoLibrary: .shared())
|
||||
configuration.selectionLimit = 0 // Allows multiple media selection
|
||||
configuration.filter = imagesOnly ? .images : .any(of: [.images, .videos])
|
||||
|
||||
configuration.selection = .ordered // images are returned in the order they were selected + numbered badge displayed
|
||||
let picker = PHPickerViewController(configuration: configuration)
|
||||
picker.delegate = context.coordinator as any PHPickerViewControllerDelegate
|
||||
return picker
|
||||
|
||||
Reference in new issue
Block a user