Skip to content

Commit

Permalink
fix(iOS): multiple videos picker
Browse files Browse the repository at this point in the history
  • Loading branch information
ajpinedam committed Apr 14, 2024
1 parent d88463a commit c21d929
Showing 1 changed file with 13 additions and 4 deletions.
17 changes: 13 additions & 4 deletions src/Uno.UWP/Storage/Pickers/FileOpenPicker.iOS.cs
Original file line number Diff line number Diff line change
Expand Up @@ -66,13 +66,22 @@ private UIViewController GetViewController(bool multiple, TaskCompletionSource<S
};

case PickerLocationId.PicturesLibrary when multiple is true && iOS14AndAbove is true:
case PickerLocationId.VideosLibrary when multiple is true && iOS14AndAbove is true:
var configuration = new PHPickerConfiguration
var imageConfiguration = new PHPickerConfiguration
{
Filter = PHPickerFilter.ImagesFilter,
SelectionLimit = multiple ? 0 : 1
SelectionLimit = 0
};
return new PHPickerViewController(imageConfiguration)
{
Delegate = new PhotoPickerDelegate(completionSource)
};
case PickerLocationId.VideosLibrary when multiple is true && iOS14AndAbove is true:
var videoConfiguration = new PHPickerConfiguration
{
Filter = PHPickerFilter.VideosFilter,
SelectionLimit = 0
};
return new PHPickerViewController(configuration)
return new PHPickerViewController(videoConfiguration)
{
Delegate = new PhotoPickerDelegate(completionSource)
};
Expand Down

0 comments on commit c21d929

Please sign in to comment.