Interactive previews iPhone

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.

Disable Automatic Photos Picker Dismissal - iOS on iPhone - Portrait - Liquid Glass - Light Mode - Preview

Platform Compatibility

iOS 27.3+ iPadOS 27.3+ macOS 27.3+ visionOS 27.3+

Tags

SwiftUI Code

Docs
@State private var selectedPhoto: PhotosPickerItem?

var body: some View {
    PhotosPicker("FooBar", selection: $selectedPhoto)
        .photosPickerAutomaticDismissDisabled()
}

Found an issue or have a suggestion?

Created: November 17, 2026Updated: November 17, 2026

More PhotosPicker Components

View all
Photos Picker - iOS on iPhone - Portrait - Liquid Glass - Light Mode - Preview
initializer

Photos Picker

Creates a picker with a title key and selection, and optionally configures the types of items to show and item encoding behavior.

Photos Picker Title - iPadOS - Landscape - Liquid Glass - Light Mode - Preview
modifier

Photos Picker Title

Overrides the title of the Photos picker. The title is not visible on small screens, like the iPhone.

Photos Picker Prompt - iOS on iPhone - Portrait - Liquid Glass - Light Mode - Preview
modifier

Photos Picker Prompt

Sets the prompt of the Photos picker.

On Secondary Photos Picker Action - iOS on iPhone - Portrait - Liquid Glass - Light Mode - Preview
modifier

On Secondary Photos Picker Action

Sets the secondary action handler for the Photos picker.

On Primary Photos Picker Action - iOS on iPhone - Portrait - Liquid Glass - Light Mode - Preview
modifier

On Primary Photos Picker Action

Sets the primary action handler for the Photos picker.

Container Photo Picker - iOS on iPhone - Portrait - Liquid Glass - Light Mode - Preview
modifier

Container Photo Picker

Limits the Photos picker to only show items in the specified container. In this case, to the user-created album "CustomAlbum".

Custom Photo Picker Buttons - iOS on iPhone - Portrait - Liquid Glass - Light Mode - Preview
modifier

Custom Photo Picker Buttons

Sets the primary and secondary button types of the Photos picker.

Range Photo Picker - iOS on iPhone - Portrait - Liquid Glass - Light Mode - Preview
modifier

Range Photo Picker

Presents a Photos picker that selects a collection of PhotosPickerItem, constrained to a range of selection counts.

Explore Other Components

Browse all
UIKit Text Colors - iOS on iPhone - Portrait - Flat Design - Light Mode - Preview
type

UIKit Text Colors

The UIKit text colors that are also used in other components, such as the TextField

Menu Action Button - iOS on iPhone - Portrait - Liquid Glass - Light Mode - Preview
initializer

Menu Action Button

Acts like a button and opens the menu on a secondary gesture

GraphicalDatePickerStyle - iOS on iPhone - Portrait - Liquid Glass - Light Mode - Preview
style

GraphicalDatePickerStyle

A date picker style that displays an interactive calendar or clock

Button Roles - iOS on iPhone - Portrait - Liquid Glass - Light Mode - Preview
style

Button Roles

A value that describes the purpose of a button.

Custom Value Label Picker - iOS on iPhone - Portrait - Liquid Glass - Light Mode - Preview
initializer

Custom Value Label Picker

Creates a picker that generates its label from a localized string key and accepts a custom current value label.

Horizontal Radio Group Layout - macOS - Liquid Glass - Light Mode - Preview
modifier

Horizontal Radio Group Layout

Sets the style for radio group style pickers within this view to be horizontally positioned with the radio buttons inside the layout.

LinearCapacityGaugeStyle - iOS on iPhone - Portrait - Liquid Glass - Light Mode - Preview
style

LinearCapacityGaugeStyle

A gauge style that displays a bar that fills from leading to trailing edges as the gauge’s current value increases

Swipe Container - iOS on iPhone - Portrait - Liquid Glass - Light Mode - Preview
modifier

Swipe Container

Only allows a single active swipe within a container.