On Primary Photos Picker Action
Sets the primary action handler for the Photos picker.
Platform Compatibility
Tags
SwiftUI Code
@State private var selectedPhotos: [PhotosPickerItem] = []
var body: some View {
PhotosPicker(
"FooBar",
selection: $selectedPhotos,
selectionRange: 2 ... 5
)
.photosPickerOnPrimaryAction {
print("selection confirmed")
}
}