Might be too late now, but this worked for me: https://gist.github.com/JadenGeller/afb907745865052ed59c53b5ca9f8671
Update: I've just notice this Xcode debug warning when running the app:
Presenting view controller <PHPickerViewController: 0x103240080> from detached view controller <UIViewController: 0x1036bcca0> is not supported, and may result in incorrect safe area insets and a corrupt root presentation. Make sure <UIViewController: 0x1036bcca0> is in the view controller hierarchy before presenting from it. Will become a hard exception in a future release.
So it might not be a viable solution
Cheers
Gavin
Topic:
UI Frameworks
SubTopic:
SwiftUI
Tags: