Disable Automatic Photos Picker Dismissal
Prevents the Photos picker from dismissing automatically. Without this modifier, the Photos picker would automatically dismiss when an image is tapped.
Platform Compatibility
Tags
SwiftUI Code
@State private var selectedPhoto: PhotosPickerItem?
var body: some View {
PhotosPicker("FooBar", selection: $selectedPhoto)
.photosPickerAutomaticDismissDisabled()
}