PHPickerViewController swipe to dismiss stops working after selecting photo

80 Views Asked by At

I present a PHPickerViewController as a pagesheet. It is possible to close/dismiss the picker interactively by just swiping down (or tapping outside on iPad).

However once you tap a photo this no longer works. The pagesheets does move a bit if you try but it just snaps back.

I tried setting the presentationController delegate but shouldDismiss() never gets called. Deselecting the photo by tapping again has no effect either. isModalInPresentation gets ignored too, also when you use it in the callback after you select a photo.

To try it out yourself just use this line:

present(PHPickerViewController(configuration: PHPickerConfiguration()), animated: true, completion: nil)

Does anyone have any suggestions?

0

There are 0 best solutions below