Controls SwiftUI reference, page 2
Continue browsing SwiftUI controls examples and API notes.
PhotosPicker presents the photo library without permission prompts and returns PhotosPickerItem values you load asynchronously via Transferable into Image or Data.
Gauge shows a value within bounds — linear bars or circular dials — with current/min/max labels and accessoryCircular styles sized for compact dashboards.
ProgressView spins while waiting and fills while completing. Set value and total for determinate progress, label the current state, and tint or restyle as needed.
DisclosureGroup hides detail behind a chevron with optional isExpanded bindings for programmatic control, custom labels, and nested groups for settings trees.
ControlGroup visually unifies related controls — undo/redo, zoom in/out — adapting per context, with compactMenu and palette styles condensing groups in menus and toolbars.
ShareLink opens the system share sheet for any Transferable item — URLs, strings, images — with SharePreview controlling the title and thumbnail shown.
Link opens URLs in the appropriate app or browser; the openURL environment action does the same programmatically, and openURL can be overridden to intercept taps.
Label pairs icon and title with style-aware rendering; LabeledContent pairs a label with a value — the standard grammar for settings rows and detail screens.