SwiftUI.cc
SwiftUI collection

Controls SwiftUI reference, page 2

Continue browsing SwiftUI controls examples and API notes.

Showing 10-18 of 20 reference pages
PreviousPage 2 of 3Next

PhotosPicker presents the photo library without permission prompts and returns PhotosPickerItem values you load asynchronously via Transferable into Image or Data.

4 min readOpen

Menu collects actions behind one button with full support for sections, nested submenus, destructive roles, primaryAction, and menuOrder control.

4 min readOpen

Gauge shows a value within bounds — linear bars or circular dials — with current/min/max labels and accessoryCircular styles sized for compact dashboards.

4 min readOpen

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.

3 min readOpen

DisclosureGroup hides detail behind a chevron with optional isExpanded bindings for programmatic control, custom labels, and nested groups for settings trees.

3 min readOpen

ControlGroup visually unifies related controls — undo/redo, zoom in/out — adapting per context, with compactMenu and palette styles condensing groups in menus and toolbars.

3 min readOpen

ShareLink opens the system share sheet for any Transferable item — URLs, strings, images — with SharePreview controlling the title and thumbnail shown.

3 min readOpen

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.

3 min readOpen

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.

3 min readOpen