One Logo Pool Ball
App Frameworks · IOS API REFERENCE

SwiftUI

Declare the user interface and behavior for your app on every platform.

939 types

1,535 callable entries

2,059 skipped

43% entry coverage

Generated from iOS SDK 27.1. Availability is shown on each declaration; permissions and entitlements still apply.

Types

AccessibilityAttachmentModifier

struct · iOS 13.0+

AccessibilityAttachmentModifier.Body

typealias · iOS 13.0+

AccessibilityChildBehavior

struct · iOS 13.0+

AccessibilityFocusState

struct · iOS 15.0+

AccessibilityFocusState.Binding

struct · iOS 15.0+

AccessibilityLabeledPairRole

enum · iOS 14.0+

AccessibilityRotorContent

protocol · iOS 15.0+

AccessibilityRotorContentBuilder

struct · iOS 15.0+

AccessibilityRotorEntry

struct · iOS 15.0+

AccessibilityRotorEntry.Body

typealias · iOS 15.0+

AccessibilitySystemRotor

struct · iOS 15.0+

AccessoryCircularCapacityGaugeStyle

struct · iOS 16.0+

AccessoryCircularCapacityGaugeStyle.Body

typealias · iOS 16.0+

AccessoryCircularGaugeStyle

struct · iOS 16.0+

AccessoryCircularGaugeStyle.Body

typealias · iOS 16.0+

AccessoryLinearCapacityGaugeStyle

struct · iOS 16.0+

AccessoryLinearCapacityGaugeStyle.Body

typealias · iOS 16.0+

AccessoryLinearGaugeStyle

struct · iOS 16.0+

AccessoryLinearGaugeStyle.Body

typealias · iOS 16.0+

ActionSheet

struct · iOS 13.0+ · Deprecated in iOS 100000.0

ActionSheet.Button

typealias · iOS 13.0+ · Deprecated in iOS 100000.0

AdaptableTabBarPlacement

struct · iOS 18.0+

Alert

struct · iOS 13.0+ · Deprecated in iOS 100000.0

Alert.Button

struct · iOS 13.0+ · Deprecated in iOS 100000.0

AnimatableModifier

protocol · iOS 13.0+ · Deprecated in iOS 100000.0

AnimationTimelineSchedule

struct · iOS 15.0+

AnimationTimelineSchedule.Entries

struct · iOS 15.0+

AnimationTimelineSchedule.Entries.Element

typealias · iOS 15.0+

AnimationTimelineSchedule.Entries.Iterator

typealias · iOS 15.0+

AnyNavigationTransition

struct · iOS 27.0+

AnyScrollTargetBehavior

struct · iOS 18.0+

AnyTabContent

struct · iOS 18.0+

AnyTabContent.Body

typealias · iOS 18.0+

AnyTabContent.TabValue

typealias · iOS 18.0+

App

protocol · iOS 14.0+

AppStorage

struct · iOS 14.0+

AssistiveAccess

struct · iOS 26.0+

AssistiveAccess.Body

typealias · iOS 26.0+

AsyncImage

struct · iOS 15.0+

AsyncImage.Body

typealias · iOS 15.0+

AsyncImagePhase

enum · iOS 15.0+

AttributedTextFormatting.Transferable

struct · iOS 26.0+

AttributedTextFormatting.Transferable.Representation

typealias · iOS 26.0+

AttributedTextSelection

struct · iOS 26.0+

AttributedTextSelection.Attributes

struct · iOS 26.0+

AttributedTextSelection.Attributes.Element

typealias · iOS 26.0+

AttributedTextSelection.Attributes.Iterator

typealias · iOS 26.0+

AttributedTextSelection.Indices

enum · iOS 26.0+

AutomaticControlGroupStyle

struct · iOS 15.0+

AutomaticControlGroupStyle.Body

typealias · iOS 15.0+

AutomaticDisclosureGroupStyle

struct · iOS 16.0+

AutomaticDisclosureGroupStyle.Body

typealias · iOS 16.0+

AutomaticFormStyle

struct · iOS 16.0+

AutomaticFormStyle.Body

typealias · iOS 16.0+

AutomaticLabeledContentStyle

struct · iOS 16.0+

AutomaticLabeledContentStyle.Body

typealias · iOS 16.0+

AutomaticNavigationSplitViewStyle

struct · iOS 16.0+

AutomaticNavigationSplitViewStyle.Body

typealias · iOS 16.0+

AutomaticNavigationTransition

struct · iOS 18.0+

AutomaticPresentationSizing

struct · iOS 18.0+

AutomaticTableStyle

struct · iOS 16.0+

AutomaticTableStyle.Body

typealias · iOS 16.0+

AutomaticTextEditorStyle

struct · iOS 17.0+

AutomaticTextEditorStyle.Body

struct · iOS 17.0+

AutomaticTextEditorStyle.Body.Body

typealias · iOS 17.0+

BackgroundTask

struct · iOS 16.0+

BadgeProminence

struct · iOS 17.0+

BalancedNavigationSplitViewStyle

struct · iOS 16.0+

BalancedNavigationSplitViewStyle.Body

typealias · iOS 16.0+

BorderedButtonStyle

struct · iOS 15.0+

BorderedButtonStyle.Body

typealias · iOS 15.0+

BorderedProminentButtonStyle

struct · iOS 15.0+

BorderedProminentButtonStyle.Body

typealias · iOS 15.0+

BorderedTextFieldStyle

struct · iOS 27.0+

BorderlessButtonMenuStyle

struct · iOS 14.0+ · Deprecated in iOS 100000.0

BorderlessButtonMenuStyle.Body

typealias · iOS 14.0+ · Deprecated in iOS 100000.0

BorderlessButtonStyle

struct · iOS 13.0+

BorderlessButtonStyle.Body

typealias · iOS 13.0+

Button

struct · iOS 13.0+

Button.Body

typealias · iOS 13.0+

ButtonBorderShape

struct · iOS 15.0+

ButtonBorderShape.AnimatableData

typealias · iOS 17.0+

ButtonBorderShape.Body

typealias · iOS 17.0+

ButtonBorderShape.InsetShape

typealias · iOS 17.0+

ButtonMenuStyle

struct · iOS 16.0+

ButtonMenuStyle.Body

typealias · iOS 16.0+

ButtonRepeatBehavior

struct · iOS 17.0+

ButtonRole

struct · iOS 15.0+

ButtonStyle

protocol · iOS 13.0+

ButtonStyle.Configuration

typealias · iOS 13.0+

ButtonStyleConfiguration

struct · iOS 13.0+

ButtonStyleConfiguration.Label

struct · iOS 13.0+

ButtonStyleConfiguration.Label.Body

typealias · iOS 13.0+

ButtonToggleStyle

struct · iOS 15.0+

ButtonToggleStyle.Body

typealias · iOS 15.0+

CameraCaptureAccessory

struct · iOS 27.1+

CameraCaptureAccessory.Body

typealias · iOS 27.1+

CircularProgressViewStyle

struct · iOS 14.0+

CircularProgressViewStyle.Body

typealias · iOS 14.0+

Color.Representation

typealias · iOS 16.0+

ColorPicker

struct · iOS 14.0+

ColorPicker.Body

typealias · iOS 14.0+

ColumnNavigationViewStyle

struct · iOS 15.0+ · Deprecated in iOS 100000.0

ColumnsFormStyle

struct · iOS 16.0+

ColumnsFormStyle.Body

typealias · iOS 16.0+

CommandGroup

struct · iOS 14.0+

CommandGroup.Body

typealias · iOS 14.0+

CommandGroupPlacement

struct · iOS 14.0+

CommandMenu

struct · iOS 14.0+

CommandMenu.Body

typealias · iOS 14.0+

Commands

protocol · iOS 14.0+

CommandsBuilder

struct · iOS 14.0+

CompactDatePickerStyle

struct · iOS 14.0+

CompactDatePickerStyle.Body

typealias · iOS 14.0+

CompactMenuControlGroupStyle

struct · iOS 16.4+

CompactMenuControlGroupStyle.Body

typealias · iOS 16.4+

ContainerBackgroundPlacement

struct · iOS 17.0+

ContentMarginPlacement

struct · iOS 17.0+

ContentToolbarPlacement

struct · iOS 18.4+

ContentUnavailableView

struct · iOS 17.0+

ContentUnavailableView.Body

typealias · iOS 17.0+

ContextMenu

struct · iOS 13.0+ · Deprecated in iOS 100000.0

ControlGroup

struct · iOS 15.0+

ControlGroup.Body

typealias · iOS 15.0+

ControlGroupStyle

protocol · iOS 15.0+

ControlGroupStyle.Configuration

typealias · iOS 15.0+

ControlGroupStyleConfiguration

struct · iOS 15.0+

ControlGroupStyleConfiguration.Content

struct · iOS 15.0+

ControlGroupStyleConfiguration.Content.Body

typealias · iOS 15.0+

ControlGroupStyleConfiguration.Label

struct · iOS 16.0+

ControlGroupStyleConfiguration.Label.Body

typealias · iOS 16.0+

ControlWidget

protocol · iOS 18.0+

ControlWidgetConfiguration

protocol · iOS 18.0+

ControlWidgetConfigurationBuilder

struct · iOS 18.0+

ControlWidgetTemplate

protocol · iOS 18.0+

ControlWidgetTemplateBuilder

struct · iOS 18.0+

CrossFadeNavigationTransition

struct · iOS 27.0+

CustomizableToolbarContent

protocol · iOS 14.0+

CustomPresentationDetent

protocol · iOS 16.0+

CustomPresentationDetent.Context

typealias · iOS 16.0+

DatePicker

struct · iOS 13.0+

DatePicker.Body

typealias · iOS 13.0+

DatePicker.Components

typealias · iOS 13.0+

DatePickerComponents

struct · iOS 13.0+

DatePickerComponents.ArrayLiteralElement

typealias · iOS 13.0+

DatePickerComponents.Element

typealias · iOS 13.0+

DatePickerComponents.RawValue

typealias · iOS 13.0+

DatePickerStyle

protocol · iOS 13.0+

DatePickerStyle.Configuration

typealias · iOS 16.0+

DatePickerStyleConfiguration

struct · iOS 16.0+

DatePickerStyleConfiguration.Label

struct · iOS 16.0+

DatePickerStyleConfiguration.Label.Body

typealias · iOS 16.0+

DefaultButtonLabel

struct · iOS 26.0+

DefaultButtonLabel.Body

typealias · iOS 26.0+

DefaultButtonStyle

struct · iOS 13.0+

DefaultButtonStyle.Body

typealias · iOS 13.0+

DefaultDatePickerStyle

struct · iOS 13.0+

DefaultDatePickerStyle.Body

typealias · iOS 13.0+

DefaultDateProgressLabel

struct · iOS 16.0+

DefaultDateProgressLabel.Body

typealias · iOS 16.0+

DefaultDocumentGroupLaunchActions

struct · iOS 18.0+

DefaultDocumentGroupLaunchActions.Body

typealias · iOS 18.0+

DefaultFocusEvaluationPriority

struct · iOS 16.0+

DefaultGaugeStyle

struct · iOS 16.0+

DefaultGaugeStyle.Body

typealias · iOS 16.0+

DefaultGroupBoxStyle

struct · iOS 14.0+

DefaultGroupBoxStyle.Body

typealias · iOS 14.0+

DefaultLabelStyle

struct · iOS 14.0+

DefaultLabelStyle.Body

typealias · iOS 14.0+

DefaultListStyle

struct · iOS 13.0+

DefaultMenuStyle

struct · iOS 14.0+

DefaultMenuStyle.Body

typealias · iOS 14.0+

DefaultNavigationViewStyle

struct · iOS 13.0+ · Deprecated in iOS 100000.0

DefaultNewDocumentButtonLabel

struct · iOS 27.0+

DefaultNewDocumentButtonLabel.Body

typealias · iOS 27.0+

DefaultPickerStyle

struct · iOS 13.0+

DefaultProgressViewStyle

struct · iOS 14.0+

DefaultProgressViewStyle.Body

typealias · iOS 14.0+

DefaultShareLinkLabel

struct · iOS 16.0+

DefaultShareLinkLabel.Body

typealias · iOS 16.0+

DefaultTabLabel

struct · iOS 18.0+

DefaultTabLabel.Body

typealias · iOS 18.0+

DefaultTabViewStyle

struct · iOS 14.0+

DefaultTextFieldStyle

struct · iOS 13.0+

DefaultToggleStyle

struct · iOS 13.0+

DefaultToggleStyle.Body

typealias · iOS 13.0+

DefaultToolbarItem

struct · iOS 26.0+

DefaultToolbarItem.Body

typealias · iOS 26.0+

DialogSeverity

struct · iOS 17.0+

DisclosureGroup

struct · iOS 14.0+

DisclosureGroup.Body

typealias · iOS 14.0+

DisclosureGroupStyle

protocol · iOS 16.0+

DisclosureGroupStyle.Configuration

typealias · iOS 16.0+

DisclosureGroupStyleConfiguration

struct · iOS 16.0+

DisclosureGroupStyleConfiguration.Content

struct · iOS 16.0+

DisclosureGroupStyleConfiguration.Content.Body

typealias · iOS 16.0+

DisclosureGroupStyleConfiguration.Label

struct · iOS 16.0+

DisclosureGroupStyleConfiguration.Label.Body

typealias · iOS 16.0+

DisclosureTableRow

struct · iOS 17.0+

DisclosureTableRow.TableRowBody

typealias · iOS 17.0+

DisclosureTableRow.TableRowValue

typealias · iOS 17.0+

DismissAction

struct · iOS 15.0+

DismissBehavior

struct · iOS 17.0+

DismissSearchAction

struct · iOS 15.0+

DismissWindowAction

struct · iOS 17.0+

Divider

struct · iOS 13.0+

Divider.Body

typealias · iOS 13.0+

Document

protocol · iOS 27.0+

DocumentBaseBox

protocol · iOS 17.0+

DocumentConfiguration

struct · iOS 17.0+

DocumentCreationContext

struct · iOS 27.0+

DocumentCreationSource

struct · iOS 27.0+

DocumentGroup

struct · iOS 14.0+

DocumentGroup.Body

typealias · iOS 14.0+

DocumentGroupLaunchScene

struct · iOS 18.0+

DocumentGroupLaunchScene.Body

typealias · iOS 18.0+

DocumentLaunchGeometryProxy

struct · iOS 18.0+

DocumentLaunchView

struct · iOS 18.0+

DocumentLaunchView.Body

typealias · iOS 18.0+

DocumentReadConfiguration

struct · iOS 27.0+

DocumentReader

protocol · iOS 27.0+

DocumentWriteConfiguration

struct · iOS 27.0+

DocumentWriter

protocol · iOS 27.0+

DoubleColumnNavigationViewStyle

struct · iOS 13.0+ · Deprecated in iOS 100000.0

DragConfiguration

struct · iOS 26.0+

DragConfiguration.OperationsOutsideApp

struct · iOS 26.0+

DragConfiguration.OperationsWithinApp

struct · iOS 26.0+

DragGesture

struct · iOS 13.0+

DragGesture.Body

typealias · iOS 13.0+

DragGesture.Value

struct · iOS 13.0+

DragSession

struct · iOS 26.0+

DragSession.ID

struct · iOS 26.0+

DragSession.Phase

enum · iOS 26.0+

DropConfiguration

struct · iOS 26.0+

DropDelegate

protocol · iOS 13.4+

DropInfo

struct · iOS 13.4+

DropOperation

enum · iOS 13.4+

DropOperation.Set

struct · iOS 26.0+

DropOperation.Set.ArrayLiteralElement

typealias · iOS 26.0+

DropOperation.Set.Element

typealias · iOS 26.0+

DropOperation.Set.RawValue

typealias · iOS 26.0+

DropProposal

struct · iOS 13.4+

DropSession

struct · iOS 26.0+

DropSession.ID

struct · iOS 26.0+

DropSession.LocalSession

struct · iOS 26.0+

DropSession.Phase

enum · iOS 26.0+

DynamicTableRowContent

protocol · iOS 16.0+

EditableCollectionContent

struct · iOS 16.0+

EditableCollectionContent.Body

typealias · iOS 16.0+

EditActions

struct · iOS 16.0+

EditActions.ArrayLiteralElement

typealias · iOS 16.0+

EditActions.Element

typealias · iOS 16.0+

EditActions.RawValue

typealias · iOS 16.0+

EditButton

struct · iOS 13.0+

EditButton.Body

typealias · iOS 13.0+

EditMode

enum · iOS 13.0+

EmptyCommands

struct · iOS 14.0+

EmptyCommands.Body

typealias · iOS 14.0+

EmptyControlWidgetConfiguration

struct · iOS 18.0+

EmptyControlWidgetConfiguration.Body

typealias · iOS 18.0+

EmptyControlWidgetTemplate

struct · iOS 18.0+

EmptyControlWidgetTemplate.Body

typealias · iOS 18.0+

EmptyMatchedTransitionSourceConfiguration

struct · iOS 18.0+

EmptyTableRowContent

struct · iOS 16.0+

EmptyTableRowContent.TableRowBody

typealias · iOS 16.0+

EmptyTableRowContent.TableRowValue

typealias · iOS 16.0+

EmptyWidgetConfiguration

struct · iOS 14.0+

EmptyWidgetConfiguration.Body

typealias · iOS 14.0+

EquatableView

struct · iOS 13.0+

EquatableView.Body

typealias · iOS 13.0+

ExternalNonInteractiveAccessory

struct · iOS 27.0+

ExternalNonInteractiveAccessory.Body

typealias · iOS 27.0+

FetchedResults

struct · iOS 13.0+

FetchedResults.Element

typealias · iOS 13.0+

FetchedResults.Index

typealias · iOS 13.0+

FetchedResults.Indices

typealias · iOS 13.0+

FetchedResults.Iterator

typealias · iOS 13.0+

FetchedResults.SubSequence

typealias · iOS 13.0+

FetchRequest

struct · iOS 13.0+

FetchRequest.Configuration

struct · iOS 15.0+

FileDialogBrowserOptions

struct · iOS 17.0+

FileDialogBrowserOptions.ArrayLiteralElement

typealias · iOS 17.0+

FileDialogBrowserOptions.Element

typealias · iOS 17.0+

FileDialogBrowserOptions.RawValue

typealias · iOS 17.0+

FileDocument

protocol · iOS 14.0+ · Deprecated in iOS 100000.0

FileDocument.ReadConfiguration

typealias · iOS 14.0+ · Deprecated in iOS 100000.0

FileDocument.WriteConfiguration

typealias · iOS 14.0+ · Deprecated in iOS 100000.0

FileDocumentConfiguration

struct · iOS 14.0+ · Deprecated in iOS 100000.0

FileDocumentReadConfiguration

struct · iOS 14.0+ · Deprecated in iOS 100000.0

FileDocumentWriteConfiguration

struct · iOS 14.0+ · Deprecated in iOS 100000.0

FileWrapperDocumentReader

struct · iOS 27.0+

FileWrapperDocumentReader.ReadConfiguration

typealias · iOS 27.0+

FileWrapperDocumentReader.Source

typealias · iOS 27.0+

FileWrapperDocumentWriter

struct · iOS 27.0+

FileWrapperDocumentWriter.Destination

typealias · iOS 27.0+

FileWrapperDocumentWriter.WriteConfiguration

typealias · iOS 27.0+

FindContext

struct · iOS 26.0+

FittedPresentationSizing

struct · iOS 18.0+

FocusedBinding

struct · iOS 14.0+

FocusedObject

struct · iOS 16.0+

FocusedObject.Wrapper

struct · iOS 16.0+

FocusedValue

struct · iOS 14.0+

FocusedValueKey

protocol · iOS 14.0+

FocusedValues

struct · iOS 14.0+

FocusInteractions

struct · iOS 17.0+

FocusInteractions.ArrayLiteralElement

typealias · iOS 17.0+

FocusInteractions.Element

typealias · iOS 17.0+

FocusInteractions.RawValue

typealias · iOS 17.0+

FocusState

struct · iOS 15.0+

FocusState.Binding

struct · iOS 15.0+

ForEach.Body

typealias · iOS 18.0+

ForEach.TableRowBody

typealias · iOS 16.0+

ForEach.TableRowValue

typealias · iOS 16.0+

ForEach.TabValue

typealias · iOS 18.0+

Form

struct · iOS 13.0+

Form.Body

typealias · iOS 13.0+

FormPresentationSizing

struct · iOS 18.0+

FormStyle

protocol · iOS 16.0+

FormStyle.Configuration

typealias · iOS 16.0+

FormStyleConfiguration

struct · iOS 16.0+

FormStyleConfiguration.Content

struct · iOS 16.0+

FormStyleConfiguration.Content.Body

typealias · iOS 16.0+

Gauge

struct · iOS 16.0+

Gauge.Body

typealias · iOS 16.0+

GaugeStyle

protocol · iOS 16.0+

GaugeStyle.Configuration

typealias · iOS 16.0+

GaugeStyleConfiguration

struct · iOS 16.0+

GaugeStyleConfiguration.CurrentValueLabel

struct · iOS 16.0+

GaugeStyleConfiguration.CurrentValueLabel.Body

typealias · iOS 16.0+

GaugeStyleConfiguration.Label

struct · iOS 16.0+

GaugeStyleConfiguration.Label.Body

typealias · iOS 16.0+

GaugeStyleConfiguration.MarkedValueLabel

struct · iOS 16.0+

GaugeStyleConfiguration.MarkedValueLabel.Body

typealias · iOS 16.0+

GaugeStyleConfiguration.MaximumValueLabel

struct · iOS 16.0+

GaugeStyleConfiguration.MaximumValueLabel.Body

typealias · iOS 16.0+

GaugeStyleConfiguration.MinimumValueLabel

struct · iOS 16.0+

GaugeStyleConfiguration.MinimumValueLabel.Body

typealias · iOS 16.0+

GestureState

struct · iOS 13.0+

GestureStateGesture

struct · iOS 13.0+

GestureStateGesture.Body

typealias · iOS 13.0+

GestureStateGesture.Value

typealias · iOS 13.0+

GlassButtonStyle

struct · iOS 26.0+

GlassButtonStyle.Body

typealias · iOS 26.0+

GlassProminentButtonStyle

struct · iOS 26.0+

GlassProminentButtonStyle.Body

typealias · iOS 26.0+

GraphicalDatePickerStyle

struct · iOS 14.0+

GraphicalDatePickerStyle.Body

typealias · iOS 14.0+

Grid

struct · iOS 16.0+

Grid.Body

typealias · iOS 16.0+

GridItem

struct · iOS 14.0+

GridItem.Size

enum · iOS 14.0+

GridLayout

struct · iOS 16.0+

GridLayout.AnimatableData

typealias · iOS 16.0+

GridLayout.Body

typealias · iOS 16.0+

GridLayout.Cache

struct · iOS 16.0+

GridRow

struct · iOS 16.0+

GridRow.Body

typealias · iOS 16.0+

Group.Body

typealias · iOS 18.0+

Group.TableColumnBody

typealias · iOS 16.0+

Group.TableColumnSortComparator

typealias · iOS 16.0+

Group.TableRowBody

typealias · iOS 16.0+

Group.TableRowValue

typealias · iOS 16.0+

Group.TabValue

typealias · iOS 18.0+

GroupBox

struct · iOS 14.0+

GroupBox.Body

typealias · iOS 14.0+

GroupBoxStyle

protocol · iOS 14.0+

GroupBoxStyle.Configuration

typealias · iOS 14.0+

GroupBoxStyleConfiguration

struct · iOS 14.0+

GroupBoxStyleConfiguration.Content

struct · iOS 14.0+

GroupBoxStyleConfiguration.Content.Body

typealias · iOS 14.0+

GroupBoxStyleConfiguration.Label

struct · iOS 14.0+

GroupBoxStyleConfiguration.Label.Body

typealias · iOS 14.0+

GroupedFormStyle

struct · iOS 16.0+

GroupedFormStyle.Body

typealias · iOS 16.0+

GroupedListStyle

struct · iOS 13.0+

HandGestureShortcut

struct · iOS 18.0+

HoverPhase

enum · iOS 16.0+

IconOnlyLabelStyle

struct · iOS 14.0+

IconOnlyLabelStyle.Body

typealias · iOS 14.0+

Image.Representation

typealias · iOS 16.0+

IndexedIdentifierCollection

struct · iOS 16.0+

IndexedIdentifierCollection.Element

struct · iOS 16.0+

IndexedIdentifierCollection.Index

typealias · iOS 16.0+

IndexedIdentifierCollection.Indices

typealias · iOS 16.0+

IndexedIdentifierCollection.Iterator

typealias · iOS 16.0+

IndexedIdentifierCollection.SubSequence

typealias · iOS 16.0+

IndexViewStyle

protocol · iOS 14.0+

InlinePickerStyle

struct · iOS 14.0+

InsetGroupedListStyle

struct · iOS 14.0+

InsetListStyle

struct · iOS 14.0+

InsetTableStyle

struct · iOS 16.0+

InsetTableStyle.Body

typealias · iOS 16.0+

InspectorCommands

struct · iOS 17.0+

InspectorCommands.Body

typealias · iOS 17.0+

InterfaceOrientation

struct · iOS 15.0+

InterfaceOrientation.AllCases

typealias · iOS 15.0+

InterfaceOrientation.ID

typealias · iOS 15.0+

ItemProviderTableRowModifier

struct · iOS 16.0+

ItemProviderTableRowModifier.Body

typealias · iOS 16.0+

KeyboardShortcut

struct · iOS 14.0+

KeyboardShortcut.Localization

struct · iOS 15.0+

KeyEquivalent

struct · iOS 14.0+

KeyEquivalent.ExtendedGraphemeClusterLiteralType

typealias · iOS 14.0+

KeyEquivalent.UnicodeScalarLiteralType

typealias · iOS 14.0+

KeyPress

struct · iOS 17.0+

KeyPress.Phases

struct · iOS 17.0+

KeyPress.Phases.ArrayLiteralElement

typealias · iOS 17.0+

KeyPress.Phases.Element

typealias · iOS 17.0+

KeyPress.Phases.RawValue

typealias · iOS 17.0+

KeyPress.Result

enum · iOS 17.0+

Label

struct · iOS 14.0+

Label.Body

typealias · iOS 14.0+

LabeledContent

struct · iOS 16.0+

LabeledContent.Body

typealias · iOS 16.0+

LabeledContentStyle

protocol · iOS 16.0+

LabeledContentStyle.Configuration

typealias · iOS 16.0+

LabeledContentStyleConfiguration

struct · iOS 16.0+

LabeledContentStyleConfiguration.Content

struct · iOS 16.0+

LabeledContentStyleConfiguration.Content.Body

typealias · iOS 16.0+

LabeledContentStyleConfiguration.Label

struct · iOS 16.0+

LabeledContentStyleConfiguration.Label.Body

typealias · iOS 16.0+

LabeledControlGroupContent

struct · iOS 16.0+

LabeledControlGroupContent.Body

typealias · iOS 16.0+

LabeledToolbarItemGroupContent

struct · iOS 16.0+

LabeledToolbarItemGroupContent.Body

typealias · iOS 16.0+

LabelStyle

protocol · iOS 14.0+

LabelStyle.Configuration

typealias · iOS 14.0+

LabelStyleConfiguration

struct · iOS 14.0+

LabelStyleConfiguration.Icon

struct · iOS 14.0+

LabelStyleConfiguration.Icon.Body

typealias · iOS 14.0+

LabelStyleConfiguration.Title

struct · iOS 14.0+

LabelStyleConfiguration.Title.Body

typealias · iOS 14.0+

LazyHGrid

struct · iOS 14.0+

LazyHGrid.Body

typealias · iOS 14.0+

LazyVGrid

struct · iOS 14.0+

LazyVGrid.Body

typealias · iOS 14.0+

LimitedAvailabilityConfiguration

struct · iOS 16.1+

LimitedAvailabilityConfiguration.Body

typealias · iOS 16.1+

LinearCapacityGaugeStyle

struct · iOS 16.0+

LinearCapacityGaugeStyle.Body

typealias · iOS 16.0+

LinearProgressViewStyle

struct · iOS 14.0+

LinearProgressViewStyle.Body

typealias · iOS 14.0+

Link

struct · iOS 14.0+

Link.Body

typealias · iOS 14.0+

LinkShapeStyle

struct · iOS 17.0+

LinkShapeStyle.Resolved

typealias · iOS 17.0+

List

struct · iOS 13.0+

List.Body

typealias · iOS 13.0+

ListItemTint

struct · iOS 14.0+

ListSectionSpacing

struct · iOS 17.0+

ListStyle

protocol · iOS 13.0+

LongPressGesture

struct · iOS 13.0+

LongPressGesture.Body

typealias · iOS 13.0+

LongPressGesture.Value

typealias · iOS 13.0+

MagnificationGesture

struct · iOS 13.0+ · Deprecated in iOS 100000.0

MagnificationGesture.Body

typealias · iOS 13.0+ · Deprecated in iOS 100000.0

MagnificationGesture.Value

typealias · iOS 13.0+ · Deprecated in iOS 100000.0

MagnifyGesture

struct · iOS 17.0+

MagnifyGesture.Body

typealias · iOS 17.0+

MagnifyGesture.Value

struct · iOS 17.0+

MatchedTransitionSourceConfiguration

protocol · iOS 18.0+

Menu

struct · iOS 14.0+

Menu.Body

typealias · iOS 14.0+

MenuActionDismissBehavior

struct · iOS 16.4+

MenuControlGroupStyle

struct · iOS 16.4+

MenuControlGroupStyle.Body

typealias · iOS 16.4+

MenuOrder

struct · iOS 16.0+

MenuPickerStyle

struct · iOS 14.0+

MenuStyle

protocol · iOS 14.0+

MenuStyle.Configuration

typealias · iOS 14.0+

MenuStyleConfiguration

struct · iOS 14.0+

MenuStyleConfiguration.Content

struct · iOS 14.0+

MenuStyleConfiguration.Content.Body

typealias · iOS 14.0+

MenuStyleConfiguration.Label

struct · iOS 14.0+

MenuStyleConfiguration.Label.Body

typealias · iOS 14.0+

ModifiedContent.Data

typealias · iOS 16.0+

ModifiedContent.TableRowBody

typealias · iOS 16.0+

ModifiedContent.TableRowValue

typealias · iOS 16.0+

MultiDatePicker

struct · iOS 16.0+

MultiDatePicker.Body

typealias · iOS 16.0+

NavigationBarItem

struct · iOS 13.0+

NavigationBarItem.TitleDisplayMode

enum · iOS 13.0+

NavigationControlGroupStyle

struct · iOS 15.0+

NavigationControlGroupStyle.Body

typealias · iOS 15.0+

NavigationLink

struct · iOS 13.0+

NavigationLink.Body

typealias · iOS 13.0+

NavigationLinkPickerStyle

struct · iOS 16.0+

NavigationPath

struct · iOS 16.0+

NavigationPath.CodableRepresentation

struct · iOS 16.0+

NavigationSplitView

struct · iOS 16.0+

NavigationSplitView.Body

typealias · iOS 16.0+

NavigationSplitViewColumn

struct · iOS 17.0+

NavigationSplitViewStyle

protocol · iOS 16.0+

NavigationSplitViewStyle.Configuration

typealias · iOS 16.0+

NavigationSplitViewStyleConfiguration

struct · iOS 16.0+

NavigationSplitViewVisibility

struct · iOS 16.0+

NavigationStack

struct · iOS 16.0+

NavigationStack.Body

typealias · iOS 16.0+

NavigationTransition

protocol · iOS 18.0+

NavigationView

struct · iOS 13.0+ · Deprecated in iOS 100000.0

NavigationView.Body

typealias · iOS 13.0+ · Deprecated in iOS 100000.0

NavigationViewStyle

protocol · iOS 13.0+ · Deprecated in iOS 100000.0

Never.TableColumnBody

typealias · iOS 16.0+

Never.TableColumnSortComparator

typealias · iOS 16.0+

Never.TableRowBody

typealias · iOS 16.0+

Never.TableRowValue

typealias · iOS 16.0+

NewDocumentButton

struct · iOS 18.0+

NewDocumentButton.Body

typealias · iOS 18.0+

NSUserActivity.TypedPayloadError

enum · iOS 14.0+

OnInsertTableRowModifier

struct · iOS 16.0+

OnInsertTableRowModifier.Body

typealias · iOS 16.0+

OpenWindowAction

struct · iOS 16.0+

Optional.Body

typealias · iOS 27.0+

Optional.TableColumnBody

typealias · iOS 17.4+

Optional.TableColumnSortComparator

typealias · iOS 17.4+

Optional.TableRowBody

typealias · iOS 16.0+

Optional.TableRowValue

typealias · iOS 16.0+

Optional.TabValue

typealias · iOS 18.0+

Optional.TicksCollection

typealias · iOS 26.0+

Optional.Value

typealias · iOS 26.0+

OutlineGroup

struct · iOS 14.0+

OutlineGroup.Body

typealias · iOS 14.0+

OutlineGroup.TableRowBody

typealias · iOS 17.0+

OutlineGroup.TableRowValue

typealias · iOS 17.0+

OutlineSubgroupChildren

struct · iOS 14.0+

OutlineSubgroupChildren.Body

typealias · iOS 14.0+

PageIndexViewStyle

struct · iOS 14.0+

PageIndexViewStyle.BackgroundDisplayMode

struct · iOS 14.0+

PagePresentationSizing

struct · iOS 18.0+

PageTabViewStyle

struct · iOS 14.0+

PageTabViewStyle.IndexDisplayMode

struct · iOS 14.0+

PagingScrollTargetBehavior

struct · iOS 17.0+

PaletteControlGroupStyle

struct · iOS 17.0+

PaletteControlGroupStyle.Body

typealias · iOS 17.0+

PalettePickerStyle

struct · iOS 17.0+

PaletteSelectionEffect

struct · iOS 17.0+

PasteButton

struct · iOS 16.0+

PasteButton.Body

typealias · iOS 16.0+

PencilDoubleTapGestureValue

struct · iOS 17.5+

PencilHoverPose

struct · iOS 17.5+

PencilPreferredAction

struct · iOS 17.5+

PencilSqueezeGesturePhase

enum · iOS 17.5+

PencilSqueezeGestureValue

struct · iOS 17.5+

Picker

struct · iOS 13.0+

Picker.Body

typealias · iOS 13.0+

PickerStyle

protocol · iOS 13.0+

PlaceholderTextShapeStyle

struct · iOS 17.0+

PlaceholderTextShapeStyle.Resolved

typealias · iOS 17.0+

PlainButtonStyle

struct · iOS 13.0+

PlainButtonStyle.Body

typealias · iOS 13.0+

PlainListStyle

struct · iOS 13.0+

PlainTextEditorStyle

struct · iOS 17.0+

PlainTextEditorStyle.Body

typealias · iOS 17.0+

PlainTextFieldStyle

struct · iOS 13.0+

PopoverAttachmentAnchor

enum · iOS 13.0+

PresentationAdaptation

struct · iOS 16.4+

PresentationBackgroundInteraction

struct · iOS 16.4+

PresentationContentInteraction

struct · iOS 16.4+

PresentationDetent

struct · iOS 16.0+

PresentationDetent.Context

struct · iOS 16.0+

PresentationMode

struct · iOS 13.0+ · Deprecated in iOS 100000.0

PresentationPlacement

struct · iOS 27.0+

PresentationSizing

protocol · iOS 18.0+

PresentationSizingContext

struct · iOS 18.0+

PresentationSizingRoot

struct · iOS 18.0+

PresentedWindowContent

struct · iOS 16.0+

PresentedWindowContent.Body

typealias · iOS 16.0+

PreviewContext

protocol · iOS 14.0+ · Deprecated in iOS 27.0

PreviewContextKey

protocol · iOS 14.0+ · Deprecated in iOS 27.0

PreviewDevice

struct · iOS 13.0+ · Deprecated in iOS 27.0

PreviewDevice.ExtendedGraphemeClusterLiteralType

typealias · iOS 13.0+ · Deprecated in iOS 27.0

PreviewDevice.RawValue

typealias · iOS 13.0+ · Deprecated in iOS 27.0

PreviewDevice.StringLiteralType

typealias · iOS 13.0+ · Deprecated in iOS 27.0

PreviewDevice.UnicodeScalarLiteralType

typealias · iOS 13.0+ · Deprecated in iOS 27.0

PreviewModifier

protocol · iOS 18.0+

PreviewModifier.Content

typealias · iOS 18.0+

PreviewModifierContent

struct · iOS 18.0+

PreviewModifierContent.Body

typealias · iOS 18.0+

PreviewPlatform

enum · iOS 13.0+ · Deprecated in iOS 27.0

PreviewProvider

protocol · iOS 13.0+ · Deprecated in iOS 27.0

PrimitiveButtonStyle

protocol · iOS 13.0+

PrimitiveButtonStyle.Configuration

typealias · iOS 13.0+

PrimitiveButtonStyleConfiguration

struct · iOS 13.0+

PrimitiveButtonStyleConfiguration.Label

struct · iOS 13.0+

PrimitiveButtonStyleConfiguration.Label.Body

typealias · iOS 13.0+

ProgressView

struct · iOS 14.0+

ProgressView.Body

typealias · iOS 14.0+

ProgressViewStyle

protocol · iOS 14.0+

ProgressViewStyle.Configuration

typealias · iOS 14.0+

ProgressViewStyleConfiguration

struct · iOS 14.0+

ProgressViewStyleConfiguration.CurrentValueLabel

struct · iOS 14.0+

ProgressViewStyleConfiguration.CurrentValueLabel.Body

typealias · iOS 14.0+

ProgressViewStyleConfiguration.Label

struct · iOS 14.0+

ProgressViewStyleConfiguration.Label.Body

typealias · iOS 14.0+

ProminentDetailNavigationSplitViewStyle

struct · iOS 16.0+

ProminentDetailNavigationSplitViewStyle.Body

typealias · iOS 16.0+

ReadableDocument

protocol · iOS 27.0+

ReadableDocument.ReadConfiguration

typealias · iOS 27.0+

ReferenceFileDocument

protocol · iOS 14.0+ · Deprecated in iOS 100000.0

ReferenceFileDocument.ReadConfiguration

typealias · iOS 14.0+ · Deprecated in iOS 100000.0

ReferenceFileDocument.WriteConfiguration

typealias · iOS 14.0+ · Deprecated in iOS 100000.0

ReferenceFileDocumentConfiguration

struct · iOS 14.0+ · Deprecated in iOS 100000.0

RefreshAction

struct · iOS 15.0+

RenameAction

struct · iOS 16.0+

RenameButton

struct · iOS 16.0+

RenameButton.Body

typealias · iOS 16.0+

ReorderableSingleCollectionIdentifier

struct · iOS 27.0+

ReorderDifference

struct · iOS 27.0+

ReorderDifference.Destination

struct · iOS 27.0+

ReorderDifference.Destination.Position

enum · iOS 27.0+

RotateGesture

struct · iOS 17.0+

RotateGesture.Body

typealias · iOS 17.0+

RotateGesture.Value

struct · iOS 17.0+

RotationGesture

struct · iOS 13.0+ · Deprecated in iOS 100000.0

RotationGesture.Body

typealias · iOS 13.0+ · Deprecated in iOS 100000.0

RotationGesture.Value

typealias · iOS 13.0+ · Deprecated in iOS 100000.0

RoundedBorderTextFieldStyle

struct · iOS 13.0+ · Deprecated in iOS 100000.0

Scene

protocol · iOS 14.0+

SceneAccessoryContent

protocol · iOS 27.0+

SceneBuilder

struct · iOS 14.0+

ScenePadding

struct · iOS 16.0+

ScenePhase

enum · iOS 14.0+

SceneRestorationBehavior

struct · iOS 18.0+

SceneStorage

struct · iOS 14.0+

ScrollAnchorRole

struct · iOS 18.0+

ScrollBounceBehavior

struct · iOS 16.4+

ScrollDismissesKeyboardMode

struct · iOS 16.0+

ScrollEdgeEffectStyle

struct · iOS 26.0+

ScrollIndicatorVisibility

struct · iOS 16.0+

ScrollInputBehavior

struct · iOS 18.0+

ScrollInputKind

struct · iOS 18.0+

ScrollPhaseChangeContext

struct · iOS 18.0+

ScrollTargetBehavior

protocol · iOS 17.0+

ScrollTargetBehavior.Properties

typealias · iOS 18.4+

ScrollTargetBehavior.PropertiesContext

typealias · iOS 18.4+

ScrollTargetBehavior.TargetContext

typealias · iOS 17.0+

ScrollTargetBehaviorContext

struct · iOS 17.0+

ScrollTargetBehaviorProperties

struct · iOS 18.4+

ScrollTargetBehaviorPropertiesContext

struct · iOS 18.4+

ScrollTransitionConfiguration

struct · iOS 17.0+

ScrollTransitionConfiguration.Threshold

struct · iOS 17.0+

ScrollTransitionPhase

enum · iOS 17.0+

ScrollView

struct · iOS 13.0+

ScrollView.Body

typealias · iOS 13.0+

ScrollViewProxy

struct · iOS 14.0+

ScrollViewReader

struct · iOS 14.0+

ScrollViewReader.Body

typealias · iOS 14.0+

SearchFieldPlacement

struct · iOS 15.0+

SearchFieldPlacement.NavigationBarDrawerDisplayMode

struct · iOS 15.0+

SearchPresentationToolbarBehavior

struct · iOS 17.1+

SearchScopeActivation

struct · iOS 16.4+

SearchSuggestionsPlacement

struct · iOS 16.0+

SearchSuggestionsPlacement.Set

struct · iOS 16.0+

SearchSuggestionsPlacement.Set.ArrayLiteralElement

typealias · iOS 16.0+

SearchSuggestionsPlacement.Set.Element

typealias · iOS 16.0+

SearchSuggestionsPlacement.Set.RawValue

typealias · iOS 16.0+

SearchToolbarBehavior

struct · iOS 26.0+

SearchUnavailableContent

struct · iOS 17.0+

SearchUnavailableContent.Actions

struct · iOS 17.0+

SearchUnavailableContent.Actions.Body

typealias · iOS 17.0+

SearchUnavailableContent.Description

struct · iOS 17.0+

SearchUnavailableContent.Description.Body

typealias · iOS 17.0+

SearchUnavailableContent.Label

struct · iOS 17.0+

SearchUnavailableContent.Label.Body

typealias · iOS 17.0+

Section

struct · iOS 13.0+

Section.Body

typealias · iOS 13.0+

Section.TableRowBody

typealias · iOS 16.0+

Section.TableRowValue

typealias · iOS 16.0+

SectionConfiguration.Actions

struct · iOS 18.0+

SectionConfiguration.Actions.Body

typealias · iOS 18.0+

SectionedFetchRequest

struct · iOS 15.0+

SectionedFetchRequest.Configuration

struct · iOS 15.0+

SectionedFetchResults

struct · iOS 15.0+

SectionedFetchResults.Element

typealias · iOS 15.0+

SectionedFetchResults.Index

typealias · iOS 15.0+

SectionedFetchResults.Indices

typealias · iOS 15.0+

SectionedFetchResults.Iterator

typealias · iOS 15.0+

SectionedFetchResults.Section

struct · iOS 15.0+

SectionedFetchResults.Section.Element

typealias · iOS 15.0+

SectionedFetchResults.Section.ID

typealias · iOS 15.0+

SectionedFetchResults.Section.Index

typealias · iOS 15.0+

SectionedFetchResults.Section.Indices

typealias · iOS 15.0+

SectionedFetchResults.Section.Iterator

typealias · iOS 15.0+

SectionedFetchResults.Section.SubSequence

typealias · iOS 15.0+

SectionedFetchResults.SubSequence

typealias · iOS 15.0+

SecureField

struct · iOS 13.0+

SecureField.Body

typealias · iOS 13.0+

SegmentedPickerStyle

struct · iOS 13.0+

SelectionShapeStyle

struct · iOS 15.0+

SelectionShapeStyle.Resolved

typealias · iOS 17.0+

SensoryFeedback

struct · iOS 17.0+

SensoryFeedback.Flexibility

struct · iOS 17.0+

SensoryFeedback.PressFeedback

struct · iOS 26.0+

SensoryFeedback.ReleaseFeedback

struct · iOS 26.0+

SensoryFeedback.SelectionFeedback

struct · iOS 26.0+

SensoryFeedback.Weight

struct · iOS 17.0+

SequenceGesture

struct · iOS 13.0+

SequenceGesture.Body

typealias · iOS 13.0+

SequenceGesture.Value

enum · iOS 13.0+

ShareLink

struct · iOS 16.0+

ShareLink.Body

typealias · iOS 16.0+

SharePreview

struct · iOS 16.0+

SidebarAdaptableTabViewStyle

struct · iOS 18.0+

SidebarCommands

struct · iOS 14.0+

SidebarCommands.Body

typealias · iOS 14.0+

SidebarListStyle

struct · iOS 14.0+

SidebarRowSize

enum · iOS 16.0+

Slider

struct · iOS 13.0+

Slider.Body

typealias · iOS 13.0+

SliderTick

struct · iOS 26.0+

SliderTick.Body

typealias · iOS 26.0+

SliderTick.ID

struct · iOS 26.0+

SliderTick.Value

typealias · iOS 26.0+

SliderTickBuilder

struct · iOS 26.0+

SliderTickContent

protocol · iOS 26.0+

SliderTickContentForEach

struct · iOS 26.0+

SliderTickContentForEach.Body

typealias · iOS 26.0+

SliderTickContentForEach.Value

typealias · iOS 26.0+

SpacerSizing

struct · iOS 26.0+

SpatialEventCollection

struct · iOS 18.0+

SpatialEventCollection.Element

typealias · iOS 18.0+

SpatialEventCollection.Event

struct · iOS 18.0+

SpatialEventCollection.Event.ID

struct · iOS 18.0+

SpatialEventCollection.Event.InputDevicePose

struct · iOS 18.0+

SpatialEventCollection.Event.Kind

enum · iOS 18.0+

SpatialEventCollection.Event.Phase

enum · iOS 18.0+

SpatialEventCollection.Index

struct · iOS 18.0+

SpatialEventCollection.Indices

typealias · iOS 18.0+

SpatialEventCollection.Iterator

struct · iOS 18.0+

SpatialEventCollection.Iterator.Element

typealias · iOS 18.0+

SpatialEventCollection.SubSequence

typealias · iOS 18.0+

SpatialEventGesture

struct · iOS 18.0+

SpatialEventGesture.Body

typealias · iOS 18.0+

SpatialEventGesture.Value

typealias · iOS 18.0+

SpatialTapGesture

struct · iOS 16.0+

SpatialTapGesture.Body

typealias · iOS 16.0+

SpatialTapGesture.Value

struct · iOS 16.0+

SpringLoadingBehavior

struct · iOS 17.0+

StackNavigationViewStyle

struct · iOS 13.0+ · Deprecated in iOS 100000.0

Stepper

struct · iOS 13.0+

Stepper.Body

typealias · iOS 13.0+

SubmitLabel

struct · iOS 15.0+

SubmitTriggers

struct · iOS 15.0+

SubmitTriggers.ArrayLiteralElement

typealias · iOS 15.0+

SubmitTriggers.Element

typealias · iOS 15.0+

SubmitTriggers.RawValue

typealias · iOS 15.0+

SubscriptionView

struct · iOS 13.0+

SubscriptionView.Body

typealias · iOS 13.0+

Subview.ContainerSizingOptions

enum · iOS 26.0+

SwitchToggleStyle

struct · iOS 13.0+

SwitchToggleStyle.Body

typealias · iOS 13.0+

Tab

struct · iOS 18.0+

Tab.Body

typealias · iOS 18.0+

Tab.TabValue

typealias · iOS 18.0+

TabBarMinimizeBehavior

struct · iOS 26.0+

TabBarOnlyTabViewStyle

struct · iOS 18.0+

TabBarPlacement

struct · iOS 18.0+

TabContent

protocol · iOS 18.0+

TabContentBuilder

struct · iOS 18.0+

TabContentBuilder.Content

struct · iOS 18.0+

TabContentBuilder.Content.Body

typealias · iOS 18.0+

TabCustomizationBehavior

struct · iOS 18.0+

Table

struct · iOS 16.0+

Table.Body

typealias · iOS 16.0+

TableColumn

struct · iOS 16.0+

TableColumn.TableColumnBody

typealias · iOS 16.0+

TableColumn.TableColumnSortComparator

typealias · iOS 16.0+

TableColumn.TableRowValue

typealias · iOS 16.0+

TableColumnAlignment

struct · iOS 17.0+

TableColumnBuilder

struct · iOS 16.0+

TableColumnContent

protocol · iOS 16.0+

TableColumnCustomization

struct · iOS 17.0+

TableColumnCustomizationBehavior

struct · iOS 17.0+

TableColumnCustomizationBehavior.ArrayLiteralElement

typealias · iOS 17.0+

TableColumnCustomizationBehavior.Element

typealias · iOS 17.0+

TableColumnForEach

struct · iOS 17.4+

TableColumnForEach.TableColumnBody

typealias · iOS 17.4+

TableColumnForEach.TableColumnSortComparator

typealias · iOS 17.4+

TableColumnForEach.TableRowValue

typealias · iOS 17.4+

TableForEachContent

struct · iOS 16.0+

TableForEachContent.TableRowBody

typealias · iOS 16.0+

TableForEachContent.TableRowValue

typealias · iOS 16.0+

TableHeaderRowContent

struct · iOS 16.0+

TableHeaderRowContent.TableRowBody

typealias · iOS 16.0+

TableHeaderRowContent.TableRowValue

typealias · iOS 16.0+

TableOutlineGroupContent

struct · iOS 17.0+

TableOutlineGroupContent.TableRowBody

typealias · iOS 17.0+

TableOutlineGroupContent.TableRowValue

typealias · iOS 17.0+

TableRow

struct · iOS 16.0+

TableRow.TableRowBody

typealias · iOS 16.0+

TableRow.TableRowValue

typealias · iOS 16.0+

TableRowBuilder

struct · iOS 16.0+

TableRowContent

protocol · iOS 16.0+

TableStyle

protocol · iOS 16.0+

TableStyle.Configuration

typealias · iOS 16.0+

TableStyleConfiguration

struct · iOS 16.0+

TabPlacement

struct · iOS 18.0+

TabRole

struct · iOS 18.0+

TabSearchActivation

struct · iOS 26.0+

TabSection

struct · iOS 18.0+

TabSection.Body

typealias · iOS 18.0+

TabSection.TabValue

typealias · iOS 18.0+

TabSectionExpansion

struct · iOS 27.0+

TabsPickerStyle

struct · iOS 27.0+

TabView

struct · iOS 13.0+

TabView.Body

typealias · iOS 13.0+

TabViewBottomAccessoryPlacement

enum · iOS 26.0+

TabViewCustomization

struct · iOS 18.0+

TabViewCustomization.SectionCustomization

struct · iOS 18.4+

TabViewCustomization.TabCustomization

struct · iOS 18.4+

TabViewStyle

protocol · iOS 14.0+

TextEditingCommands

struct · iOS 14.0+

TextEditingCommands.Body

typealias · iOS 14.0+

TextEditor

struct · iOS 14.0+

TextEditor.Body

typealias · iOS 14.0+

TextEditorStyle

protocol · iOS 17.0+

TextEditorStyle.Configuration

typealias · iOS 17.0+

TextEditorStyleConfiguration

struct · iOS 17.0+

TextField

struct · iOS 13.0+

TextField.Body

typealias · iOS 13.0+

TextFieldStyle

protocol · iOS 13.0+

TextFormattingCommands

struct · iOS 14.0+

TextFormattingCommands.Body

typealias · iOS 14.0+

TextInputAutocapitalization

struct · iOS 15.0+

TextInputDictationActivation

struct · iOS 17.0+

TextInputDictationBehavior

struct · iOS 17.0+

TextInputFormattingControlPlacement

struct · iOS 26.0+

TextInputFormattingControlPlacement.Set

struct · iOS 26.0+

TextInputFormattingControlPlacement.Set.ArrayLiteralElement

typealias · iOS 26.0+

TextInputFormattingControlPlacement.Set.Element

typealias · iOS 26.0+

TextInputFormattingControlPlacement.Set.RawValue

typealias · iOS 26.0+

TextSelection

struct · iOS 18.0+

TextSelection.Indices

enum · iOS 18.0+

TextSelectionAffinity

enum · iOS 18.0+

TimelineView

struct · iOS 15.0+

TimelineView.Body

typealias · iOS 15.0+

TimelineView.Context

struct · iOS 15.0+

TimelineView.Context.Cadence

enum · iOS 15.0+

TimelineViewDefaultContext

typealias · iOS 15.0+

TitleAndIconLabelStyle

struct · iOS 14.5+

TitleAndIconLabelStyle.Body

typealias · iOS 14.5+

TitleOnlyLabelStyle

struct · iOS 14.0+

TitleOnlyLabelStyle.Body

typealias · iOS 14.0+

Toggle

struct · iOS 13.0+

Toggle.Body

typealias · iOS 13.0+

ToggleStyle

protocol · iOS 13.0+

ToggleStyle.Configuration

typealias · iOS 13.0+

ToggleStyleConfiguration

struct · iOS 13.0+

ToggleStyleConfiguration.Label

struct · iOS 13.0+

ToggleStyleConfiguration.Label.Body

typealias · iOS 13.0+

ToolbarCommands

struct · iOS 14.0+

ToolbarCommands.Body

typealias · iOS 14.0+

ToolbarContent

protocol · iOS 14.0+

ToolbarContentBuilder

struct · iOS 14.0+

ToolbarCustomizationBehavior

struct · iOS 16.0+

ToolbarCustomizationOptions

struct · iOS 16.0+

ToolbarCustomizationOptions.ArrayLiteralElement

typealias · iOS 16.0+

ToolbarCustomizationOptions.Element

typealias · iOS 16.0+

ToolbarCustomizationOptions.RawValue

typealias · iOS 16.0+

ToolbarDefaultItemKind

struct · iOS 17.0+

ToolbarItem

struct · iOS 14.0+

ToolbarItem.Body

typealias · iOS 14.0+

ToolbarItemAxisBehavior

struct · iOS 27.1+

ToolbarItemGroup

struct · iOS 14.0+

ToolbarItemGroup.Body

typealias · iOS 14.0+

ToolbarItemPlacement

struct · iOS 14.0+

ToolbarItemVisibilityPriority

struct · iOS 27.0+

ToolbarLabelStyle

struct · iOS 18.0+

ToolbarMinimizationBehavior

struct · iOS 27.0+

ToolbarMinimizationRestoration

struct · iOS 27.0+

ToolbarMinimizationSafeAreaAdjustment

struct · iOS 27.0+

ToolbarOverflowMenu

struct · iOS 27.0+

ToolbarOverflowMenu.Body

typealias · iOS 27.0+

ToolbarPlacement

struct · iOS 16.0+

ToolbarRole

struct · iOS 16.0+

ToolbarSpacer

struct · iOS 26.0+

ToolbarSpacer.Body

typealias · iOS 26.0+

ToolbarTitleDisplayMode

struct · iOS 17.0+

ToolbarTitleMenu

struct · iOS 16.0+

ToolbarTitleMenu.Body

typealias · iOS 16.0+

ToolbarVerticalBehavior

struct · iOS 27.1+

ToolbarVerticalCompressionBehavior

struct · iOS 27.1+

TupleContent.Body

typealias · iOS 27.0+

TupleSliderTickContent

struct · iOS 26.0+

TupleSliderTickContent.Body

typealias · iOS 26.0+

TupleSliderTickContent.TicksCollection

typealias · iOS 26.0+

TupleSliderTickContent.Value

typealias · iOS 26.0+

TupleTableColumnContent

struct · iOS 16.0+

TupleTableColumnContent.TableColumnBody

typealias · iOS 16.0+

TupleTableColumnContent.TableColumnSortComparator

typealias · iOS 16.0+

TupleTableColumnContent.TableRowValue

typealias · iOS 16.0+

TupleTableRowContent

struct · iOS 16.0+

TupleTableRowContent.TableRowBody

typealias · iOS 16.0+

TupleTableRowContent.TableRowValue

typealias · iOS 16.0+

UIApplicationDelegateAdaptor

struct · iOS 14.0+

UIGestureRecognizerRepresentable

protocol · iOS 18.0+

UIGestureRecognizerRepresentable.Context

typealias · iOS 18.0+

UIGestureRecognizerRepresentable.CoordinateSpaceConverter

typealias · iOS 18.0+

UIGestureRecognizerRepresentableContext

struct · iOS 18.0+

UIGestureRecognizerRepresentableCoordinateSpaceConverter

struct · iOS 18.0+

UIHostingConfiguration

struct · iOS 16.0+

UIHostingController

class · iOS 13.0+

UIHostingControllerSizingOptions

struct · iOS 16.0+

UIHostingControllerSizingOptions.ArrayLiteralElement

typealias · iOS 16.0+

UIHostingControllerSizingOptions.Element

typealias · iOS 16.0+

UIHostingControllerSizingOptions.RawValue

typealias · iOS 16.0+

UIHostingSceneDelegate

protocol · iOS 26.0+

UITraitBridgedEnvironmentKey

typealias · iOS 17.0+

UIViewControllerRepresentable

protocol · iOS 13.0+

UIViewControllerRepresentable.Context

typealias · iOS 13.0+

UIViewControllerRepresentable.LayoutOptions

typealias · iOS 17.0+

UIViewControllerRepresentableContext

struct · iOS 13.0+

UIViewRepresentable

protocol · iOS 13.0+

UIViewRepresentable.Context

typealias · iOS 13.0+

UIViewRepresentable.LayoutOptions

typealias · iOS 17.0+

UIViewRepresentableContext

struct · iOS 13.0+

URLDocumentConfiguration

class · iOS 27.0+

ViewAlignedScrollTargetBehavior

struct · iOS 17.0+

ViewAlignedScrollTargetBehavior.LimitBehavior

struct · iOS 17.0+

ViewThatFits

struct · iOS 16.0+

ViewThatFits.Body

typealias · iOS 16.0+

WheelDatePickerStyle

struct · iOS 13.0+

WheelDatePickerStyle.Body

typealias · iOS 13.0+

WheelPickerStyle

struct · iOS 13.0+

Widget

protocol · iOS 14.0+

WidgetBundle

protocol · iOS 14.0+

WidgetBundleBuilder

struct · iOS 14.0+

WidgetConfiguration

protocol · iOS 14.0+

WindowBackgroundShapeStyle

struct · iOS 17.0+

WindowBackgroundShapeStyle.Resolved

typealias · iOS 17.0+

WindowGroup

struct · iOS 14.0+

WindowGroup.Body

typealias · iOS 14.0+

WindowManagerRole

struct · iOS 18.0+

WindowResizability

struct · iOS 17.0+

WindowToolbarFullScreenVisibility

struct · iOS 18.0+

WritableDocument

protocol · iOS 27.0+

WritableDocument.WriteConfiguration

typealias · iOS 27.0+

WritingToolsBehavior

struct · iOS 18.0+

ZoomNavigationTransition

struct · iOS 18.0+

Functions and constants

init · iOS 26.0+

init

TypeScript
static init(transferable: AttributedTextFormatting_Transferable, environment: _SwiftUICore_EnvironmentValues): _Foundation_AttributedString
Swift declaration
init(transferable: AttributedTextFormatting.Transferable, in environment: EnvironmentValues) throws

Extract an attributed string from SwiftUI's transferable representation in a certain environment. Use this initializer with a ``AttributedTextFormatting/Transferable`` that was imported, e.g. in the `action` closure of the ``View/dropDestination(for:action:isTargeted)`` modifier. - Note: This initializer applies the ``AttributedTextFormattingDefinition`` in the given `environment` to the imported text before returning. - SeeAlso: ``View/attributedTextFormattingDefinition(_:)-uc57``, ``AttributedTextValueConstraint/constrain(_:)-6cp64``

method · iOS 26.0+

transformAttributes

TypeScript
transformAttributes(selection: AttributedTextSelection, body: ((arg0: _Foundation_AttributeContainer) => void)): { $ret: null; $out: { "selection": AttributedTextSelection } }
Swift declaration
mutating func transformAttributes<E>(in selection: inout AttributedTextSelection, body: (inout AttributeContainer) throws(E) -> Void) throws(E) where E : Error

Apply a change to the attributes in the entire selection. Applies the given `body` to the selection. Specifically, in the case of a selection spanning one or multiple characters, the `body` is applied to every run in the selection individually, modifying only the part of the run that is in the selection. In the case of an insertion point, the `body` is applied to the attribute container defining the typing attributes. After that, attributes that are bound to the whole paragraph or the character immediately preceding the caret via <doc://com.apple.documentation/documentation/foundation/attributedstring/AttributeRunBoundaries> are applied directly to attributed string at the respective range. Use this function to implement controls that operate on the user's current selection. Some controls define the new value relative to the current state of each individual run in the selection, e.g. a stepper for the font size: Stepper("Font Size", onIncrement: { text.transformAttributes(in: &selection) { $0.font = ($0.font ?? .default).scaled(by: 1.2) } }, onDecrement: { text.transformAttributes(in: &selection) { $0.font = ($0.font ?? .default).scaled(by: 1 / 1.2) } }) Other controls, such as toggles for boldness, italics, or underline usually define the new value for all ranges as the opposite of the value in the typing attributes, as defined by ``AttributedTextSelection/typingAttributes(in:)``: Toggle("B", isOn: .init(get: { let font = selection.typingAttributes(in: text).font ?? .default return font.resolve(in: environment).isBold }, set: { isBold in text.transformAttributes(in: &selection) { $0.font = ($0.font ?? .default).bold(isBold) } }))

Omit the output parameters from the call. The result contains $ret and $out, with selection inside $out.

method · iOS 26.0+

transform

TypeScript
transform(selection: AttributedTextSelection, body: ((arg0: _Foundation_AttributedString) => void)): { $ret: null; $out: { "selection": AttributedTextSelection } }
Swift declaration
mutating func transform<E>(updating selection: inout AttributedTextSelection, body: (inout AttributedString) throws(E) -> Void) throws(E) where E : Error

Tracks the location of the selection throughout the mutation closure, updating the selection so it represents the same effective locations after the mutation. - Note: If the mutation performed does not allow for tracking to succeed (such as replacing the provided inout variable with an entirely different `AttributedString`), the selection is reset to the fallback location at the end of the text. - Parameters: - selection: The selection to track throughout the `body` closure. - body: A mutating operation, or set of operations, to perform on the value of `self`. The value of `self` is provided to the closure as an `inout AttributedString` that the closure should mutate directly. Do not capture the value of `self` in the provided closure - the closure should mutate the provided `inout` copy.

Omit the output parameters from the call. The result contains $ret and $out, with selection inside $out.

subscript · iOS 26.0+

subscript

TypeScript
subscript(selection: AttributedTextSelection): _Foundation_DiscontiguousAttributedSubstring
Swift declaration
subscript(selection: AttributedTextSelection) -> DiscontiguousAttributedSubstring { get }

Obtain the discontiguous substring of a selection. In the case of an insertion point, this substring is empty. Otherwise, the substring contains all selected characters.

get · iOS 13.0+

state

TypeScript
get state(): GestureState<unknown>
Swift declaration
var state: GestureState<State>

A value that changes as the user performs the gesture.

set · iOS 13.0+

state

TypeScript
set state(value: GestureState<unknown>)
Swift declaration
var state: GestureState<State>

A value that changes as the user performs the gesture.

init · iOS 14.0+

init

TypeScript
static initWrappedValueStore(wrappedValue: string, key: string, store?: (_Foundation_UserDefaults) | null): AppStorage<string>
Swift declaration
init(wrappedValue: Value, _ key: String, store: UserDefaults? = nil) where Value == URL

Creates a property that can read and write to a url user default. - Parameters: - wrappedValue: The default value if a url value is not specified for the given key. - key: The key to read and write the value to in the user defaults store. - store: The user defaults store to read and write to. A value of `nil` will use the user default store from the environment.

init · iOS 14.0+

init

TypeScript
static initWrappedValueStore76520(wrappedValue: ArrayBuffer, key: string, store?: (_Foundation_UserDefaults) | null): AppStorage<ArrayBuffer>
Swift declaration
init(wrappedValue: Value, _ key: String, store: UserDefaults? = nil) where Value == Data

Creates a property that can read and write to a user default as data. Avoid storing large data blobs in user defaults, such as image data, as it can negatively affect performance of your app. On tvOS, a `NSUserDefaultsSizeLimitExceededNotification` notification is posted if the total user default size reaches 512kB. - Parameters: - wrappedValue: The default value if a data value is not specified for the given key. - key: The key to read and write the value to in the user defaults store. - store: The user defaults store to read and write to. A value of `nil` will use the user default store from the environment.

init · iOS 18.0+

init

TypeScript
static initWrappedValueStore61228(wrappedValue: globalThis.Date, key: string, store?: (_Foundation_UserDefaults) | null): AppStorage<globalThis.Date>
Swift declaration
init(wrappedValue: Value, _ key: String, store: UserDefaults? = nil) where Value == Date

Creates a property that can read and write to a date user default. - Parameters: - wrappedValue: The default value if a date value is not specified for the given key. - key: The key to read and write the value to in the user defaults store. - store: The user defaults store to read and write to. A value of `nil` will use the user default store from the environment.

init · iOS 18.0+

init

TypeScript
static initWrappedValueStore19462(wrappedValue: ToolbarLabelStyle, key: string, store?: (_Foundation_UserDefaults) | null): AppStorage<ToolbarLabelStyle>
Swift declaration
init(wrappedValue: Value = ToolbarLabelStyle.automatic, _ key: String, store: UserDefaults? = nil) where Value == ToolbarLabelStyle

Creates a property that can save and restore a toolbarLabelStyle state. - Parameters: - wrappedValue: The default value if toolbarLabelStyle state is not available for the given key. - key: The key to read and write the value to in the user defaults store. - store: The user defaults store to read and write to. A value of `nil` will use the user default store from the environment.

init · iOS 18.0+

init

TypeScript
static initWrappedValueStore81153(wrappedValue: TabViewCustomization, key: string, store?: (_Foundation_UserDefaults) | null): AppStorage<TabViewCustomization>
Swift declaration
init(wrappedValue: Value = TabViewCustomization(), _ key: String, store: UserDefaults? = nil) where Value == TabViewCustomization

Creates a property that can save and restore tab sidebar customizations. You can set this customization on the TabView using ``View/tabViewCustomization(_:)``. - Parameters: - wrappedValue: The default value if the customization is not available for the given key. - key: The key to read and write the value to in the user defaults store. - store: The user defaults store to read and write to. A value of `nil` will use the user default store from the environment.

init · iOS 14.0+

init

TypeScript
static initWrappedValueStore47224(wrappedValue: string, key: string, store?: (_Foundation_UserDefaults) | null): AppStorage<string>
Swift declaration
init(wrappedValue: Value, _ key: String, store: UserDefaults? = nil) where Value == String

Creates a property that can read and write to a string user default. - Parameters: - wrappedValue: The default value if a string value is not specified for the given key. - key: The key to read and write the value to in the user defaults store. - store: The user defaults store to read and write to. A value of `nil` will use the user default store from the environment.

init · iOS 14.0+

init

TypeScript
static initWrappedValueStore6643(wrappedValue: boolean, key: string, store?: (_Foundation_UserDefaults) | null): AppStorage<boolean>
Swift declaration
init(wrappedValue: Value, _ key: String, store: UserDefaults? = nil) where Value == Bool

Creates a property that can read and write to a boolean user default. - Parameters: - wrappedValue: The default value if a boolean value is not specified for the given key. - key: The key to read and write the value to in the user defaults store. - store: The user defaults store to read and write to. A value of `nil` will use the user default store from the environment.

init · iOS 14.0+

init

TypeScript
static initWrappedValueStore28873(wrappedValue: number, key: string, store?: (_Foundation_UserDefaults) | null): AppStorage<number>
Swift declaration
init(wrappedValue: Value, _ key: String, store: UserDefaults? = nil) where Value == Double

Creates a property that can read and write to a double user default. - Parameters: - wrappedValue: The default value if a double value is not specified for the given key. - key: The key to read and write the value to in the user defaults store. - store: The user defaults store to read and write to. A value of `nil` will use the user default store from the environment.

init · iOS 14.0+

init

TypeScript
static initWrappedValueStore64522(wrappedValue: number, key: string, store?: (_Foundation_UserDefaults) | null): AppStorage<number>
Swift declaration
init(wrappedValue: Value, _ key: String, store: UserDefaults? = nil) where Value == Int

Creates a property that can read and write to an integer user default. - Parameters: - wrappedValue: The default value if an integer value is not specified for the given key. - key: The key to read and write the value to in the user defaults store. - store: The user defaults store to read and write to. A value of `nil` will use the user default store from the environment.

get · iOS 14.0+

wrappedValue

TypeScript
get wrappedValue(): unknown
Swift declaration
var wrappedValue: Value { get nonmutating set }
set · iOS 14.0+

wrappedValue

TypeScript
set wrappedValue(value: unknown)
Swift declaration
var wrappedValue: Value { get nonmutating set }
get · iOS 14.0+

projectedValue

TypeScript
get projectedValue(): _SwiftUICore_Binding<unknown>
Swift declaration
var projectedValue: Binding<Value> { get }
init · iOS 14.0+

init

TypeScript
static initStore(key: string, store?: (_Foundation_UserDefaults) | null): AppStorage<(string) | null>
Swift declaration
init(_ key: String, store: UserDefaults? = nil) where Value == URL?

Creates a property that can read and write an Optional URL user default. Defaults to nil if there is no restored value. - Parameters: - key: The key to read and write the value to in the user defaults store. - store: The user defaults store to read and write to. A value of `nil` will use the user default store from the environment.

init · iOS 14.0+

init

TypeScript
static initStore27961(key: string, store?: (_Foundation_UserDefaults) | null): AppStorage<(ArrayBuffer) | null>
Swift declaration
init(_ key: String, store: UserDefaults? = nil) where Value == Data?

Creates a property that can read and write an Optional data user default. Defaults to nil if there is no restored value. - Parameters: - key: The key to read and write the value to in the user defaults store. - store: The user defaults store to read and write to. A value of `nil` will use the user default store from the environment.

init · iOS 18.0+

init

TypeScript
static initStore93821(key: string, store?: (_Foundation_UserDefaults) | null): AppStorage<(globalThis.Date) | null>
Swift declaration
init(_ key: String, store: UserDefaults? = nil) where Value == Date?

Creates a property that can read and write an Optional Date user default. Defaults to nil if there is no restored value. - Parameters: - key: The key to read and write the value to in the user defaults store. - store: The user defaults store to read and write to. A value of `nil` will use the user default store from the environment.

init · iOS 14.0+

init

TypeScript
static initStore81156(key: string, store?: (_Foundation_UserDefaults) | null): AppStorage<(string) | null>
Swift declaration
init(_ key: String, store: UserDefaults? = nil) where Value == String?

Creates a property that can read and write an Optional string user default. Defaults to nil if there is no restored value. - Parameters: - key: The key to read and write the value to in the user defaults store. - store: The user defaults store to read and write to. A value of `nil` will use the user default store from the environment.

init · iOS 14.0+

init

TypeScript
static initStore67225(key: string, store?: (_Foundation_UserDefaults) | null): AppStorage<(boolean) | null>
Swift declaration
init(_ key: String, store: UserDefaults? = nil) where Value == Bool?

Creates a property that can read and write an Optional boolean user default. Defaults to nil if there is no restored value. - Parameters: - key: The key to read and write the value to in the user defaults store. - store: The user defaults store to read and write to. A value of `nil` will use the user default store from the environment.

init · iOS 14.0+

init

TypeScript
static initStore8511(key: string, store?: (_Foundation_UserDefaults) | null): AppStorage<(number) | null>
Swift declaration
init(_ key: String, store: UserDefaults? = nil) where Value == Double?

Creates a property that can read and write an Optional double user default. Defaults to nil if there is no restored value. - Parameters: - key: The key to read and write the value to in the user defaults store. - store: The user defaults store to read and write to. A value of `nil` will use the user default store from the environment.

init · iOS 14.0+

init

TypeScript
static initStore56582(key: string, store?: (_Foundation_UserDefaults) | null): AppStorage<(number) | null>
Swift declaration
init(_ key: String, store: UserDefaults? = nil) where Value == Int?

Creates a property that can read and write an Optional integer user default. Defaults to nil if there is no restored value. - Parameters: - key: The key to read and write the value to in the user defaults store. - store: The user defaults store to read and write to. A value of `nil` will use the user default store from the environment.

init · iOS 15.0+

init

TypeScript
static initUrlScale(url?: (string) | null, scale?: number): AsyncImage<_SwiftUICore_Image>
Swift declaration
nonisolated init(url: URL?, scale: CGFloat = 1) where Content == Image

Loads and displays an image from the specified URL. Until the image loads, SwiftUI displays a default placeholder. When the load operation completes successfully, SwiftUI updates the view to show the loaded image. If the operation fails, SwiftUI continues to display the placeholder. The following example loads and displays an icon from an example server: AsyncImage(url: URL(string: "https://example.com/icon.png")) If you want to customize the placeholder or apply image-specific modifiers --- like ``Image/resizable(capInsets:resizingMode:)`` --- to the loaded image, use the ``init(url:scale:content:placeholder:)`` initializer instead. - Parameters: - url: The URL of the image to display. - scale: The scale to use for the image. The default is `1`. Set a different value when loading images designed for higher resolution displays. For example, set a value of `2` for an image that you would name with the `@2x` suffix if stored in a file on disk.

init · iOS 27.0+

init

TypeScript
static initRequestScale(request: _Foundation_URLRequest, scale?: number): AsyncImage<_SwiftUICore_Image>
Swift declaration
nonisolated init(request: URLRequest, scale: CGFloat = 1) where Content == Image

Loads and displays an image from the specified URL load request. Until the image loads, SwiftUI displays a default placeholder. When the load operation completes successfully, SwiftUI updates the view to show the loaded image. If the operation fails, SwiftUI continues to display the placeholder. The following example loads and displays an icon from an example server: AsyncImage(request: URLRequest(url: imageURL)) If you want to customize the placeholder or apply image-specific modifiers --- like ``Image/resizable(capInsets:resizingMode:)`` --- to the loaded image, use the ``init(request:scale:content:placeholder:)`` initializer instead. - Parameters: - request: The <doc://com.apple.documentation/documentation/foundation/urlrequest> of the image to display. - scale: The scale to use for the image. The default is `1`. Set a different value when loading images designed for higher resolution displays. For example, set a value of `2` for an image that you would name with the `@2x` suffix if stored in a file on disk.

init · iOS 16.0+

init

TypeScript
static initSelectionDisplayedComponents(titleResource: _Foundation_LocalizedStringResource, selection: _SwiftUICore_Binding<globalThis.Date>, displayedComponents?: DatePickerComponents): DatePicker<_SwiftUICore_Text>
Swift declaration
@export(implementation) nonisolated init(_ titleResource: LocalizedStringResource, selection: Binding<Date>, displayedComponents: DatePicker<Label>.Components = [.hourAndMinute, .date])

Creates an instance that selects a `Date` with an unbounded range. - Parameters: - titleResource: The localized title of `self`, describing its purpose. - selection: The date value being displayed and selected. - displayedComponents: The date components that user is able to view and edit. Defaults to `[.hourAndMinute, .date]`. On watchOS, if `.hourAndMinute` or `.hourMinuteAndSecond` are included with `.date`, only `.date` is displayed.

init · iOS 13.0+

init

TypeScript
static initSelectionDisplayedComponents73492(titleKey: _SwiftUICore_LocalizedStringKey, selection: _SwiftUICore_Binding<globalThis.Date>, displayedComponents?: DatePickerComponents): DatePicker<_SwiftUICore_Text>
Swift declaration
nonisolated init(_ titleKey: LocalizedStringKey, selection: Binding<Date>, displayedComponents: DatePicker<Label>.Components = [.hourAndMinute, .date])

Creates an instance that selects a `Date` with an unbounded range. - Parameters: - titleKey: The key for the localized title of `self`, describing its purpose. - selection: The date value being displayed and selected. - displayedComponents: The date components that user is able to view and edit. Defaults to `[.hourAndMinute, .date]`. On watchOS, if `.hourAndMinute` or `.hourMinuteAndSecond` are included with `.date`, only `.date` is displayed.

init · iOS 13.0+

init

TypeScript
static initSelectionDisplayedComponents71804(title: string, selection: _SwiftUICore_Binding<globalThis.Date>, displayedComponents?: DatePickerComponents): DatePicker<_SwiftUICore_Text>
Swift declaration
nonisolated init<S>(_ title: S, selection: Binding<Date>, displayedComponents: DatePicker<Label>.Components = [.hourAndMinute, .date]) where S : StringProtocol

Creates an instance that selects a `Date` within the given range. - Parameters: - title: The title of `self`, describing its purpose. - selection: The date value being displayed and selected. - displayedComponents: The date components that user is able to view and edit. Defaults to `[.hourAndMinute, .date]`. On watchOS, if `.hourAndMinute` or `.hourMinuteAndSecond` are included with `.date`, only `.date` is displayed.

init · iOS 16.0+

init

TypeScript
static initSelectionInDisplayedComponents(titleResource: _Foundation_LocalizedStringResource, selection: _SwiftUICore_Binding<globalThis.Date>, range: SDKHandle, displayedComponents?: DatePickerComponents): DatePicker<_SwiftUICore_Text>
Swift declaration
@export(implementation) nonisolated init(_ titleResource: LocalizedStringResource, selection: Binding<Date>, in range: ClosedRange<Date>, displayedComponents: DatePicker<Label>.Components = [.hourAndMinute, .date])

Creates an instance that selects a `Date` in a closed range. - Parameters: - titleResource: The localized title of `self`, describing its purpose. - selection: The date value being displayed and selected. - range: The inclusive range of selectable dates. - displayedComponents: The date components that user is able to view and edit. Defaults to `[.hourAndMinute, .date]`. On watchOS, if `.hourAndMinute` or `.hourMinuteAndSecond` are included with `.date`, only `.date` is displayed.

init · iOS 16.0+

init

TypeScript
static initSelectionInDisplayedComponents56805(titleResource: _Foundation_LocalizedStringResource, selection: _SwiftUICore_Binding<globalThis.Date>, range: SDKHandle, displayedComponents?: DatePickerComponents): DatePicker<_SwiftUICore_Text>
Swift declaration
@export(implementation) nonisolated init(_ titleResource: LocalizedStringResource, selection: Binding<Date>, in range: PartialRangeFrom<Date>, displayedComponents: DatePicker<Label>.Components = [.hourAndMinute, .date])

Creates an instance that selects a `Date` on or after some start date. - Parameters: - titleResource: The localized title of `self`, describing its purpose. - selection: The date value being displayed and selected. - range: The open range from some selectable start date. - displayedComponents: The date components that user is able to view and edit. Defaults to `[.hourAndMinute, .date]`. On watchOS, if `.hourAndMinute` or `.hourMinuteAndSecond` are included with `.date`, only `.date` is displayed.

init · iOS 16.0+

init

TypeScript
static initSelectionInDisplayedComponents31303(titleResource: _Foundation_LocalizedStringResource, selection: _SwiftUICore_Binding<globalThis.Date>, range: SDKHandle, displayedComponents?: DatePickerComponents): DatePicker<_SwiftUICore_Text>
Swift declaration
@export(implementation) nonisolated init(_ titleResource: LocalizedStringResource, selection: Binding<Date>, in range: PartialRangeThrough<Date>, displayedComponents: DatePicker<Label>.Components = [.hourAndMinute, .date])

Creates an instance that selects a `Date` on or before some end date. - Parameters: - titleResource: The localized title of `self`, describing its purpose. - selection: The date value being displayed and selected. - range: The open range before some selectable end date. - displayedComponents: The date components that user is able to view and edit. Defaults to `[.hourAndMinute, .date]`. On watchOS, if `.hourAndMinute` or `.hourMinuteAndSecond` are included with `.date`, only `.date` is displayed.

init · iOS 13.0+

init

TypeScript
static initSelectionInDisplayedComponents74860(titleKey: _SwiftUICore_LocalizedStringKey, selection: _SwiftUICore_Binding<globalThis.Date>, range: SDKHandle, displayedComponents?: DatePickerComponents): DatePicker<_SwiftUICore_Text>
Swift declaration
nonisolated init(_ titleKey: LocalizedStringKey, selection: Binding<Date>, in range: ClosedRange<Date>, displayedComponents: DatePicker<Label>.Components = [.hourAndMinute, .date])

Creates an instance that selects a `Date` in a closed range. - Parameters: - titleKey: The key for the localized title of `self`, describing its purpose. - selection: The date value being displayed and selected. - range: The inclusive range of selectable dates. - displayedComponents: The date components that user is able to view and edit. Defaults to `[.hourAndMinute, .date]`. On watchOS, if `.hourAndMinute` or `.hourMinuteAndSecond` are included with `.date`, only `.date` is displayed.

init · iOS 13.0+

init

TypeScript
static initSelectionInDisplayedComponents29051(titleKey: _SwiftUICore_LocalizedStringKey, selection: _SwiftUICore_Binding<globalThis.Date>, range: SDKHandle, displayedComponents?: DatePickerComponents): DatePicker<_SwiftUICore_Text>
Swift declaration
nonisolated init(_ titleKey: LocalizedStringKey, selection: Binding<Date>, in range: PartialRangeFrom<Date>, displayedComponents: DatePicker<Label>.Components = [.hourAndMinute, .date])

Creates an instance that selects a `Date` on or after some start date. - Parameters: - titleKey: The key for the localized title of `self`, describing its purpose. - selection: The date value being displayed and selected. - range: The open range from some selectable start date. - displayedComponents: The date components that user is able to view and edit. Defaults to `[.hourAndMinute, .date]`. On watchOS, if `.hourAndMinute` or `.hourMinuteAndSecond` are included with `.date`, only `.date` is displayed.

init · iOS 13.0+

init

TypeScript
static initSelectionInDisplayedComponents2613(titleKey: _SwiftUICore_LocalizedStringKey, selection: _SwiftUICore_Binding<globalThis.Date>, range: SDKHandle, displayedComponents?: DatePickerComponents): DatePicker<_SwiftUICore_Text>
Swift declaration
nonisolated init(_ titleKey: LocalizedStringKey, selection: Binding<Date>, in range: PartialRangeThrough<Date>, displayedComponents: DatePicker<Label>.Components = [.hourAndMinute, .date])

Creates an instance that selects a `Date` on or before some end date. - Parameters: - titleKey: The key for the localized title of `self`, describing its purpose. - selection: The date value being displayed and selected. - range: The open range before some selectable end date. - displayedComponents: The date components that user is able to view and edit. Defaults to `[.hourAndMinute, .date]`. On watchOS, if `.hourAndMinute` or `.hourMinuteAndSecond` are included with `.date`, only `.date` is displayed.

init · iOS 13.0+

init

TypeScript
static initSelectionInDisplayedComponents27492(title: string, selection: _SwiftUICore_Binding<globalThis.Date>, range: SDKHandle, displayedComponents?: DatePickerComponents): DatePicker<_SwiftUICore_Text>
Swift declaration
nonisolated init<S>(_ title: S, selection: Binding<Date>, in range: ClosedRange<Date>, displayedComponents: DatePicker<Label>.Components = [.hourAndMinute, .date]) where S : StringProtocol

Creates an instance that selects a `Date` in a closed range. - Parameters: - title: The title of `self`, describing its purpose. - selection: The date value being displayed and selected. - range: The inclusive range of selectable dates. - displayedComponents: The date components that user is able to view and edit. Defaults to `[.hourAndMinute, .date]`. On watchOS, if `.hourAndMinute` or `.hourMinuteAndSecond` are included with `.date`, only `.date` is displayed.

init · iOS 13.0+

init

TypeScript
static initSelectionInDisplayedComponents37443(title: string, selection: _SwiftUICore_Binding<globalThis.Date>, range: SDKHandle, displayedComponents?: DatePickerComponents): DatePicker<_SwiftUICore_Text>
Swift declaration
nonisolated init<S>(_ title: S, selection: Binding<Date>, in range: PartialRangeFrom<Date>, displayedComponents: DatePicker<Label>.Components = [.hourAndMinute, .date]) where S : StringProtocol

Creates an instance that selects a `Date` on or after some start date. - Parameters: - title: The title of `self`, describing its purpose. - selection: The date value being displayed and selected. - range: The open range from some selectable start date. - displayedComponents: The date components that user is able to view and edit. Defaults to `[.hourAndMinute, .date]`. On watchOS, if `.hourAndMinute` or `.hourMinuteAndSecond` are included with `.date`, only `.date` is displayed.

init · iOS 13.0+

init

TypeScript
static initSelectionInDisplayedComponents34807(title: string, selection: _SwiftUICore_Binding<globalThis.Date>, range: SDKHandle, displayedComponents?: DatePickerComponents): DatePicker<_SwiftUICore_Text>
Swift declaration
nonisolated init<S>(_ title: S, selection: Binding<Date>, in range: PartialRangeThrough<Date>, displayedComponents: DatePicker<Label>.Components = [.hourAndMinute, .date]) where S : StringProtocol

Creates an instance that selects a `Date` on or before some end date. - Parameters: - title: The title of `self`, describing its purpose. - selection: The date value being displayed and selected. - range: The open range before some selectable end date. - displayedComponents: The date components that user is able to view and edit. Defaults to `[.hourAndMinute, .date]`. On watchOS, if `.hourAndMinute` or `.hourMinuteAndSecond` are included with `.date`, only `.date` is displayed.

init · iOS 14.0+

init

TypeScript
static init(nsEdgeInsets: { top: number; leading: number; bottom: number; trailing: number }): _SwiftUICore_EdgeInsets
Swift declaration
init(_ nsEdgeInsets: NSDirectionalEdgeInsets)

Create edge insets from the equivalent NSDirectionalEdgeInsets.

get · iOS 15.0+

wrappedValue

TypeScript
get wrappedValue(): number
Swift declaration
var wrappedValue: Value { get nonmutating set }

The current state value, taking into account whatever bindings might be in effect due to the current location of focus. When focus is not in any view that is bound to this state, the wrapped value will be `nil` (for optional-typed state) or `false` (for `Bool`- typed state).

set · iOS 15.0+

wrappedValue

TypeScript
set wrappedValue(value: number)
Swift declaration
var wrappedValue: Value { get nonmutating set }

The current state value, taking into account whatever bindings might be in effect due to the current location of focus. When focus is not in any view that is bound to this state, the wrapped value will be `nil` (for optional-typed state) or `false` (for `Bool`- typed state).

get · iOS 15.0+

projectedValue

TypeScript
get projectedValue(): FocusState_Binding<number>
Swift declaration
var projectedValue: FocusState<Value>.Binding { get }

A projection of the focus state value that returns a binding. When focus is outside any view that is bound to this state, the wrapped value is `nil` for optional-typed state or `false` for Boolean state. In the following example of a simple navigation sidebar, when the user presses the Filter Sidebar Contents button, focus moves to the sidebar's filter text field. Conversely, if the user moves focus to the sidebar's filter manually, then the value of `isFiltering` automatically becomes `true`, and the sidebar view updates. struct Sidebar: View { @State private var filterText = "" @FocusState private var isFiltering: Bool var body: some View { VStack { Button("Filter Sidebar Contents") { isFiltering = true } TextField("Filter", text: $filterText) .focused($isFiltering) } } }

get · iOS 15.0+

wrappedValue

TypeScript
get wrappedValue(): number
Swift declaration
var wrappedValue: Value { get nonmutating set }

The underlying value referenced by the bound property.

set · iOS 15.0+

wrappedValue

TypeScript
set wrappedValue(value: number)
Swift declaration
var wrappedValue: Value { get nonmutating set }

The underlying value referenced by the bound property.

get · iOS 15.0+

projectedValue

TypeScript
get projectedValue(): FocusState_Binding<number>
Swift declaration
var projectedValue: FocusState<Value>.Binding { get }

A projection of the binding value that returns a binding. Use the projected value to pass a binding value down a view hierarchy.

init · iOS 15.0+

init

TypeScript
static init(): FocusState<boolean>
Swift declaration
init() where Value == Bool

Creates a focus state that binds to a Boolean.

init · iOS 15.0+

init

TypeScript
static init79870(): FocusState<(number) | null>
Swift declaration
init<T>() where Value == T?, T : Hashable

Creates a focus state that binds to an optional type.

get · iOS 13.0+

showsIndicators

TypeScript
get showsIndicators(): boolean
Swift declaration
nonisolated var showsIndicators: Bool { get set }

A value that indicates whether the scroll view displays the scrollable component of the content offset, in a way that's suitable for the platform. The default is `true`.

set · iOS 13.0+

showsIndicators

TypeScript
set showsIndicators(value: boolean)
Swift declaration
nonisolated var showsIndicators: Bool { get set }

A value that indicates whether the scroll view displays the scrollable component of the content offset, in a way that's suitable for the platform. The default is `true`.

get · iOS 13.0+

axes

TypeScript
get axes(): _SwiftUICore_Axis_Set
Swift declaration
nonisolated var axes: Axis.Set { get set }

The scrollable axes of the scroll view. The default value is ``Axis/vertical``.

set · iOS 13.0+

axes

TypeScript
set axes(value: _SwiftUICore_Axis_Set)
Swift declaration
nonisolated var axes: Axis.Set { get set }

The scrollable axes of the scroll view. The default value is ``Axis/vertical``.

get · iOS 13.0+

content

TypeScript
get content(): SDKHandle
Swift declaration
var content: Content

The scroll view's content.

set · iOS 13.0+

content

TypeScript
set content(value: SDKHandle)
Swift declaration
var content: Content

The scroll view's content.

get · iOS 26.0+

id

TypeScript
get id(): SliderTick_ID<number>
Swift declaration
var id: SliderTick<V>.ID { get }

The identity of a tick, which is derived from its value.

get · iOS 26.0+

body

TypeScript
get body(): Array<SliderTick<number>>
Swift declaration
var body: SliderTick<V>.Body { get }

The value of this type's content.

init · iOS 26.0+

init

TypeScript
static init(titleResource: _Foundation_LocalizedStringResource, value: number): SliderTick<number>
Swift declaration
init(_ titleResource: LocalizedStringResource, _ value: V)

Create a slider tick with a label from a localized string resource.

init · iOS 26.0+

init

TypeScript
static init5691(titleKey: _SwiftUICore_LocalizedStringKey, value: number): SliderTick<number>
Swift declaration
init(_ titleKey: LocalizedStringKey, _ value: V)

Create a slider tick with a label from a localized string key.

init · iOS 26.0+

init

TypeScript
static init96709(title: string, value: number): SliderTick<number>
Swift declaration
init<S>(_ title: S, _ value: V) where S : StringProtocol

Create a slider tick with a label from a string title.

init · iOS 26.0+

init

TypeScript
static init99406(value: number): SliderTick<number>
Swift declaration
init(_ value: V)

Create a labeled slider tick at a specific value.

init · iOS 16.0+

init

TypeScript
static initSelectionSupportsOpacity(titleResource: _Foundation_LocalizedStringResource, selection: _SwiftUICore_Binding<_SwiftUICore_Color>, supportsOpacity?: boolean): ColorPicker<_SwiftUICore_Text>
Swift declaration
@export(implementation) nonisolated init(_ titleResource: LocalizedStringResource, selection: Binding<Color>, supportsOpacity: Bool = true)

Creates a color picker with a text label generated from a title string resource. Use ``ColorPicker`` to create a color well that your app uses to allow the selection of a ``Color``. The example below creates a color well using a ``Binding`` to a property stored in a settings object and title you provide: final class Settings: ObservableObject { @Published var alignmentGuideColor = Color(.sRGB, red: 0.98, green: 0.9, blue: 0.2) } struct FormattingControls: View { @State private var settings = Settings() var body: some View { VStack { // Other formatting controls. ColorPicker("Alignment Guides", selection: $settings.alignmentGuideColor ) } } } - Parameters: - titleResource: The localized title of the picker. - selection: A ``Binding`` to the variable that displays the selected ``Color``. - supportsOpacity: A Boolean value that indicates whether the color picker allows adjustments to the selected color's opacity; the default is `true`.

init · iOS 16.0+

init

TypeScript
static initSelectionSupportsOpacity85758(titleResource: _Foundation_LocalizedStringResource, selection: _SwiftUICore_Binding<_CoreGraphics_CGColor>, supportsOpacity?: boolean): ColorPicker<_SwiftUICore_Text>
Swift declaration
@export(implementation) nonisolated init(_ titleResource: LocalizedStringResource, selection: Binding<CGColor>, supportsOpacity: Bool = true)

Creates a color picker with a text label generated from a title string resource. - Parameters: - titleResource: The localized title of the picker. - selection: A ``Binding`` to the variable that displays the selected ``CGColor``. - supportsOpacity: A Boolean value that indicates whether the color picker allows adjustments to the selected color's opacity; the default is `true`.

init · iOS 14.0+

init

TypeScript
static initSelectionSupportsOpacity99584(titleKey: _SwiftUICore_LocalizedStringKey, selection: _SwiftUICore_Binding<_SwiftUICore_Color>, supportsOpacity?: boolean): ColorPicker<_SwiftUICore_Text>
Swift declaration
nonisolated init(_ titleKey: LocalizedStringKey, selection: Binding<Color>, supportsOpacity: Bool = true)

Creates a color picker with a text label generated from a title string key. Use ``ColorPicker`` to create a color well that your app uses to allow the selection of a ``Color``. The example below creates a color well using a ``Binding`` to a property stored in a settings object and title you provide: final class Settings: ObservableObject { @Published var alignmentGuideColor = Color(.sRGB, red: 0.98, green: 0.9, blue: 0.2) } struct FormattingControls: View { @State private var settings = Settings() var body: some View { VStack { // Other formatting controls. ColorPicker("Alignment Guides", selection: $settings.alignmentGuideColor ) } } } - Parameters: - titleKey: The key for the localized title of the picker. - selection: A ``Binding`` to the variable that displays the selected ``Color``. - supportsOpacity: A Boolean value that indicates whether the color picker allows adjustments to the selected color's opacity; the default is `true`.

init · iOS 14.0+

init

TypeScript
static initSelectionSupportsOpacity84113(titleKey: _SwiftUICore_LocalizedStringKey, selection: _SwiftUICore_Binding<_CoreGraphics_CGColor>, supportsOpacity?: boolean): ColorPicker<_SwiftUICore_Text>
Swift declaration
nonisolated init(_ titleKey: LocalizedStringKey, selection: Binding<CGColor>, supportsOpacity: Bool = true)

Creates a color picker with a text label generated from a title string key. - Parameters: - titleKey: The key for the localized title of the picker. - selection: A ``Binding`` to the variable that displays the selected ``CGColor``. - supportsOpacity: A Boolean value that indicates whether the color picker allows adjustments to the selected color's opacity; the default is `true`.

init · iOS 14.0+

init

TypeScript
static initSelectionSupportsOpacity54936(title: string, selection: _SwiftUICore_Binding<_SwiftUICore_Color>, supportsOpacity?: boolean): ColorPicker<_SwiftUICore_Text>
Swift declaration
nonisolated init<S>(_ title: S, selection: Binding<Color>, supportsOpacity: Bool = true) where S : StringProtocol

Creates a color picker with a text label generated from a title string. Use ``ColorPicker`` to create a color well that your app uses to allow the selection of a ``Color``. The example below creates a color well using a ``Binding`` and title you provide: func showColorPicker(_ title: String, color: Binding<Color>) { ColorPicker(title, selection: color) } - Parameters: - title: The title displayed by the color picker. - selection: A ``Binding`` to the variable containing a ``Color``. - supportsOpacity: A Boolean value that indicates whether the color picker allows adjustments to the selected color's opacity; the default is `true`.

init · iOS 14.0+

init

TypeScript
static initSelectionSupportsOpacity18447(title: string, selection: _SwiftUICore_Binding<_CoreGraphics_CGColor>, supportsOpacity?: boolean): ColorPicker<_SwiftUICore_Text>
Swift declaration
nonisolated init<S>(_ title: S, selection: Binding<CGColor>, supportsOpacity: Bool = true) where S : StringProtocol

Creates a color picker with a text label generated from a title string. - Parameters: - title: The title displayed by the color picker. - selection: A ``Binding`` to the variable containing a ``CGColor``. - supportsOpacity: A Boolean value that indicates whether the color picker allows adjustments to the selected color's opacity; the default is `true`.

init · iOS 14.0+

init

TypeScript
init(uiUserInterfaceStyle: _UIKit_UIUserInterfaceStyle): (_SwiftUICore_ColorScheme) | null
Swift declaration
init?(_ uiUserInterfaceStyle: UIUserInterfaceStyle)

Creates a color scheme from its user interface style equivalent.

get · iOS 16.0+

all

TypeScript
get all(): EditActions<unknown>
Swift declaration
static var all: EditActions<Data> { get }

All the edit actions available on this collection.

init · iOS 16.0+

init

TypeScript
init(rawValue: number): EditActions<unknown>
Swift declaration
init(rawValue: Int)

Creates a new set from a raw value. - Parameter rawValue: The raw value with which to create the collection edits.

get · iOS 16.0+

rawValue

TypeScript
getRawValue($self: EditActions): number
Swift declaration
let rawValue: Int

The raw value.

init · iOS 16.0+

init

TypeScript
static initTextPrompt(titleResource: _Foundation_LocalizedStringResource, text: _SwiftUICore_Binding<string>, prompt?: (_SwiftUICore_Text) | null): SecureField<_SwiftUICore_Text>
Swift declaration
@export(implementation) nonisolated init(_ titleResource: LocalizedStringResource, text: Binding<String>, prompt: Text?)

Creates a secure field with a prompt generated from a `Text`. Use the ``View/onSubmit(of:_:)`` modifier to invoke an action whenever someone submits this secure field --- for example, by pressing the Return key. - Parameters: - titleResource: Text resource for the field's localized title. The title describes the purpose of the field. - text: A binding to the text that the field displays and edits. - prompt: A ``Text`` view that represents the secure field's prompt. The prompt provides guidance on what people should type into the secure field.

init · iOS 15.0+

init

TypeScript
static initTextPrompt10433(titleKey: _SwiftUICore_LocalizedStringKey, text: _SwiftUICore_Binding<string>, prompt?: (_SwiftUICore_Text) | null): SecureField<_SwiftUICore_Text>
Swift declaration
nonisolated init(_ titleKey: LocalizedStringKey, text: Binding<String>, prompt: Text?)

Creates a secure field with a prompt generated from a `Text`. Use the ``View/onSubmit(of:_:)`` modifier to invoke an action whenever someone submits this secure field --- for example, by pressing the Return key. - Parameters: - titleKey: The key for the field's localized title. The title describes the purpose of the field. - text: A binding to the text that the field displays and edits. - prompt: A ``Text`` view that represents the secure field's prompt. The prompt provides guidance on what people should type into the secure field.

init · iOS 15.0+

init

TypeScript
static initTextPrompt45231(title: string, text: _SwiftUICore_Binding<string>, prompt?: (_SwiftUICore_Text) | null): SecureField<_SwiftUICore_Text>
Swift declaration
nonisolated init<S>(_ title: S, text: Binding<String>, prompt: Text?) where S : StringProtocol

Creates a secure field with a prompt generated from a `Text`. Use the ``View/onSubmit(of:_:)`` modifier to invoke an action whenever someone submits this secure field --- for example, by pressing the Return key. - Parameters: - title: A string that describes the purpose of the field. - text: A binding to the text that the field displays and edits. - prompt: A ``Text`` view that represents the secure field's prompt. The prompt provides guidance on what people should type into the secure field.

init · iOS 13.0+ · Deprecated in iOS 100000.0

init

TypeScript
static initTextOnCommit(titleKey: _SwiftUICore_LocalizedStringKey, text: _SwiftUICore_Binding<string>, onCommit: (() => void)): SecureField<_SwiftUICore_Text>
Swift declaration
nonisolated init(_ titleKey: LocalizedStringKey, text: Binding<String>, onCommit: @escaping () -> Void)

Creates an instance. - Parameters: - titleKey: The key for the localized title of `self`, describing its purpose. - text: The text to display and edit. - onCommit: The action to perform when the user performs an action (usually pressing the Return key) while the secure field has focus.

init · iOS 13.0+ · Deprecated in iOS 100000.0

init

TypeScript
static initTextOnCommit45604(title: string, text: _SwiftUICore_Binding<string>, onCommit: (() => void)): SecureField<_SwiftUICore_Text>
Swift declaration
nonisolated init<S>(_ title: S, text: Binding<String>, onCommit: @escaping () -> Void) where S : StringProtocol

Creates an instance. - Parameters: - title: The title of `self`, describing its purpose. - text: The text to display and edit. - onCommit: The action to perform when the user performs an action (usually pressing the Return key) while the secure field has focus.

init · iOS 16.0+

init

TypeScript
static initText(titleResource: _Foundation_LocalizedStringResource, text: _SwiftUICore_Binding<string>): SecureField<_SwiftUICore_Text>
Swift declaration
@export(implementation) nonisolated init(_ titleResource: LocalizedStringResource, text: Binding<String>)

Creates a secure field with a prompt generated from a `Text`. Use the ``View/onSubmit(of:_:)`` modifier to invoke an action whenever someone submits this secure field --- for example, by pressing the Return key. - Parameters: - titleResource: Text resource for the field's localized title. The title describes the purpose of the field. - text: A binding to the text that the field displays and edits.

init · iOS 13.0+

init

TypeScript
static initText18553(titleKey: _SwiftUICore_LocalizedStringKey, text: _SwiftUICore_Binding<string>): SecureField<_SwiftUICore_Text>
Swift declaration
@export(implementation) nonisolated init(_ titleKey: LocalizedStringKey, text: Binding<String>)

Creates a secure field with a prompt generated from a `Text`. Use the ``View/onSubmit(of:_:)`` modifier to invoke an action whenever someone submits this secure field --- for example, by pressing the Return key. - Parameters: - titleKey: The key for the field's localized title. The title describes the purpose of the field. - text: A binding to the text that the field displays and edits.

init · iOS 13.0+

init

TypeScript
static initText16995(title: string, text: _SwiftUICore_Binding<string>): SecureField<_SwiftUICore_Text>
Swift declaration
@export(implementation) nonisolated init<S>(_ title: S, text: Binding<String>) where S : StringProtocol

Creates a secure field with a prompt generated from a `Text`. Use the ``View/onSubmit(of:_:)`` modifier to invoke an action whenever someone submits this secure field --- for example, by pressing the Return key. - Parameters: - title: A string that describes the purpose of the field. - text: A binding to the text that the field displays and edits.

method · iOS 16.0+

width

TypeScript
widthMinIdealMax(min?: (number) | null, ideal?: (number) | null, max?: (number) | null): TableColumn<SDKHandle, SDKHandle, SDKHandle, SDKHandle>
Swift declaration
nonisolated func width(min: CGFloat? = nil, ideal: CGFloat? = nil, max: CGFloat? = nil) -> TableColumn<RowValue, Sort, Content, Label>

Creates a resizable table column with the provided constraints. Always specify at least one width constraint when calling this method. Pass `nil` or leave out a constraint to indicate no change to the sizing of a column. To create a fixed size column use ``SwiftUI/TableColumn/width(_:)`` instead. - Parameters: - min: The minimum width of a resizable column. If non-`nil`, the value must be greater than or equal to `0`. - ideal: The ideal width of the column, used to determine the initial width of the table column. The column always starts at least as large as the set ideal size, but may be larger if table was sized larger than the ideal of all of its columns. - max: The maximum width of a resizable column. If non-`nil`, the value must be greater than `0`. Pass <doc://com.apple.documentation/documentation/swift/floatingpoint/infinity> to indicate unconstrained maximum width.

method · iOS 16.0+

width

TypeScript
width(): TableColumn<SDKHandle, SDKHandle, SDKHandle, SDKHandle>
Swift declaration
@export(implementation) nonisolated func width() -> TableColumn<RowValue, Sort, Content, Label>

Does not change the table column's width. Use ``SwiftUI/TableColumn/width(_:)`` or ``SwiftUI/TableColumn/width(min:ideal:max:)`` instead.

method · iOS 16.0+

width

TypeScript
width57743(width?: (number) | null): TableColumn<SDKHandle, SDKHandle, SDKHandle, SDKHandle>
Swift declaration
nonisolated func width(_ width: CGFloat? = nil) -> TableColumn<RowValue, Sort, Content, Label>

Creates a fixed width table column that isn't user resizable. - Parameter width: A fixed width for the resulting column. If `width` is `nil`, the resulting column has no change in sizing.

get · iOS 14.0+

id

TypeScript
get id(): number
Swift declaration
nonisolated var id: ID { get }

The stable identity of the entity associated with this instance.

get · iOS 17.0+

dismissBehavior

TypeScript
get dismissBehavior(): DismissBehavior
Swift declaration
var dismissBehavior: DismissBehavior { get set }

The behavior for how windows will dismiss programmatically when used in conjunction with ``DismissWindowAction``. The default value is `.interactive`. You can use this property to dismiss windows which may be showing a modal presentation by using the `.destructive` value: struct DismissWindowButton: View { @Environment(\.dismissWindow) private var dismissWindow var body: some View { Button("Close Auxiliary Window") { withTransaction(\.dismissBehavior, .destructive) { dismissWindow(id: "auxiliary") } } } }

set · iOS 17.0+

dismissBehavior

TypeScript
set dismissBehavior(value: DismissBehavior)
Swift declaration
var dismissBehavior: DismissBehavior { get set }

The behavior for how windows will dismiss programmatically when used in conjunction with ``DismissWindowAction``. The default value is `.interactive`. You can use this property to dismiss windows which may be showing a modal presentation by using the `.destructive` value: struct DismissWindowButton: View { @Environment(\.dismissWindow) private var dismissWindow var body: some View { Button("Close Auxiliary Window") { withTransaction(\.dismissBehavior, .destructive) { dismissWindow(id: "auxiliary") } } } }

static · iOS 17.5+

buildLimitedAvailability

TypeScript
static buildLimitedAvailability(content: SDKHandle): SDKHandle
Swift declaration
@export(implementation) static func buildLimitedAvailability(_ content: any CustomizableToolbarContent) -> some CustomizableToolbarContent
init · iOS 15.0+

init

TypeScript
static init(configuration: ControlGroupStyleConfiguration): ControlGroup<ControlGroupStyleConfiguration_Content>
Swift declaration
nonisolated init(_ configuration: ControlGroupStyleConfiguration)

Creates a control group based on a style configuration. Use this initializer within the ``ControlGroupStyle/makeBody(configuration:)`` method of a ``ControlGroupStyle`` instance to create an instance of the control group being styled. This is useful for custom control group styles that modify the current control group style. For example, the following code creates a new, custom style that places a red border around the current control group: struct RedBorderControlGroupStyle: ControlGroupStyle { func makeBody(configuration: Configuration) -> some View { ControlGroup(configuration) .border(Color.red) } }

get · iOS 15.0+

sortDescriptors

TypeScript
get sortDescriptors(): Promise<Array<_Foundation_SortDescriptor<_CoreData_NSManagedObject>>>
Swift declaration
@MainActor @preconcurrency var sortDescriptors: [SortDescriptor<Result>] { get set }

The request's sort descriptors, accessed as value types. Set this configuration value to cause a ``FetchRequest`` to execute a fetch with a new collection of <doc://com.apple.documentation/documentation/Foundation/SortDescriptor> instances. If you want to use <doc://com.apple.documentation/documentation/Foundation/NSSortDescriptor> instances, set ``FetchRequest/Configuration/nsSortDescriptors`` instead. Access this value of a ``FetchRequest/Configuration`` structure for a given request by using the ``FetchedResults/sortDescriptors`` property on the associated ``FetchedResults`` instance, either directly or through a ``Binding``.

set · iOS 15.0+

sortDescriptors

TypeScript
setSortDescriptors(value: Array<_Foundation_SortDescriptor<_CoreData_NSManagedObject>>): Promise<void>
Swift declaration
@MainActor @preconcurrency var sortDescriptors: [SortDescriptor<Result>] { get set }

The request's sort descriptors, accessed as value types. Set this configuration value to cause a ``FetchRequest`` to execute a fetch with a new collection of <doc://com.apple.documentation/documentation/Foundation/SortDescriptor> instances. If you want to use <doc://com.apple.documentation/documentation/Foundation/NSSortDescriptor> instances, set ``FetchRequest/Configuration/nsSortDescriptors`` instead. Access this value of a ``FetchRequest/Configuration`` structure for a given request by using the ``FetchedResults/sortDescriptors`` property on the associated ``FetchedResults`` instance, either directly or through a ``Binding``.

init · iOS 15.0+

init

TypeScript
static initSortDescriptorsPredicateAnimation(sortDescriptors: Array<_Foundation_SortDescriptor<_CoreData_NSManagedObject>>, predicate?: (_Foundation_NSPredicate) | null, animation?: (_SwiftUICore_Animation) | null): Promise<FetchRequest<_CoreData_NSManagedObject>>
Swift declaration
@MainActor @preconcurrency init(sortDescriptors: [SortDescriptor<Result>], predicate: NSPredicate? = nil, animation: Animation? = nil)

Creates a fetch request based on a predicate and value type sort parameters. The request gets the entity type from the `Result` instance by calling that managed object's <doc://com.apple.documentation/documentation/CoreData/NSManagedObject/entity()> type method. If you need to specify the entity type explicitly, use the ``init(entity:sortDescriptors:predicate:animation:)`` initializer instead. If you need more control over the fetch request configuration, use ``init(fetchRequest:animation:)``. - Parameters: - sortDescriptors: An array of sort descriptors that define the sort order of the fetched results. - predicate: An <doc://com.apple.documentation/documentation/Foundation/NSPredicate> instance that defines logical conditions used to filter the fetched results. - animation: The animation to use for user interface changes that result from changes to the fetched results.

init · iOS 13.0+

init

TypeScript
static initSortDescriptorsPredicateAnimation29941(sortDescriptors: Array<_Foundation_NSSortDescriptor>, predicate?: (_Foundation_NSPredicate) | null, animation?: (_SwiftUICore_Animation) | null): Promise<FetchRequest<_CoreData_NSManagedObject>>
Swift declaration
@MainActor @preconcurrency init(sortDescriptors: [NSSortDescriptor], predicate: NSPredicate? = nil, animation: Animation? = nil)

Creates a fetch request based on a predicate and reference type sort parameters. The request gets the entity type from the `Result` instance by calling that managed object's <doc://com.apple.documentation/documentation/CoreData/NSManagedObject/entity()> type method. If you need to specify the entity type explicitly, use the ``init(entity:sortDescriptors:predicate:animation:)`` initializer instead. If you need more control over the fetch request configuration, use ``init(fetchRequest:animation:)``. - Parameters: - sortDescriptors: An array of sort descriptors that define the sort order of the fetched results. - predicate: An <doc://com.apple.documentation/documentation/Foundation/NSPredicate> instance that defines logical conditions used to filter the fetched results. - animation: The animation to use for user interface changes that result from changes to the fetched results.

get · iOS 14.0+

wrappedValue

TypeScript
get wrappedValue(): (unknown) | null
Swift declaration
var wrappedValue: Value? { get }

The value for the focus key given the current scope and state of the focused view hierarchy. Returns `nil` when nothing in the focused view hierarchy exports a value.

init · iOS 14.0+

init

TypeScript
static init(keyPath: SDKHandle): FocusedValue<unknown>
Swift declaration
init(_ keyPath: KeyPath<FocusedValues, Value?>)

A new property wrapper for the given key path. The value of the property wrapper is updated dynamically as focus changes and different published values go in and out of scope. - Parameter keyPath: The key path for the focus value to read.

init · iOS 13.0+

init

TypeScript
static initInitialValueResetTransaction(initialValue: unknown, resetTransaction: _SwiftUICore_Transaction): GestureState<unknown>
Swift declaration
@export(implementation) init(initialValue: Value, resetTransaction: Transaction)

Creates a view state that's derived from a gesture with an initial state value and a transaction to reset it. - Parameters: - initialValue: An initial state value. - resetTransaction: A transaction that provides metadata for view updates.

init · iOS 13.0+

init

TypeScript
static initInitialValueReset(initialValue: unknown, reset: ((arg0: unknown, arg1: _SwiftUICore_Transaction) => void)): GestureState<unknown>
Swift declaration
@export(implementation) init(initialValue: Value, reset: @escaping (Value, inout Transaction) -> Void)

Creates a view state that's derived from a gesture with an initial state value and a closure that provides a transaction to reset it. - Parameters: - initialValue: An initial state value. - reset: A closure that provides a ``Transaction``.

init · iOS 13.0+

init

TypeScript
static initInitialValue(initialValue: unknown): GestureState<unknown>
Swift declaration
@export(implementation) init(initialValue: Value)

Creates a view state that's derived from a gesture with an initial value. - Parameter initialValue: An initial value for the gesture state property.

init · iOS 13.0+

init

TypeScript
static initWrappedValueResetTransaction(wrappedValue: unknown, resetTransaction: _SwiftUICore_Transaction): GestureState<unknown>
Swift declaration
init(wrappedValue: Value, resetTransaction: Transaction)

Creates a view state that's derived from a gesture with a wrapped state value and a transaction to reset it. - Parameters: - wrappedValue: A wrapped value for the gesture state property. - resetTransaction: A transaction that provides metadata for view updates.

init · iOS 13.0+

init

TypeScript
static initWrappedValueReset(wrappedValue: unknown, reset: ((arg0: unknown, arg1: _SwiftUICore_Transaction) => void)): GestureState<unknown>
Swift declaration
init(wrappedValue: Value, reset: @escaping (Value, inout Transaction) -> Void)

Creates a view state that's derived from a gesture with a wrapped state value and a closure that provides a transaction to reset it. - Parameters: - wrappedValue: A wrapped value for the gesture state property. - reset: A closure that provides a ``Transaction``.

init · iOS 13.0+

init

TypeScript
static initWrappedValue(wrappedValue: unknown): GestureState<unknown>
Swift declaration
init(wrappedValue: Value)

Creates a view state that's derived from a gesture. - Parameter wrappedValue: A wrapped value for the gesture state property.

get · iOS 13.0+

wrappedValue

TypeScript
get wrappedValue(): unknown
Swift declaration
var wrappedValue: Value { get }

The wrapped value referenced by the gesture state property.

get · iOS 13.0+

projectedValue

TypeScript
get projectedValue(): GestureState<unknown>
Swift declaration
var projectedValue: GestureState<Value> { get }

A binding to the gesture state property.

init · iOS 14.0+

init

TypeScript
static initValueTotal(value?: (number) | null, total?: number): ProgressView<_SwiftUICore_EmptyView, _SwiftUICore_EmptyView>
Swift declaration
nonisolated init<V>(value: V?, total: V = 1.0) where Label == EmptyView, CurrentValueLabel == EmptyView, V : BinaryFloatingPoint

Creates a progress view for showing determinate progress. If the value is non-`nil`, but outside the range of `0.0` through `total`, the progress view pins the value to those limits, rounding to the nearest possible bound. A value of `nil` represents indeterminate progress, in which case the progress view ignores `total`. - Parameters: - value: The completed amount of the task to this point, in a range of `0.0` to `total`, or `nil` if the progress is indeterminate. - total: The full amount representing the complete scope of the task, meaning the task is complete if `value` equals `total`. The default value is `1.0`.

init · iOS 14.0+

init

TypeScript
static init(): ProgressView<_SwiftUICore_EmptyView, _SwiftUICore_EmptyView>
Swift declaration
nonisolated init() where Label == EmptyView

Creates a progress view for showing indeterminate progress, without a label.

init · iOS 16.0+

init

TypeScript
static init99443(titleResource: _Foundation_LocalizedStringResource): ProgressView<_SwiftUICore_Text, _SwiftUICore_EmptyView>
Swift declaration
@export(implementation) nonisolated init(_ titleResource: LocalizedStringResource) where Label == Text

Creates a progress view for showing indeterminate progress that generates its label from a localized string resource. This initializer creates a ``Text`` view on your behalf. See ``Text`` for more information about localizing strings. To initialize a indeterminate progress view with a string variable, use the corresponding initializer that takes a `StringProtocol` instance. - Parameters: - titleResource: Text resource for the progress view's localized title that describes the task in progress.

init · iOS 14.0+

init

TypeScript
static init68874(titleKey: _SwiftUICore_LocalizedStringKey): ProgressView<_SwiftUICore_Text, _SwiftUICore_EmptyView>
Swift declaration
nonisolated init(_ titleKey: LocalizedStringKey) where Label == Text

Creates a progress view for showing indeterminate progress that generates its label from a localized string. This initializer creates a ``Text`` view on your behalf, and treats the localized key similar to ``Text/init(_:tableName:bundle:comment:)``. See ``Text`` for more information about localizing strings. To initialize a indeterminate progress view with a string variable, use the corresponding initializer that takes a `StringProtocol` instance. - Parameters: - titleKey: The key for the progress view's localized title that describes the task in progress.

init · iOS 14.0+

init

TypeScript
static init37513(title: string): ProgressView<_SwiftUICore_Text, _SwiftUICore_EmptyView>
Swift declaration
nonisolated init<S>(_ title: S) where Label == Text, S : StringProtocol

Creates a progress view for showing indeterminate progress that generates its label from a string. - Parameters: - title: A string that describes the task in progress. This initializer creates a ``Text`` view on your behalf, and treats the title similar to ``Text/init(verbatim:)``. See ``Text`` for more information about localizing strings. To initialize a progress view with a localized string key, use the corresponding initializer that takes a `LocalizedStringKey` instance.

init · iOS 16.0+

init

TypeScript
static initTimerIntervalCountsDown(timerInterval: SDKHandle, countsDown?: boolean): ProgressView<_SwiftUICore_EmptyView, DefaultDateProgressLabel>
Swift declaration
nonisolated init(timerInterval: ClosedRange<Date>, countsDown: Bool = true)

Creates a progress view for showing continuous progress as time passes. Use this initializer to create a view that shows continuous progress within a date range. The following example initializes a progress view with a range of `start...end`, where `start` is 30 seconds in the past and `end` is 90 seconds in the future. As a result, the progress view begins at 25 percent complete. struct ContentView: View { let start = Date().addingTimeInterval(-30) let end = Date().addingTimeInterval(90) var body: some View { ProgressView(timerInterval: start...end countsDown: false) } } ![A horizontal bar that represents progress, partially filled in from the leading edge. The elapsed time, 0:34, appears below the bar.](ProgressView-8-macOS) By default, the progress view empties as time passes from the start of the date range to the end, but you can use the `countsDown` parameter to create a progress view that fills as time passes, as the above example demonstrates. The progress view provided by this initializer omits a descriptive label and provides a text label that automatically updates to describe the current time remaining. To provide custom views for these labels, use ``init(value:total:label:currentValueLabel:)`` instead. > Note: Date-relative progress views, such as those created with this initializer, don't support custom styles. - Parameters: - timerInterval: The date range over which the view progresses. - countsDown: If `true` (the default), the view empties as time passes.

init · iOS 16.0+

init

TypeScript
static initValueTotal15427(titleResource: _Foundation_LocalizedStringResource, value?: (number) | null, total?: number): ProgressView<_SwiftUICore_Text, _SwiftUICore_EmptyView>
Swift declaration
@export(implementation) nonisolated init<V>(_ titleResource: LocalizedStringResource, value: V?, total: V = 1.0) where Label == Text, CurrentValueLabel == EmptyView, V : BinaryFloatingPoint

Creates a progress view for showing determinate progress that generates its label from a localized string resource. If the value is non-`nil`, but outside the range of `0.0` through `total`, the progress view pins the value to those limits, rounding to the nearest possible bound. A value of `nil` represents indeterminate progress, in which case the progress view ignores `total`. This initializer creates a ``Text`` view on your behalf. See ``Text`` for more information about localizing strings. To initialize a determinate progress view with a string variable, use the corresponding initializer that takes a `StringProtocol` instance. - Parameters: - titleResource: Text resource for the progress view's localized title that describes the task in progress. - value: The completed amount of the task to this point, in a range of `0.0` to `total`, or `nil` if the progress is indeterminate. - total: The full amount representing the complete scope of the task, meaning the task is complete if `value` equals `total`. The default value is `1.0`.

init · iOS 14.0+

init

TypeScript
static initValueTotal54586(titleKey: _SwiftUICore_LocalizedStringKey, value?: (number) | null, total?: number): ProgressView<_SwiftUICore_Text, _SwiftUICore_EmptyView>
Swift declaration
nonisolated init<V>(_ titleKey: LocalizedStringKey, value: V?, total: V = 1.0) where Label == Text, CurrentValueLabel == EmptyView, V : BinaryFloatingPoint

Creates a progress view for showing determinate progress that generates its label from a localized string. If the value is non-`nil`, but outside the range of `0.0` through `total`, the progress view pins the value to those limits, rounding to the nearest possible bound. A value of `nil` represents indeterminate progress, in which case the progress view ignores `total`. This initializer creates a ``Text`` view on your behalf, and treats the localized key similar to ``Text/init(_:tableName:bundle:comment:)``. See ``Text`` for more information about localizing strings. To initialize a determinate progress view with a string variable, use the corresponding initializer that takes a `StringProtocol` instance. - Parameters: - titleKey: The key for the progress view's localized title that describes the task in progress. - value: The completed amount of the task to this point, in a range of `0.0` to `total`, or `nil` if the progress is indeterminate. - total: The full amount representing the complete scope of the task, meaning the task is complete if `value` equals `total`. The default value is `1.0`.

init · iOS 14.0+

init

TypeScript
static initValueTotal49894(title: string, value?: (number) | null, total?: number): ProgressView<_SwiftUICore_Text, _SwiftUICore_EmptyView>
Swift declaration
nonisolated init<S, V>(_ title: S, value: V?, total: V = 1.0) where Label == Text, CurrentValueLabel == EmptyView, S : StringProtocol, V : BinaryFloatingPoint

Creates a progress view for showing determinate progress that generates its label from a string. If the value is non-`nil`, but outside the range of `0.0` through `total`, the progress view pins the value to those limits, rounding to the nearest possible bound. A value of `nil` represents indeterminate progress, in which case the progress view ignores `total`. This initializer creates a ``Text`` view on your behalf, and treats the title similar to ``Text/init(verbatim:)``. See ``Text`` for more information about localizing strings. To initialize a determinate progress view with a localized string key, use the corresponding initializer that takes a `LocalizedStringKey` instance. - Parameters: - title: The string that describes the task in progress. - value: The completed amount of the task to this point, in a range of `0.0` to `total`, or `nil` if the progress is indeterminate. - total: The full amount representing the complete scope of the task, meaning the task is complete if `value` equals `total`. The default value is `1.0`.

init · iOS 14.0+

init

TypeScript
static init10522(progress: _Foundation_Progress): ProgressView<_SwiftUICore_EmptyView, _SwiftUICore_EmptyView>
Swift declaration
nonisolated init(_ progress: Progress) where Label == EmptyView, CurrentValueLabel == EmptyView

Creates a progress view for visualizing the given progress instance. The progress view synthesizes a default label using the `localizedDescription` of the given progress instance.

init · iOS 14.0+

init

TypeScript
static init65192(configuration: ProgressViewStyleConfiguration): ProgressView<ProgressViewStyleConfiguration_Label, ProgressViewStyleConfiguration_CurrentValueLabel>
Swift declaration
nonisolated init(_ configuration: ProgressViewStyleConfiguration) where Label == ProgressViewStyleConfiguration.Label, CurrentValueLabel == ProgressViewStyleConfiguration.CurrentValueLabel

Creates a progress view based on a style configuration. You can use this initializer within the ``ProgressViewStyle/makeBody(configuration:)`` method of a ``ProgressViewStyle`` to create an instance of the styled progress view. This is useful for custom progress view styles that only modify the current progress view style, as opposed to implementing a brand new style. Because this modifier style can't know how the current style represents progress, avoid making assumptions about the view's contents, such as whether it uses bars or other shapes. The following example shows a style that adds a rounded pink border to a progress view, but otherwise preserves the progress view's current style: struct PinkBorderedProgressViewStyle: ProgressViewStyle { func makeBody(configuration: Configuration) -> some View { ProgressView(configuration) .padding(4) .border(.pink, width: 3) .cornerRadius(4) } } ![Two horizontal progress views, one at 25 percent complete and the other at 75 percent, each rendered with a rounded pink border.](ProgressView-4-macOS) - Note: Progress views in widgets don't apply custom styles.

init · iOS 18.0+

init

TypeScript
static initWrappedValueStore(wrappedValue: TabViewCustomization, key: string, store?: (_Foundation_UserDefaults) | null): SceneStorage<TabViewCustomization>
Swift declaration
init(wrappedValue: Value = TabViewCustomization(), _ key: String, store: UserDefaults? = nil) where Value == TabViewCustomization

Creates a property that can save and restore tab sidebar customizations. You can set this customization on the TabView using ``View/tabViewCustomization(_:)``. The tab view customization is typically not added to `SceneStorage`, but instead stored in `AppStorage` so the customizations are consistent across different scenes. - Parameter wrappedValue: The default value if the customization is not available for the given key. - Parameter key: a key used to save and restore the value. - Parameter store: The user defaults store to read and write to. A value of `nil` will use the user default store from the environment.

init · iOS 14.0+

init

TypeScript
static initWrappedValue(wrappedValue: string, key: string): SceneStorage<string>
Swift declaration
init(wrappedValue: Value, _ key: String) where Value == URL

Creates a property that can save and restore a URL. - Parameter wrappedValue: The default value if a URL is not available for the given key. - Parameter key: a key used to save and restore the value.

init · iOS 14.0+

init

TypeScript
static initWrappedValue26719(wrappedValue: ArrayBuffer, key: string): SceneStorage<ArrayBuffer>
Swift declaration
init(wrappedValue: Value, _ key: String) where Value == Data

Creates a property that can save and restore data. Avoid storing large data blobs, such as image data, as it can negatively affect performance of your app. - Parameter wrappedValue: The default value if data is not available for the given key. - Parameter key: a key used to save and restore the value.

init · iOS 18.0+

init

TypeScript
static initWrappedValue76643(wrappedValue: globalThis.Date, key: string): SceneStorage<globalThis.Date>
Swift declaration
init(wrappedValue: Value, _ key: String) where Value == Date

Creates a property that can save and restore a Date. - Parameter wrappedValue: The default value if a Date is not available for the given key. - Parameter key: a key used to save and restore the value.

init · iOS 14.0+

init

TypeScript
static initWrappedValue34599(wrappedValue: string, key: string): SceneStorage<string>
Swift declaration
init(wrappedValue: Value, _ key: String) where Value == String

Creates a property that can save and restore a string. - Parameter wrappedValue: The default value if a string is not available for the given key. - Parameter key: a key used to save and restore the value.

init · iOS 14.0+

init

TypeScript
static initWrappedValue3556(wrappedValue: boolean, key: string): SceneStorage<boolean>
Swift declaration
init(wrappedValue: Value, _ key: String) where Value == Bool

Creates a property that can save and restore a boolean. - Parameter wrappedValue: The default value if a boolean is not available for the given key. - Parameter key: a key used to save and restore the value.

init · iOS 14.0+

init

TypeScript
static initWrappedValue44130(wrappedValue: number, key: string): SceneStorage<number>
Swift declaration
init(wrappedValue: Value, _ key: String) where Value == Double

Creates a property that can save and restore a double. - Parameter wrappedValue: The default value if a double is not available for the given key. - Parameter key: a key used to save and restore the value.

init · iOS 14.0+

init

TypeScript
static initWrappedValue90409(wrappedValue: number, key: string): SceneStorage<number>
Swift declaration
init(wrappedValue: Value, _ key: String) where Value == Int

Creates a property that can save and restore an integer. - Parameter wrappedValue: The default value if an integer is not available for the given key. - Parameter key: a key used to save and restore the value.

get · iOS 14.0+

wrappedValue

TypeScript
get wrappedValue(): unknown
Swift declaration
var wrappedValue: Value { get nonmutating set }

The underlying value referenced by the state variable. This works identically to `State.wrappedValue`. - SeeAlso: State.wrappedValue

set · iOS 14.0+

wrappedValue

TypeScript
set wrappedValue(value: unknown)
Swift declaration
var wrappedValue: Value { get nonmutating set }

The underlying value referenced by the state variable. This works identically to `State.wrappedValue`. - SeeAlso: State.wrappedValue

get · iOS 14.0+

projectedValue

TypeScript
get projectedValue(): _SwiftUICore_Binding<unknown>
Swift declaration
var projectedValue: Binding<Value> { get }

A binding to the state value. This works identically to `State.projectedValue`. - SeeAlso: State.projectedValue

init · iOS 14.0+

init

TypeScript
static init(key: string): SceneStorage<(string) | null>
Swift declaration
init(_ key: String) where Value == URL?

Creates a property that can save and restore an Optional URL. Defaults to nil if there is no restored value - Parameter key: a key used to save and restore the value.

init · iOS 14.0+

init

TypeScript
static init25898(key: string): SceneStorage<(ArrayBuffer) | null>
Swift declaration
init(_ key: String) where Value == Data?

Creates a property that can save and restore an Optional data. Defaults to nil if there is no restored value - Parameter key: a key used to save and restore the value.

init · iOS 18.0+

init

TypeScript
static init68030(key: string): SceneStorage<(globalThis.Date) | null>
Swift declaration
init(_ key: String) where Value == Date?

Creates a property that can save and restore an Optional Date. Defaults to nil if there is no restored value - Parameter key: a key used to save and restore the value.

init · iOS 14.0+

init

TypeScript
static init66157(key: string): SceneStorage<(string) | null>
Swift declaration
init(_ key: String) where Value == String?

Creates a property that can save and restore an Optional string. Defaults to nil if there is no restored value - Parameter key: a key used to save and restore the value.

init · iOS 14.0+

init

TypeScript
static init13250(key: string): SceneStorage<(boolean) | null>
Swift declaration
init(_ key: String) where Value == Bool?

Creates a property that can save and restore an Optional boolean. Defaults to nil if there is no restored value - Parameter key: a key used to save and restore the value.

init · iOS 14.0+

init

TypeScript
static init27288(key: string): SceneStorage<(number) | null>
Swift declaration
init(_ key: String) where Value == Double?

Creates a property that can save and restore an Optional double. Defaults to nil if there is no restored value - Parameter key: a key used to save and restore the value.

init · iOS 14.0+

init

TypeScript
static init52255(key: string): SceneStorage<(number) | null>
Swift declaration
init(_ key: String) where Value == Int?

Creates a property that can save and restore an Optional integer. Defaults to nil if there is no restored value - Parameter key: a key used to save and restore the value.

init · iOS 16.0+

init

TypeScript
static initImage(titleResource: _Foundation_LocalizedStringResource, image: string): SharePreview<string, never>
Swift declaration
@export(implementation) init(_ titleResource: LocalizedStringResource, image: Image)

Creates a preview representation. - Parameters: - titleResource: A resource for the title to show in a preview. - image: An image to show in a preview.

init · iOS 16.0+

init

TypeScript
static initImage74208(titleKey: _SwiftUICore_LocalizedStringKey, image: string): SharePreview<string, never>
Swift declaration
init(_ titleKey: LocalizedStringKey, image: Image)

Creates a preview representation. - Parameters: - titleKey: A key identifying a title to show in a preview. - image: An image to show in a preview.

init · iOS 16.0+

init

TypeScript
static initImage70757(title: _SwiftUICore_Text, image: string): SharePreview<string, never>
Swift declaration
init(_ title: Text, image: Image)

Creates a preview representation. - Parameters: - title: A title to show in a preview. - image: An image to show in a preview.

init · iOS 16.0+

init

TypeScript
static initImage65148(title: string, image: string): SharePreview<string, never>
Swift declaration
init<S>(_ title: S, image: Image) where S : StringProtocol

Creates a preview representation. - Parameters: - title: A title to show in a preview. - image: An image to show in a preview.

init · iOS 16.0+

init

TypeScript
static init(titleResource: _Foundation_LocalizedStringResource): SharePreview<never, never>
Swift declaration
@export(implementation) init(_ titleResource: LocalizedStringResource)

Creates a preview representation. - Parameters: - titleResource: A resource for the title to show in a preview.

init · iOS 16.0+

init

TypeScript
static init91740(titleKey: _SwiftUICore_LocalizedStringKey): SharePreview<never, never>
Swift declaration
init(_ titleKey: LocalizedStringKey)

Creates a preview representation. - Parameters: - titleKey: A key identifying a title to show in a preview.

init · iOS 16.0+

init

TypeScript
static init3317(title: _SwiftUICore_Text): SharePreview<never, never>
Swift declaration
init(_ title: Text)

Creates a preview representation. - Parameters: - title: A title to show in a preview.

init · iOS 16.0+

init

TypeScript
static init85892(title: string): SharePreview<never, never>
Swift declaration
init<S>(_ title: S) where S : StringProtocol

Creates a preview representation. - Parameters: - title: A title to show in a preview.

init · iOS 16.0+

init

TypeScript
static initIcon(titleResource: _Foundation_LocalizedStringResource, icon: string): SharePreview<never, string>
Swift declaration
@export(implementation) init(_ titleResource: LocalizedStringResource, icon: Icon)

Creates a preview representation. - Parameters: - titleResource: A resource for the title to show in a preview. - icon: An icon to show in a preview.

init · iOS 16.0+

init

TypeScript
static initIcon76522(titleKey: _SwiftUICore_LocalizedStringKey, icon: string): SharePreview<never, string>
Swift declaration
init(_ titleKey: LocalizedStringKey, icon: Icon)

Creates a preview representation. - Parameters: - titleKey: A key identifying a title to show in a preview. - icon: An icon to show in a preview.

init · iOS 16.0+

init

TypeScript
static initIcon23621(title: _SwiftUICore_Text, icon: string): SharePreview<never, string>
Swift declaration
init(_ title: Text, icon: Icon)

Creates a preview representation. - Parameters: - title: A title to show in a preview. - icon: An icon to show in a preview.

init · iOS 16.0+

init

TypeScript
static initIcon68432(title: string, icon: string): SharePreview<never, string>
Swift declaration
init<S>(_ title: S, icon: Icon) where S : StringProtocol

Creates a preview representation. - Parameters: - title: A title to show in a preview. - icon: An icon to show in a preview.

init · iOS 16.0+

init

TypeScript
static initImageIcon(titleResource: _Foundation_LocalizedStringResource, image: string, icon: string): SharePreview<string, string>
Swift declaration
@export(implementation) init(_ titleResource: LocalizedStringResource, image: Image, icon: Icon)

Creates a preview representation. - Parameters: - titleResource: A resource for the title to show in a preview. - image: An image to show in a preview. - icon: An icon to show in a preview.

init · iOS 16.0+

init

TypeScript
static initImageIcon22749(titleKey: _SwiftUICore_LocalizedStringKey, image: string, icon: string): SharePreview<string, string>
Swift declaration
init(_ titleKey: LocalizedStringKey, image: Image, icon: Icon)

Creates a preview representation. - Parameters: - titleKey: A key identifying a title to show in a preview. - image: An image to show in a preview. - icon: An icon to show in a preview.

init · iOS 16.0+

init

TypeScript
static initImageIcon30662(title: _SwiftUICore_Text, image: string, icon: string): SharePreview<string, string>
Swift declaration
init(_ title: Text, image: Image, icon: Icon)

Creates a preview representation. - Parameters: - title: A title to show in a preview. - image: An image to show in a preview. - icon: An icon to show in a preview.

init · iOS 16.0+

init

TypeScript
static initImageIcon4671(title: string, image: string, icon: string): SharePreview<string, string>
Swift declaration
init<S>(_ title: S, image: Image, icon: Icon) where S : StringProtocol

Creates a preview representation. - Parameters: - title: A title to show in a preview. - image: An image to show in a preview. - icon: An icon to show in a preview.

method · iOS 16.0+

invalidateTimelineContent

TypeScript
invalidateTimelineContent(): void
Swift declaration
func invalidateTimelineContent()

Resets any pre-rendered views the system has from the timeline. When entering Always On Display, the system might pre-render frames. If the content of these frames must change in a way that isn't reflected by the schedule or the timeline view's current bindings --- for example, because the user changes the title of a future calendar event --- call this method to request that the frames be regenerated.

get · iOS 15.0+

date

TypeScript
get date(): globalThis.Date
Swift declaration
let date: Date

The date from the schedule that triggered the current view update. The first time a ``TimelineView`` closure receives this date, it might be in the past. For example, if you create an ``TimelineSchedule/everyMinute`` schedule at `10:09:55`, the schedule creates entries `10:09:00`, `10:10:00`, `10:11:00`, and so on. In response, the timeline view performs an initial update immediately, at `10:09:55`, but the context contains the `10:09:00` date entry. Subsequent entries arrive at their corresponding times.

get · iOS 15.0+

cadence

TypeScript
get cadence(): TimelineView_Context_Cadence<SDKHandle, unknown>
Swift declaration
let cadence: TimelineView<Schedule, Content>.Context.Cadence

The rate at which the timeline updates the view. Use this value to hide information that updates faster than the view's current update rate. For example, you could hide the millisecond component of a digital timer when the cadence is anything slower than ``Cadence-swift.enum/live``. Because the ``Cadence-swift.enum`` enumeration conforms to the <doc://com.apple.documentation/documentation/Swift/Comparable> protocol, you can compare cadences with relational operators. Slower cadences have higher values, so you could perform the check described above with the following comparison: let hideMilliseconds = cadence > .live

get · iOS 13.0+

content

TypeScript
get content(): SDKHandle
Swift declaration
var content: Content
set · iOS 13.0+

content

TypeScript
set content(value: SDKHandle)
Swift declaration
var content: Content
get · iOS 16.0+

uiImage

TypeScript
get uiImage(): Promise<(_UIKit_UIImage) | null>
Swift declaration
@MainActor final var uiImage: UIImage? { get }

The current contents of the view, rasterized as a UIKit image. The renderer notifies its `objectWillChange` publisher when the contents of the image may have changed.

get · iOS 18.0+

containerValues

TypeScript
get containerValues(): _SwiftUICore_ContainerValues
Swift declaration
var containerValues: ContainerValues { get }

The container values associated with the given subview.

static · iOS 27.0+

processingTask

TypeScript
static processingTask(identifier: string): BackgroundTask<void, void>
Swift declaration
static func processingTask(_ identifier: String) -> BackgroundTask<Void, Void>

A task that processes tasks in the background.

static · iOS 16.0+

appRefresh

TypeScript
static appRefresh(identifier: string): BackgroundTask<void, void>
Swift declaration
static func appRefresh(_ identifier: String) -> BackgroundTask<Void, Void>

A task that updates your app’s state in the background for a matching identifier. - Parameter identifier: The identifier to match. - Returns: A background task that you can handle with your app or extension.

get · iOS 16.0+

urlSession

TypeScript
static get urlSession(): BackgroundTask<string, void>
Swift declaration
static var urlSession: BackgroundTask<String, Void> { get }

A task that responds to background URL sessions.

static · iOS 16.0+

urlSession

TypeScript
static urlSession88335(identifier: string): BackgroundTask<void, void>
Swift declaration
static func urlSession(_ identifier: String) -> BackgroundTask<Void, Void>

A task that responds to background URL sessions matching the given identifier. - Parameter identifier: The identifier to match. - Returns: A background task that you can handle with your app or extension.

get · iOS 15.0+

sortDescriptors

TypeScript
get sortDescriptors(): Promise<Array<_Foundation_SortDescriptor<_CoreData_NSManagedObject>>>
Swift declaration
@MainActor @preconcurrency var sortDescriptors: [SortDescriptor<Result>] { get nonmutating set }

The request's sort descriptors, accessed as value types. Set this value to cause the associated ``FetchRequest`` to execute a fetch with a new collection of <doc://com.apple.documentation/documentation/Foundation/SortDescriptor> instances. The order of entities stored in the results collection may change as a result. If you want to use <doc://com.apple.documentation/documentation/Foundation/NSSortDescriptor> instances, set ``FetchedResults/nsSortDescriptors`` instead.

set · iOS 15.0+

sortDescriptors

TypeScript
setSortDescriptors(value: Array<_Foundation_SortDescriptor<_CoreData_NSManagedObject>>): Promise<void>
Swift declaration
@MainActor @preconcurrency var sortDescriptors: [SortDescriptor<Result>] { get nonmutating set }

The request's sort descriptors, accessed as value types. Set this value to cause the associated ``FetchRequest`` to execute a fetch with a new collection of <doc://com.apple.documentation/documentation/Foundation/SortDescriptor> instances. The order of entities stored in the results collection may change as a result. If you want to use <doc://com.apple.documentation/documentation/Foundation/NSSortDescriptor> instances, set ``FetchedResults/nsSortDescriptors`` instead.

get · iOS 14.0+

wrappedValue

TypeScript
get wrappedValue(): (unknown) | null
Swift declaration
var wrappedValue: Value? { get nonmutating set }

The unwrapped value for the focus key given the current scope and state of the focused view hierarchy.

set · iOS 14.0+

wrappedValue

TypeScript
set wrappedValue(value: (unknown) | null)
Swift declaration
var wrappedValue: Value? { get nonmutating set }

The unwrapped value for the focus key given the current scope and state of the focused view hierarchy.

get · iOS 14.0+

projectedValue

TypeScript
get projectedValue(): _SwiftUICore_Binding<(unknown) | null>
Swift declaration
var projectedValue: Binding<Value?> { get }

A binding to the optional value. The unwrapped value is `nil` when no focused view hierarchy has published a corresponding binding.

init · iOS 14.0+

init

TypeScript
static init(keyPath: SDKHandle): FocusedBinding<unknown>
Swift declaration
init(_ keyPath: KeyPath<FocusedValues, Binding<Value>?>)

A new property wrapper for the given key path. The value of the property wrapper is updated dynamically as focus changes and different published bindings go in and out of scope. - Parameter keyPath: The key path for the focus value to read.

init · iOS 16.0+

init

TypeScript
static init(configuration: LabeledContentStyleConfiguration): LabeledContent<LabeledContentStyleConfiguration_Label, LabeledContentStyleConfiguration_Content>
Swift declaration
init(_ configuration: LabeledContentStyleConfiguration)

Creates labeled content based on a labeled content style configuration. You can use this initializer within the ``LabeledContentStyle/makeBody(configuration:)`` method of a ``LabeledContentStyle`` to create a labeled content instance. This is useful for custom styles that only modify the current style, as opposed to implementing a brand new style. For example, the following style adds a red border around the labeled content, but otherwise preserves the current style: struct RedBorderLabeledContentStyle: LabeledContentStyle { func makeBody(configuration: Configuration) -> some View { LabeledContent(configuration) .border(.red) } } - Parameter configuration: The properties of the labeled content

init · iOS 26.0+

init

TypeScript
static initValue(titleResource: _Foundation_LocalizedStringResource, value: string): LabeledContent<_SwiftUICore_Text, _SwiftUICore_Text>
Swift declaration
init<S>(_ titleResource: LocalizedStringResource, value: S) where S : StringProtocol

Creates a labeled informational view. This initializer creates a ``Text`` label on your behalf. See `Text` for more information about localizing strings. Form { LabeledContent("Name", value: person.name) } In some contexts, this text will be selectable by default. - Parameters: - titleResource: Text resource for the view's localized title, that describes the purpose of the view. - value: The value being labeled.

init · iOS 16.0+

init

TypeScript
static initValue57286(titleKey: _SwiftUICore_LocalizedStringKey, value: string): LabeledContent<_SwiftUICore_Text, _SwiftUICore_Text>
Swift declaration
init<S>(_ titleKey: LocalizedStringKey, value: S) where S : StringProtocol

Creates a labeled informational view. This initializer creates a ``Text`` label on your behalf, and treats the localized key similar to ``Text/init(_:tableName:bundle:comment:)``. See `Text` for more information about localizing strings. Form { LabeledContent("Name", value: person.name) } In some contexts, this text will be selectable by default. - Parameters: - titleKey: The key for the view's localized title, that describes the purpose of the view. - value: The value being labeled.

init · iOS 16.0+

init

TypeScript
static initValue9836(title: string, value: string): LabeledContent<_SwiftUICore_Text, _SwiftUICore_Text>
Swift declaration
init<S1, S2>(_ title: S1, value: S2) where S1 : StringProtocol, S2 : StringProtocol

Creates a labeled informational view. This initializer creates a ``Text`` label on your behalf, and treats the title similar to ``Text/init(_:)``. See `Text` for more information about localizing strings. Form { ForEach(person.pet) { pet in LabeledContent(pet.species, value: pet.name) } } - Parameters: - title: A string that describes the purpose of the view. - value: The value being labeled.

init · iOS 13.0+ · Deprecated in iOS 16.0

init

TypeScript
static initDestinationTagSelection(titleKey: _SwiftUICore_LocalizedStringKey, destination: SDKHandle, tag: number, selection: _SwiftUICore_Binding<(number) | null>): NavigationLink<_SwiftUICore_Text, SDKHandle>
Swift declaration
nonisolated init<V>(_ titleKey: LocalizedStringKey, destination: Destination, tag: V, selection: Binding<V?>) where V : Hashable

Creates a navigation link that presents a destination view when a bound selection variable matches a value you provide, using a text label that the link generates from a localized string key. - Parameters: - titleKey: A localized string key for creating a text label. - destination: A view for the navigation link to present. - tag: The value of `selection` that causes the link to present `destination`. - selection: A bound variable that causes the link to present `destination` when `selection` becomes equal to `tag`.

init · iOS 13.0+ · Deprecated in iOS 16.0

init

TypeScript
static initDestinationTagSelection922(title: string, destination: SDKHandle, tag: number, selection: _SwiftUICore_Binding<(number) | null>): NavigationLink<_SwiftUICore_Text, SDKHandle>
Swift declaration
nonisolated init<S, V>(_ title: S, destination: Destination, tag: V, selection: Binding<V?>) where S : StringProtocol, V : Hashable

Creates a navigation link that presents a destination view when a bound selection variable matches a value you provide, using a text label that the link generates from a title string. - Parameters: - title: A string for creating a text label. - destination: A view for the navigation link to present. - tag: The value of `selection` that causes the link to present `destination`. - selection: A bound variable that causes the link to present `destination` when `selection` becomes equal to `tag`.

init · iOS 13.0+ · Deprecated in iOS 16.0

init

TypeScript
static initDestinationIsActive(titleKey: _SwiftUICore_LocalizedStringKey, destination: SDKHandle, isActive: _SwiftUICore_Binding<boolean>): NavigationLink<_SwiftUICore_Text, SDKHandle>
Swift declaration
nonisolated init(_ titleKey: LocalizedStringKey, destination: Destination, isActive: Binding<Bool>)

Creates a navigation link that presents a destination view when active, with a text label that the link generates from a localized string key. - Parameters: - titleKey: A localized string key for creating a text label. - destination: A view for the navigation link to present. - isActive: A binding to a Boolean value that indicates whether `destination` is currently presented.

init · iOS 13.0+ · Deprecated in iOS 16.0

init

TypeScript
static initDestinationIsActive30425(title: string, destination: SDKHandle, isActive: _SwiftUICore_Binding<boolean>): NavigationLink<_SwiftUICore_Text, SDKHandle>
Swift declaration
nonisolated init<S>(_ title: S, destination: Destination, isActive: Binding<Bool>) where S : StringProtocol

Creates a navigation link that presents a destination view when active, with a text label that the link generates from a title string. - Parameters: - title: A string for creating a text label. - destination: A view for the navigation link to present. - isActive: A binding to a Boolean value that indicates whether `destination` is currently presented.

init · iOS 13.0+ · Deprecated in iOS 100000.0

init

TypeScript
static initDestination(titleKey: _SwiftUICore_LocalizedStringKey, destination: SDKHandle): NavigationLink<_SwiftUICore_Text, SDKHandle>
Swift declaration
nonisolated init(_ titleKey: LocalizedStringKey, destination: Destination)

Creates a navigation link that presents a destination view, with a text label that the link generates from a localized string key. - Parameters: - titleKey: A localized string key for creating a text label. - destination: A view for the navigation link to present.

init · iOS 13.0+ · Deprecated in iOS 100000.0

init

TypeScript
static initDestination15650(title: string, destination: SDKHandle): NavigationLink<_SwiftUICore_Text, SDKHandle>
Swift declaration
nonisolated init<S>(_ title: S, destination: Destination) where S : StringProtocol

Creates a navigation link that presents a destination view, with a text label that the link generates from a title string. - Parameters: - title: A string for creating a text label. - destination: A view for the navigation link to present.

init · iOS 16.0+

init

TypeScript
static initValue(titleResource: _Foundation_LocalizedStringResource, value?: (number) | null): NavigationLink<_SwiftUICore_Text, never>
Swift declaration
@export(implementation) nonisolated init<P>(_ titleResource: LocalizedStringResource, value: P?) where Label == Text, P : Hashable

Creates a navigation link that presents the view corresponding to a value, with a text label that the link generates from a localized string resource. When someone activates the navigation link that this initializer creates, SwiftUI looks for a nearby ``View/navigationDestination(for:destination:)`` view modifier with a `data` input parameter that matches the type of this initializer's `value` input, with one of the following outcomes: * If SwiftUI finds a matching modifier within the view hierarchy of an enclosing ``NavigationStack``, it pushes the modifier's corresponding `destination` view onto the stack. * If SwiftUI finds a matching modifier in the view hierarchy of a stack that's in a later column of a ``NavigationSplitView``, it puts the modifier's destination view as the first and only item onto the stack while preserving the stack's root view. * If there's no matching modifier, but the link appears in a ``List`` with selection inside a leading column of a navigation split view, the link updates the selection, which might affect the appearance of a trailing view. For an example of this, see ``NavigationLink``. * In other cases, the link doesn't do anything. If you want to be able to serialize a ``NavigationPath`` that includes this link, use a `value` that conforms to the <doc://com.apple.documentation/documentation/Swift/Codable> protocol. - Parameters: - titleResource: A localized string that describes the view that this link presents. - value: An optional value to present. When the user selects the link, SwiftUI stores a copy of the value. Pass a `nil` value to disable the link.

init · iOS 16.0+

init

TypeScript
static initValue73146(titleResource: _Foundation_LocalizedStringResource, value?: (number) | null): NavigationLink<_SwiftUICore_Text, never>
Swift declaration
@export(implementation) nonisolated init<P>(_ titleResource: LocalizedStringResource, value: P?) where Label == Text, P : Decodable, P : Encodable, P : Hashable

Creates a navigation link that presents the view corresponding to a codable value, with a text label that the link generates from a localized string resource. When someone activates the navigation link that this initializer creates, SwiftUI looks for a nearby ``View/navigationDestination(for:destination:)`` view modifier with a `data` input parameter that matches the type of this initializer's `value` input, with one of the following outcomes: * If SwiftUI finds a matching modifier within the view hierarchy of an enclosing ``NavigationStack``, it pushes the modifier's corresponding `destination` view onto the stack. * If SwiftUI finds a matching modifier in the view hierarchy of a stack that's in a later column of a ``NavigationSplitView``, it puts the modifier's destination view as the first and only item onto the stack while preserving the stack's root view. * If there's no matching modifier, but the link appears in a ``List`` with selection inside a leading column of a navigation split view, the link updates the selection, which might affect the appearance of a trailing view. For an example of this, see ``NavigationLink``. * In other cases, the link doesn't do anything. Because this initializer takes a value that conforms to the <doc://com.apple.documentation/documentation/Swift/Codable> protocol, you ensure that a ``NavigationPath`` that includes this link can produce a non-`nil` value for its ``NavigationPath/codable`` property. This helps to make the path serializable. - Parameters: - titleResource: A localized string that describes the view that this link presents. - value: An optional value to present. When someone taps or clicks the link, SwiftUI stores a copy of the value. Pass a `nil` value to disable the link.

init · iOS 16.0+

init

TypeScript
static initValue96595(titleKey: _SwiftUICore_LocalizedStringKey, value?: (number) | null): NavigationLink<_SwiftUICore_Text, never>
Swift declaration
nonisolated init<P>(_ titleKey: LocalizedStringKey, value: P?) where Label == Text, P : Hashable

Creates a navigation link that presents the view corresponding to a value, with a text label that the link generates from a localized string key. When someone activates the navigation link that this initializer creates, SwiftUI looks for a nearby ``View/navigationDestination(for:destination:)`` view modifier with a `data` input parameter that matches the type of this initializer's `value` input, with one of the following outcomes: * If SwiftUI finds a matching modifier within the view hierarchy of an enclosing ``NavigationStack``, it pushes the modifier's corresponding `destination` view onto the stack. * If SwiftUI finds a matching modifier in the view hierarchy of a stack that's in a later column of a ``NavigationSplitView``, it puts the modifier's destination view as the first and only item onto the stack while preserving the stack's root view. * If there's no matching modifier, but the link appears in a ``List`` with selection inside a leading column of a navigation split view, the link updates the selection, which might affect the appearance of a trailing view. For an example of this, see ``NavigationLink``. * In other cases, the link doesn't do anything. If you want to be able to serialize a ``NavigationPath`` that includes this link, use a `value` that conforms to the <doc://com.apple.documentation/documentation/Swift/Codable> protocol. - Parameters: - titleKey: A localized string that describes the view that this link presents. - value: An optional value to present. When the user selects the link, SwiftUI stores a copy of the value. Pass a `nil` value to disable the link.

init · iOS 16.0+

init

TypeScript
static initValue16899(titleKey: _SwiftUICore_LocalizedStringKey, value?: (number) | null): NavigationLink<_SwiftUICore_Text, never>
Swift declaration
nonisolated init<P>(_ titleKey: LocalizedStringKey, value: P?) where Label == Text, P : Decodable, P : Encodable, P : Hashable

Creates a navigation link that presents the view corresponding to a codable value, with a text label that the link generates from a localized string key. When someone activates the navigation link that this initializer creates, SwiftUI looks for a nearby ``View/navigationDestination(for:destination:)`` view modifier with a `data` input parameter that matches the type of this initializer's `value` input, with one of the following outcomes: * If SwiftUI finds a matching modifier within the view hierarchy of an enclosing ``NavigationStack``, it pushes the modifier's corresponding `destination` view onto the stack. * If SwiftUI finds a matching modifier in the view hierarchy of a stack that's in a later column of a ``NavigationSplitView``, it puts the modifier's destination view as the first and only item onto the stack while preserving the stack's root view. * If there's no matching modifier, but the link appears in a ``List`` with selection inside a leading column of a navigation split view, the link updates the selection, which might affect the appearance of a trailing view. For an example of this, see ``NavigationLink``. * In other cases, the link doesn't do anything. Because this initializer takes a value that conforms to the <doc://com.apple.documentation/documentation/Swift/Codable> protocol, you ensure that a ``NavigationPath`` that includes this link can produce a non-`nil` value for its ``NavigationPath/codable`` property. This helps to make the path serializable. - Parameters: - titleKey: A localized string that describes the view that this link presents. - value: An optional value to present. When someone taps or clicks the link, SwiftUI stores a copy of the value. Pass a `nil` value to disable the link.

init · iOS 16.0+

init

TypeScript
static initValue11019(title: string, value?: (number) | null): NavigationLink<_SwiftUICore_Text, never>
Swift declaration
nonisolated init<S, P>(_ title: S, value: P?) where Label == Text, S : StringProtocol, P : Hashable

Creates a navigation link that presents the view corresponding to a value, with a text label that the link generates from a title string. When someone activates the navigation link that this initializer creates, SwiftUI looks for a nearby ``View/navigationDestination(for:destination:)`` view modifier with a `data` input parameter that matches the type of this initializer's `value` input, with one of the following outcomes: * If SwiftUI finds a matching modifier within the view hierarchy of an enclosing ``NavigationStack``, it pushes the modifier's corresponding `destination` view onto the stack. * If SwiftUI finds a matching modifier in the view hierarchy of a stack that's in a later column of a ``NavigationSplitView``, it puts the modifier's destination view as the first and only item onto the stack while preserving the stack's root view. * If there's no matching modifier, but the link appears in a ``List`` with selection inside a leading column of a navigation split view, the link updates the selection, which might affect the appearance of a trailing view. For an example of this, see ``NavigationLink``. * In other cases, the link doesn't do anything. If you want to be able to serialize a ``NavigationPath`` that includes this link, use a `value` that conforms to the <doc://com.apple.documentation/documentation/Swift/Codable> protocol. - Parameters: - title: A string that describes the view that this link presents. - value: An optional value to present. When the user selects the link, SwiftUI stores a copy of the value. Pass a `nil` value to disable the link.

init · iOS 16.0+

init

TypeScript
static initValue83067(title: string, value?: (number) | null): NavigationLink<_SwiftUICore_Text, never>
Swift declaration
nonisolated init<S, P>(_ title: S, value: P?) where Label == Text, S : StringProtocol, P : Decodable, P : Encodable, P : Hashable

Creates a navigation link that presents the view corresponding to a codable value, with a text label that the link generates from a title string. When someone activates the navigation link that this initializer creates, SwiftUI looks for a nearby ``View/navigationDestination(for:destination:)`` view modifier with a `data` input parameter that matches the type of this initializer's `value` input, with one of the following outcomes: * If SwiftUI finds a matching modifier within the view hierarchy of an enclosing ``NavigationStack``, it pushes the modifier's corresponding `destination` view onto the stack. * If SwiftUI finds a matching modifier in the view hierarchy of a stack that's in a later column of a ``NavigationSplitView``, it puts the modifier's destination view as the first and only item onto the stack while preserving the stack's root view. * If there's no matching modifier, but the link appears in a ``List`` with selection inside a leading column of a navigation split view, the link updates the selection, which might affect the appearance of a trailing view. For an example of this, see ``NavigationLink``. * In other cases, the link doesn't do anything. Because this initializer takes a value that conforms to the <doc://com.apple.documentation/documentation/Swift/Codable> protocol, you ensure that a ``NavigationPath`` that includes this link can produce a non-`nil` value for its ``NavigationPath/codable`` property. This helps to make the path serializable. - Parameters: - title: A string that describes the view that this link presents. - value: An optional value to present. When the user selects the link, SwiftUI stores a copy of the value. Pass a `nil` value to disable the link.

init · iOS 15.0+

init

TypeScript
init(uiSizeCategory: _UIKit_UIContentSizeCategory): (_SwiftUICore_DynamicTypeSize) | null
Swift declaration
init?(_ uiSizeCategory: UIContentSizeCategory)

Create a Dynamic Type size from its `UIContentSizeCategory` equivalent.

init · iOS 14.0+

init

TypeScript
init(uiLayoutDirection: _UIKit_UITraitEnvironmentLayoutDirection): (_SwiftUICore_LayoutDirection) | null
Swift declaration
init?(_ uiLayoutDirection: UITraitEnvironmentLayoutDirection)

Create a direction from its UITraitEnvironmentLayoutDirection equivalent.

method · iOS 15.0+

accessibilityTextContentType

TypeScript
accessibilityTextContentType(textContentType: _SwiftUICore_AccessibilityTextContentType): _SwiftUICore_ModifiedContent<unknown, AccessibilityAttachmentModifier>
Swift declaration
nonisolated func accessibilityTextContentType(_ textContentType: AccessibilityTextContentType) -> ModifiedContent<Content, Modifier>

Sets an accessibility text content type. Use this modifier to set the content type of this accessibility element. Assistive technologies can use this property to choose an appropriate way to output the text. For example, when encountering a source coding context, VoiceOver could choose to speak all punctuation. The default content type ``AccessibilityTextContentType/plain``. - Parameter textContentType: The accessibility content type from the available ``AccessibilityTextContentType`` options.

method · iOS 16.0+

accessibilityCustomContent

TypeScript
accessibilityCustomContentImportance(label: _Foundation_LocalizedStringResource, value: _SwiftUICore_Text, importance?: _Accessibility_AXCustomContent_Importance): _SwiftUICore_ModifiedContent<unknown, AccessibilityAttachmentModifier>
Swift declaration
@export(implementation) nonisolated func accessibilityCustomContent(_ label: LocalizedStringResource, _ value: Text, importance: AXCustomContent.Importance = .default) -> ModifiedContent<Content, Modifier>

Add additional accessibility information to the view. Use this method to add information you want accessibility users to be able to access about this element, beyond the basics of label, value, and hint. For example: `accessibilityCustomContent` can be used to add information about the orientation of a photograph, or the number of people found in the picture. - Parameter label: Localized text describing to the user what is contained in this additional information entry. For example: "orientation". - Parameter value: Text resource for the additional accessibility information. For example: "landscape." - Parameter importance: Importance of the accessibility information. High-importance information gets read out immediately, while default-importance information must be explicitly asked for by the user. - Note: Repeated calls of `accessibilityCustomContent` with different labels will create new entries of additional information. Calling `accessibilityCustomContent` repeatedly with the same label will instead replace the previous value and importance.

method · iOS 16.0+

accessibilityCustomContent

TypeScript
accessibilityCustomContentImportance10348(label: _Foundation_LocalizedStringResource, valueResource: _Foundation_LocalizedStringResource, importance?: _Accessibility_AXCustomContent_Importance): _SwiftUICore_ModifiedContent<unknown, AccessibilityAttachmentModifier>
Swift declaration
@export(implementation) nonisolated func accessibilityCustomContent(_ label: LocalizedStringResource, _ valueResource: LocalizedStringResource, importance: AXCustomContent.Importance = .default) -> ModifiedContent<Content, Modifier>

Add additional accessibility information to the view. Use this method to add information you want accessibility users to be able to access about this element, beyond the basics of label, value, and hint. For example, `accessibilityCustomContent` can be used to add information about the orientation of a photograph, or the number of people found in the picture. - Parameter label: Localized text describing to the user what is contained in this additional information entry. For example: "orientation". - Parameter valueResource: Text resource for the additional accessibility information. For example: "landscape." - Parameter importance: Importance of the accessibility information. High-importance information gets read out immediately, while default-importance information must be explicitly asked for by the user. - Note: Repeated calls of `accessibilityCustomContent` with different labels will create new entries of additional information. Calling `accessibilityCustomContent` repeatedly with the same label will instead replace the previous value and importance.

method · iOS 16.0+

accessibilityCustomContent

TypeScript
accessibilityCustomContentImportance46334(key: _SwiftUICore_AccessibilityCustomContentKey, valueResource: _Foundation_LocalizedStringResource, importance?: _Accessibility_AXCustomContent_Importance): _SwiftUICore_ModifiedContent<unknown, AccessibilityAttachmentModifier>
Swift declaration
@export(implementation) nonisolated func accessibilityCustomContent(_ key: AccessibilityCustomContentKey, _ valueResource: LocalizedStringResource, importance: AXCustomContent.Importance = .default) -> ModifiedContent<Content, Modifier>

Add additional accessibility information to the view. Use this method to add information you want accessibility users to be able to access about this element, beyond the basics of label, value, and hint. For example, `accessibilityCustomContent` can be used to add information about the orientation of a photograph, or the number of people found in the picture. - Parameter key: Key used to specify the identifier and label of the of the additional accessibility information entry. - Parameter valueResource: Text resource for the additional accessibility information. For example: "landscape." A value of `nil` will remove any entry of additional information added earlier for any `key` with the same identifier. - Parameter importance: Importance of the accessibility information. High-importance information gets read out immediately, while default-importance information must be explicitly asked for by the user. - Note: Repeated calls of `accessibilityCustomContent` with `key`s having different identifiers will create new entries of additional information. Calling `accessibilityCustomContent` repeatedly with `key`s having matching identifiers will replace the previous entry.

method · iOS 15.0+

accessibilityCustomContent

TypeScript
accessibilityCustomContentImportance12196(key: _SwiftUICore_AccessibilityCustomContentKey, valueKey: _SwiftUICore_LocalizedStringKey, importance?: _Accessibility_AXCustomContent_Importance): _SwiftUICore_ModifiedContent<unknown, AccessibilityAttachmentModifier>
Swift declaration
nonisolated func accessibilityCustomContent(_ key: AccessibilityCustomContentKey, _ valueKey: LocalizedStringKey, importance: AXCustomContent.Importance = .default) -> ModifiedContent<Content, Modifier>

Add additional accessibility information to the view. Use this method to add information you want accessibility users to be able to access about this element, beyond the basics of label, value, and hint. For example, `accessibilityCustomContent` can be used to add information about the orientation of a photograph, or the number of people found in the picture. - Parameter key: Key used to specify the identifier and label of the of the additional accessibility information entry. - Parameter valueKey: Text value for the additional accessibility information. For example: "landscape." A value of `nil` will remove any entry of additional information added earlier for any `key` with the same identifier. - Parameter importance: Importance of the accessibility information. High-importance information gets read out immediately, while default-importance information must be explicitly asked for by the user. - Note: Repeated calls of `accessibilityCustomContent` with `key`s having different identifiers will create new entries of additional information. Calling `accessibilityCustomContent` repeatedly with `key`s having matching identifiers will replace the previous entry.

method · iOS 15.0+

accessibilityCustomContent

TypeScript
accessibilityCustomContentImportance91880(key: _SwiftUICore_AccessibilityCustomContentKey, value?: (_SwiftUICore_Text) | null, importance?: _Accessibility_AXCustomContent_Importance): _SwiftUICore_ModifiedContent<unknown, AccessibilityAttachmentModifier>
Swift declaration
nonisolated func accessibilityCustomContent(_ key: AccessibilityCustomContentKey, _ value: Text?, importance: AXCustomContent.Importance = .default) -> ModifiedContent<Content, Modifier>

Add additional accessibility information to the view. Use this method to add information you want accessibility users to be able to access about this element, beyond the basics of label, value, and hint. For example, `accessibilityCustomContent` can be used to add information about the orientation of a photograph, or the number of people found in the picture. - Parameter key: Key used to specify the identifier and label of the of the additional accessibility information entry. - Parameter value: Text value for the additional accessibility information. For example: "landscape." A value of `nil` will remove any entry of additional information added earlier for any `key` with the same identifier. - Parameter importance: Importance of the accessibility information. High-importance information gets read out immediately, while default-importance information must be explicitly asked for by the user. - Note: Repeated calls of `accessibilityCustomContent` with `key`s having different identifiers will create new entries of additional information. Calling `accessibilityCustomContent` repeatedly with `key`s having matching identifiers will replace the previous entry.

method · iOS 15.0+

accessibilityCustomContent

TypeScript
accessibilityCustomContentImportance44464(key: _SwiftUICore_AccessibilityCustomContentKey, value: string, importance?: _Accessibility_AXCustomContent_Importance): _SwiftUICore_ModifiedContent<unknown, AccessibilityAttachmentModifier>
Swift declaration
nonisolated func accessibilityCustomContent<V>(_ key: AccessibilityCustomContentKey, _ value: V, importance: AXCustomContent.Importance = .default) -> ModifiedContent<Content, Modifier> where V : StringProtocol

Add additional accessibility information to the view. Use this method to add information you want accessibility users to be able to access about this element, beyond the basics of label, value, and hint. For example, `accessibilityCustomContent` can be used to add information about the orientation of a photograph, or the number of people found in the picture. - Parameter key: Key used to specify the identifier and label of the of the additional accessibility information entry. - Parameter value: Text value for the additional accessibility information. For example: "landscape." A value of `nil` will remove any entry of additional information added earlier for any `key` with the same identifier. - Parameter importance: Importance of the accessibility information. High-importance information gets read out immediately, while default-importance information must be explicitly asked for by the user. - Note: Repeated calls of `accessibilityCustomContent` with `key`s having different identifiers will create new entries of additional information. Calling `accessibilityCustomContent` repeatedly with `key`s having matching identifiers will replace the previous entry.

method · iOS 15.0+

accessibilityCustomContent

TypeScript
accessibilityCustomContentImportance34294(labelKey: _SwiftUICore_LocalizedStringKey, value: _SwiftUICore_Text, importance?: _Accessibility_AXCustomContent_Importance): _SwiftUICore_ModifiedContent<unknown, AccessibilityAttachmentModifier>
Swift declaration
nonisolated func accessibilityCustomContent(_ labelKey: LocalizedStringKey, _ value: Text, importance: AXCustomContent.Importance = .default) -> ModifiedContent<Content, Modifier>

Add additional accessibility information to the view. Use this method to add information you want accessibility users to be able to access about this element, beyond the basics of label, value, and hint. For example: `accessibilityCustomContent` can be used to add information about the orientation of a photograph, or the number of people found in the picture. - Parameter labelKey: Localized text describing to the user what is contained in this additional information entry. For example: "orientation". - Parameter value: Text value for the additional accessibility information. For example: "landscape." - Parameter importance: Importance of the accessibility information. High-importance information gets read out immediately, while default-importance information must be explicitly asked for by the user. - Note: Repeated calls of `accessibilityCustomContent` with different labels will create new entries of additional information. Calling `accessibilityCustomContent` repeatedly with the same label will instead replace the previous value and importance.

method · iOS 15.0+

accessibilityCustomContent

TypeScript
accessibilityCustomContentImportance87932(labelKey: _SwiftUICore_LocalizedStringKey, valueKey: _SwiftUICore_LocalizedStringKey, importance?: _Accessibility_AXCustomContent_Importance): _SwiftUICore_ModifiedContent<unknown, AccessibilityAttachmentModifier>
Swift declaration
nonisolated func accessibilityCustomContent(_ labelKey: LocalizedStringKey, _ valueKey: LocalizedStringKey, importance: AXCustomContent.Importance = .default) -> ModifiedContent<Content, Modifier>

Add additional accessibility information to the view. Use this method to add information you want accessibility users to be able to access about this element, beyond the basics of label, value, and hint. For example, `accessibilityCustomContent` can be used to add information about the orientation of a photograph, or the number of people found in the picture. - Parameter labelKey: Localized text describing to the user what is contained in this additional information entry. For example: "orientation". - Parameter valueKey: Text value for the additional accessibility information. For example: "landscape." - Parameter importance: Importance of the accessibility information. High-importance information gets read out immediately, while default-importance information must be explicitly asked for by the user. - Note: Repeated calls of `accessibilityCustomContent` with different labels will create new entries of additional information. Calling `accessibilityCustomContent` repeatedly with the same label will instead replace the previous value and importance.

method · iOS 15.0+

accessibilityCustomContent

TypeScript
accessibilityCustomContentImportance10724(labelKey: _SwiftUICore_LocalizedStringKey, value: string, importance?: _Accessibility_AXCustomContent_Importance): _SwiftUICore_ModifiedContent<unknown, AccessibilityAttachmentModifier>
Swift declaration
nonisolated func accessibilityCustomContent<V>(_ labelKey: LocalizedStringKey, _ value: V, importance: AXCustomContent.Importance = .default) -> ModifiedContent<Content, Modifier> where V : StringProtocol

Add additional accessibility information to the view. Use this method to add information you want accessibility users to be able to access about this element, beyond the basics of label, value, and hint. For example, `accessibilityCustomContent` can be used to add information about the orientation of a photograph, or the number of people found in the picture. - Parameter labelKey: Localized text describing to the user what is contained in this additional information entry. For example: "orientation". - Parameter value: Text value for the additional accessibility information. For example: "landscape." - Parameter importance: Importance of the accessibility information. High-importance information gets read out immediately, while default-importance information must be explicitly asked for by the user. - Note: Repeated calls of `accessibilityCustomContent` with different labels will create new entries of additional information. Calling `accessibilityCustomContent` repeatedly with the same label will instead replace the previous value and importance.

method · iOS 15.0+

accessibilityCustomContent

TypeScript
accessibilityCustomContentImportance47391(label: _SwiftUICore_Text, value: _SwiftUICore_Text, importance?: _Accessibility_AXCustomContent_Importance): _SwiftUICore_ModifiedContent<unknown, AccessibilityAttachmentModifier>
Swift declaration
nonisolated func accessibilityCustomContent(_ label: Text, _ value: Text, importance: AXCustomContent.Importance = .default) -> ModifiedContent<Content, Modifier>

Add additional accessibility information to the view. Use this method to add information you want accessibility users to be able to access about this element, beyond the basics of label, value, and hint. For example: `accessibilityCustomContent` can be used to add information about the orientation of a photograph, or the number of people found in the picture. - Parameter label: Localized text describing to the user what is contained in this additional information entry. For example: "orientation". - Parameter value: Text value for the additional accessibility information. For example: "landscape." - Parameter importance: Importance of the accessibility information. High-importance information gets read out immediately, while default-importance information must be explicitly asked for by the user. - Note: Repeated calls of `accessibilityCustomContent` with different labels will create new entries of additional information. Calling `accessibilityCustomContent` repeatedly with the same label will instead replace the previous value and importance.

method · iOS 13.0+ · Deprecated in iOS 100000.0

accessibility

TypeScript
accessibilityIdentifier(identifier: string): _SwiftUICore_ModifiedContent<unknown, AccessibilityAttachmentModifier>
Swift declaration
nonisolated func accessibility(identifier: String) -> ModifiedContent<Content, Modifier>

Uses the specified string to identify the view. Use this value for testing. It isn't visible to the user.

method · iOS 13.0+ · Deprecated in iOS 100000.0

accessibility

TypeScript
accessibilityInputLabels(inputLabels: Array<_SwiftUICore_Text>): _SwiftUICore_ModifiedContent<unknown, AccessibilityAttachmentModifier>
Swift declaration
nonisolated func accessibility(inputLabels: [Text]) -> ModifiedContent<Content, Modifier>

Sets alternate input labels with which users identify a view. If you don't specify any input labels, the user can still refer to the view using the accessibility label that you add with the accessibilityLabel() modifier. Provide labels in descending order of importance. Voice Control and Full Keyboard Access use the input labels.

method · iOS 13.0+ · Deprecated in iOS 100000.0

accessibility

TypeScript
accessibilityRemoveTraits(traits: _SwiftUICore_AccessibilityTraits): _SwiftUICore_ModifiedContent<unknown, AccessibilityAttachmentModifier>
Swift declaration
nonisolated func accessibility(removeTraits traits: AccessibilityTraits) -> ModifiedContent<Content, Modifier>

Removes the given traits from this view.

method · iOS 13.0+ · Deprecated in iOS 100000.0

accessibility

TypeScript
accessibilitySortPriority(sortPriority: number): _SwiftUICore_ModifiedContent<unknown, AccessibilityAttachmentModifier>
Swift declaration
nonisolated func accessibility(sortPriority: Double) -> ModifiedContent<Content, Modifier>

Sets the sort priority order for this view's accessibility element, relative to other elements at the same level. Higher numbers are sorted first. The default sort priority is zero.

method · iOS 13.0+ · Deprecated in iOS 100000.0

accessibility

TypeScript
accessibilityActivationPoint(activationPoint: _SwiftUICore_UnitPoint): _SwiftUICore_ModifiedContent<unknown, AccessibilityAttachmentModifier>
Swift declaration
nonisolated func accessibility(activationPoint: UnitPoint) -> ModifiedContent<Content, Modifier>

Specifies the unit point where activations occur in the view.

method · iOS 13.0+ · Deprecated in iOS 100000.0

accessibility

TypeScript
accessibilityActivationPoint50753(activationPoint: { x: number; y: number }): _SwiftUICore_ModifiedContent<unknown, AccessibilityAttachmentModifier>
Swift declaration
nonisolated func accessibility(activationPoint: CGPoint) -> ModifiedContent<Content, Modifier>

Specifies the point where activations occur in the view.

method · iOS 13.0+ · Deprecated

accessibility

TypeScript
accessibilitySelectionIdentifier(selectionIdentifier: unknown): _SwiftUICore_ModifiedContent<unknown, AccessibilityAttachmentModifier>
Swift declaration
nonisolated func accessibility(selectionIdentifier: AnyHashable) -> ModifiedContent<Content, Modifier>
method · iOS 13.0+ · Deprecated in iOS 100000.0

accessibility

TypeScript
accessibilityHint(hint: _SwiftUICore_Text): _SwiftUICore_ModifiedContent<unknown, AccessibilityAttachmentModifier>
Swift declaration
nonisolated func accessibility(hint: Text) -> ModifiedContent<Content, Modifier>

Communicates to the user what happens after performing the view's action. Provide a hint in the form of a brief phrase, like "Purchases the item" or "Downloads the attachment".

method · iOS 13.0+ · Deprecated in iOS 100000.0

accessibility

TypeScript
accessibilityLabel(label: _SwiftUICore_Text): _SwiftUICore_ModifiedContent<unknown, AccessibilityAttachmentModifier>
Swift declaration
nonisolated func accessibility(label: Text) -> ModifiedContent<Content, Modifier>

Adds a label to the view that describes its contents. Use this method to provide an accessibility label for a view that doesn't display text, like an icon. For example, you could use this method to label a button that plays music with the text "Play". Don't include text in the label that repeats information that users already have. For example, don't use the label "Play button" because a button already has a trait that identifies it as a button.

method · iOS 13.0+ · Deprecated in iOS 100000.0

accessibility

TypeScript
accessibilityValue(value: _SwiftUICore_Text): _SwiftUICore_ModifiedContent<unknown, AccessibilityAttachmentModifier>
Swift declaration
nonisolated func accessibility(value: Text) -> ModifiedContent<Content, Modifier>

Adds a textual description of the value that the view contains. Use this method to describe the value represented by a view, but only if that's different than the view's label. For example, for a slider that you label as "Volume" using accessibility(label:), you can provide the current volume setting, like "60%", using accessibility(value:).

method · iOS 13.0+ · Deprecated in iOS 100000.0

accessibility

TypeScript
accessibilityHidden(hidden: boolean): _SwiftUICore_ModifiedContent<unknown, AccessibilityAttachmentModifier>
Swift declaration
nonisolated func accessibility(hidden: Bool) -> ModifiedContent<Content, Modifier>

Specifies whether to hide this view from system accessibility features.

method · iOS 13.0+ · Deprecated in iOS 100000.0

accessibility

TypeScript
accessibilityAddTraits(traits: _SwiftUICore_AccessibilityTraits): _SwiftUICore_ModifiedContent<unknown, AccessibilityAttachmentModifier>
Swift declaration
nonisolated func accessibility(addTraits traits: AccessibilityTraits) -> ModifiedContent<Content, Modifier>

Adds the given traits to the view.

method · iOS 18.0+

accessibilityHint

TypeScript
accessibilityHintIsEnabled(hint: _Foundation_LocalizedStringResource, isEnabled: boolean): _SwiftUICore_ModifiedContent<unknown, AccessibilityAttachmentModifier>
Swift declaration
@export(implementation) nonisolated func accessibilityHint(_ hint: LocalizedStringResource, isEnabled: Bool) -> ModifiedContent<Content, Modifier>

Communicates to the user what happens after performing the view's action. Provide a hint in the form of a brief phrase, like "Purchases the item" or "Downloads the attachment". - Parameters: - hint: The accessibility hint to apply. - isEnabled: If true the accessibility hint is applied; otherwise the accessibility hint is unchanged.

method · iOS 18.0+

accessibilityHint

TypeScript
accessibilityHintIsEnabled33751(hintKey: _SwiftUICore_LocalizedStringKey, isEnabled: boolean): _SwiftUICore_ModifiedContent<unknown, AccessibilityAttachmentModifier>
Swift declaration
nonisolated func accessibilityHint(_ hintKey: LocalizedStringKey, isEnabled: Bool) -> ModifiedContent<Content, Modifier>

Communicates to the user what happens after performing the view's action. Provide a hint in the form of a brief phrase, like "Purchases the item" or "Downloads the attachment". - Parameters: - hintKey: The accessibility hint to apply. - isEnabled: If true the accessibility hint is applied; otherwise the accessibility hint is unchanged.

method · iOS 18.0+

accessibilityHint

TypeScript
accessibilityHintIsEnabled90268(hint: _SwiftUICore_Text, isEnabled: boolean): _SwiftUICore_ModifiedContent<unknown, AccessibilityAttachmentModifier>
Swift declaration
nonisolated func accessibilityHint(_ hint: Text, isEnabled: Bool) -> ModifiedContent<Content, Modifier>

Communicates to the user what happens after performing the view's action. Provide a hint in the form of a brief phrase, like "Purchases the item" or "Downloads the attachment". > Note: On macOS, if the view does not have an action and it has been made into a container with ``accessibilityElement(children: .contain)``, this will be used to describe the container. For example, if the container is for a graph, the hint could be "graph". - Parameters: - hint: The accessibility hint to apply. - isEnabled: If true the accessibility hint is applied; otherwise the accessibility hint is unchanged.

method · iOS 18.0+

accessibilityHint

TypeScript
accessibilityHintIsEnabled7070(hint: string, isEnabled: boolean): _SwiftUICore_ModifiedContent<unknown, AccessibilityAttachmentModifier>
Swift declaration
nonisolated func accessibilityHint<S>(_ hint: S, isEnabled: Bool) -> ModifiedContent<Content, Modifier> where S : StringProtocol

Communicates to the user what happens after performing the view's action. Provide a hint in the form of a brief phrase, like "Purchases the item" or "Downloads the attachment". - Parameters: - hint: The accessibility hint to apply. - isEnabled: If true the accessibility hint is applied; otherwise the accessibility hint is unchanged.

method · iOS 16.0+

accessibilityHint

TypeScript
accessibilityHint6706(hint: _Foundation_LocalizedStringResource): _SwiftUICore_ModifiedContent<unknown, AccessibilityAttachmentModifier>
Swift declaration
@export(implementation) nonisolated func accessibilityHint(_ hint: LocalizedStringResource) -> ModifiedContent<Content, Modifier>

Communicates to the user what happens after performing the view's action. Provide a hint in the form of a brief phrase, like "Purchases the item" or "Downloads the attachment".

method · iOS 14.0+

accessibilityHint

TypeScript
accessibilityHint79825(hintKey: _SwiftUICore_LocalizedStringKey): _SwiftUICore_ModifiedContent<unknown, AccessibilityAttachmentModifier>
Swift declaration
nonisolated func accessibilityHint(_ hintKey: LocalizedStringKey) -> ModifiedContent<Content, Modifier>

Communicates to the user what happens after performing the view's action. Provide a hint in the form of a brief phrase, like "Purchases the item" or "Downloads the attachment".

method · iOS 14.0+

accessibilityHint

TypeScript
accessibilityHint49722(hint: _SwiftUICore_Text): _SwiftUICore_ModifiedContent<unknown, AccessibilityAttachmentModifier>
Swift declaration
nonisolated func accessibilityHint(_ hint: Text) -> ModifiedContent<Content, Modifier>

Communicates to the user what happens after performing the view's action. Provide a hint in the form of a brief phrase, like "Purchases the item" or "Downloads the attachment". > Note: On macOS, if the view does not have an action and it has been made into a container with ``accessibilityElement(children: .contain)``, this will be used to describe the container. For example, if the container is for a graph, the hint could be "graph".

method · iOS 14.0+

accessibilityHint

TypeScript
accessibilityHint1752(hint: string): _SwiftUICore_ModifiedContent<unknown, AccessibilityAttachmentModifier>
Swift declaration
nonisolated func accessibilityHint<S>(_ hint: S) -> ModifiedContent<Content, Modifier> where S : StringProtocol

Communicates to the user what happens after performing the view's action. Provide a hint in the form of a brief phrase, like "Purchases the item" or "Downloads the attachment".

method · iOS 18.0+

accessibilityLabel

TypeScript
accessibilityLabelIsEnabled(label: _Foundation_LocalizedStringResource, isEnabled: boolean): _SwiftUICore_ModifiedContent<unknown, AccessibilityAttachmentModifier>
Swift declaration
@export(implementation) nonisolated func accessibilityLabel(_ label: LocalizedStringResource, isEnabled: Bool) -> ModifiedContent<Content, Modifier>

Adds a label to the view that describes its contents. Use this method to provide an accessibility label for a view that doesn't display text, like an icon. For example, you could use this method to label a button that plays music with the text "Play". Don't include text in the label that repeats information that users already have. For example, don't use the label "Play button" because a button already has a trait that identifies it as a button. - Parameters: - label: The accessibility label to apply. - isEnabled: If true the accessibility label is applied; otherwise the accessibility label is unchanged.

method · iOS 18.0+

accessibilityLabel

TypeScript
accessibilityLabelIsEnabled24399(labelKey: _SwiftUICore_LocalizedStringKey, isEnabled: boolean): _SwiftUICore_ModifiedContent<unknown, AccessibilityAttachmentModifier>
Swift declaration
nonisolated func accessibilityLabel(_ labelKey: LocalizedStringKey, isEnabled: Bool) -> ModifiedContent<Content, Modifier>

Adds a label to the view that describes its contents. Use this method to provide an accessibility label for a view that doesn't display text, like an icon. For example, you could use this method to label a button that plays music with the text "Play". Don't include text in the label that repeats information that users already have. For example, don't use the label "Play button" because a button already has a trait that identifies it as a button. - Parameters: - labelKey: The accessibility label to apply. - isEnabled: If true the accessibility label is applied; otherwise the accessibility label is unchanged.

method · iOS 18.0+

accessibilityLabel

TypeScript
accessibilityLabelIsEnabled83668(label: _SwiftUICore_Text, isEnabled: boolean): _SwiftUICore_ModifiedContent<unknown, AccessibilityAttachmentModifier>
Swift declaration
nonisolated func accessibilityLabel(_ label: Text, isEnabled: Bool) -> ModifiedContent<Content, Modifier>

Adds a label to the view that describes its contents. Use this method to provide an accessibility label for a view that doesn't display text, like an icon. For example, you could use this method to label a button that plays music with the text "Play". Don't include text in the label that repeats information that users already have. For example, don't use the label "Play button" because a button already has a trait that identifies it as a button. - Parameters: - label: The accessibility label to apply. - isEnabled: If true the accessibility label is applied; otherwise the accessibility label is unchanged.

method · iOS 18.0+

accessibilityLabel

TypeScript
accessibilityLabelIsEnabled59766(label: string, isEnabled: boolean): _SwiftUICore_ModifiedContent<unknown, AccessibilityAttachmentModifier>
Swift declaration
nonisolated func accessibilityLabel<S>(_ label: S, isEnabled: Bool) -> ModifiedContent<Content, Modifier> where S : StringProtocol

Adds a label to the view that describes its contents. Use this method to provide an accessibility label for a view that doesn't display text, like an icon. For example, you could use this method to label a button that plays music with the text "Play". Don't include text in the label that repeats information that users already have. For example, don't use the label "Play button" because a button already has a trait that identifies it as a button. - Parameters: - label: The accessibility label to apply. - isEnabled: If true the accessibility label is applied; otherwise the accessibility label is unchanged.

method · iOS 16.0+

accessibilityLabel

TypeScript
accessibilityLabel51354(label: _Foundation_LocalizedStringResource): _SwiftUICore_ModifiedContent<unknown, AccessibilityAttachmentModifier>
Swift declaration
@export(implementation) nonisolated func accessibilityLabel(_ label: LocalizedStringResource) -> ModifiedContent<Content, Modifier>

Adds a label to the view that describes its contents. Use this method to provide an accessibility label for a view that doesn't display text, like an icon. For example, you could use this method to label a button that plays music with the text "Play". Don't include text in the label that repeats information that users already have. For example, don't use the label "Play button" because a button already has a trait that identifies it as a button.

method · iOS 14.0+

accessibilityLabel

TypeScript
accessibilityLabel23513(labelKey: _SwiftUICore_LocalizedStringKey): _SwiftUICore_ModifiedContent<unknown, AccessibilityAttachmentModifier>
Swift declaration
nonisolated func accessibilityLabel(_ labelKey: LocalizedStringKey) -> ModifiedContent<Content, Modifier>

Adds a label to the view that describes its contents. Use this method to provide an accessibility label for a view that doesn't display text, like an icon. For example, you could use this method to label a button that plays music with the text "Play". Don't include text in the label that repeats information that users already have. For example, don't use the label "Play button" because a button already has a trait that identifies it as a button.

method · iOS 14.0+

accessibilityLabel

TypeScript
accessibilityLabel76226(label: _SwiftUICore_Text): _SwiftUICore_ModifiedContent<unknown, AccessibilityAttachmentModifier>
Swift declaration
nonisolated func accessibilityLabel(_ label: Text) -> ModifiedContent<Content, Modifier>

Adds a label to the view that describes its contents. Use this method to provide an accessibility label for a view that doesn't display text, like an icon. For example, you could use this method to label a button that plays music with the text "Play". Don't include text in the label that repeats information that users already have. For example, don't use the label "Play button" because a button already has a trait that identifies it as a button.

method · iOS 14.0+

accessibilityLabel

TypeScript
accessibilityLabel39648(label: string): _SwiftUICore_ModifiedContent<unknown, AccessibilityAttachmentModifier>
Swift declaration
nonisolated func accessibilityLabel<S>(_ label: S) -> ModifiedContent<Content, Modifier> where S : StringProtocol

Adds a label to the view that describes its contents. Use this method to provide an accessibility label for a view that doesn't display text, like an icon. For example, you could use this method to label a button that plays music with the text "Play". Don't include text in the label that repeats information that users already have. For example, don't use the label "Play button" because a button already has a trait that identifies it as a button.

method · iOS 18.0+

accessibilityValue

TypeScript
accessibilityValueIsEnabled(valueResource: _Foundation_LocalizedStringResource, isEnabled: boolean): _SwiftUICore_ModifiedContent<unknown, AccessibilityAttachmentModifier>
Swift declaration
@export(implementation) nonisolated func accessibilityValue(_ valueResource: LocalizedStringResource, isEnabled: Bool) -> ModifiedContent<Content, Modifier>

Adds a textual description of the value that the view contains. Use this method to describe the value represented by a view, but only if that's different than the view's label. For example, for a slider that you label as "Volume" using accessibilityLabel(), you can provide the current volume setting, like "60%", using accessibilityValue(). - Parameters: - valueResource: The accessibility value to apply. - isEnabled: If true the accessibility value is applied; otherwise the accessibility value is unchanged.

method · iOS 18.0+

accessibilityValue

TypeScript
accessibilityValueIsEnabled11436(valueKey: _SwiftUICore_LocalizedStringKey, isEnabled: boolean): _SwiftUICore_ModifiedContent<unknown, AccessibilityAttachmentModifier>
Swift declaration
nonisolated func accessibilityValue(_ valueKey: LocalizedStringKey, isEnabled: Bool) -> ModifiedContent<Content, Modifier>

Adds a textual description of the value that the view contains. Use this method to describe the value represented by a view, but only if that's different than the view's label. For example, for a slider that you label as "Volume" using accessibilityLabel(), you can provide the current volume setting, like "60%", using accessibilityValue(). - Parameters: - valueKey: The accessibility value to apply. - isEnabled: If true the accessibility value is applied; otherwise the accessibility value is unchanged.

method · iOS 18.0+

accessibilityValue

TypeScript
accessibilityValueIsEnabled88301(valueDescription: _SwiftUICore_Text, isEnabled: boolean): _SwiftUICore_ModifiedContent<unknown, AccessibilityAttachmentModifier>
Swift declaration
nonisolated func accessibilityValue(_ valueDescription: Text, isEnabled: Bool) -> ModifiedContent<Content, Modifier>

Adds a textual description of the value that the view contains. Use this method to describe the value represented by a view, but only if that's different than the view's label. For example, for a slider that you label as "Volume" using accessibilityLabel(), you can provide the current volume setting, like "60%", using accessibilityValue(). - Parameters: - valueDescription: The accessibility value to apply. - isEnabled: If true the accessibility value is applied; otherwise the accessibility value is unchanged.

method · iOS 18.0+

accessibilityValue

TypeScript
accessibilityValueIsEnabled67781(value: string, isEnabled: boolean): _SwiftUICore_ModifiedContent<unknown, AccessibilityAttachmentModifier>
Swift declaration
nonisolated func accessibilityValue<S>(_ value: S, isEnabled: Bool) -> ModifiedContent<Content, Modifier> where S : StringProtocol

Adds a textual description of the value that the view contains. Use this method to describe the value represented by a view, but only if that's different than the view's label. For example, for a slider that you label as "Volume" using accessibilityLabel(), you can provide the current volume setting, like "60%", using accessibilityValue(). - Parameters: - value: The accessibility value to apply. When the value is `nil`, the view will not provide any accessibility value. - isEnabled: If true the accessibility value is applied; otherwise the accessibility value is unchanged.

method · iOS 16.0+

accessibilityValue

TypeScript
accessibilityValue82539(valueResource: _Foundation_LocalizedStringResource): _SwiftUICore_ModifiedContent<unknown, AccessibilityAttachmentModifier>
Swift declaration
@export(implementation) nonisolated func accessibilityValue(_ valueResource: LocalizedStringResource) -> ModifiedContent<Content, Modifier>

Adds a textual description of the value that the view contains. Use this method to describe the value represented by a view, but only if that's different than the view's label. For example, for a slider that you label as "Volume" using accessibilityLabel(), you can provide the current volume setting, like "60%", using accessibilityValue().

method · iOS 14.0+

accessibilityValue

TypeScript
accessibilityValue26398(valueKey: _SwiftUICore_LocalizedStringKey): _SwiftUICore_ModifiedContent<unknown, AccessibilityAttachmentModifier>
Swift declaration
nonisolated func accessibilityValue(_ valueKey: LocalizedStringKey) -> ModifiedContent<Content, Modifier>

Adds a textual description of the value that the view contains. Use this method to describe the value represented by a view, but only if that's different than the view's label. For example, for a slider that you label as "Volume" using accessibilityLabel(), you can provide the current volume setting, like "60%", using accessibilityValue().

method · iOS 14.0+

accessibilityValue

TypeScript
accessibilityValue78983(valueDescription: _SwiftUICore_Text): _SwiftUICore_ModifiedContent<unknown, AccessibilityAttachmentModifier>
Swift declaration
nonisolated func accessibilityValue(_ valueDescription: Text) -> ModifiedContent<Content, Modifier>

Adds a textual description of the value that the view contains. Use this method to describe the value represented by a view, but only if that's different than the view's label. For example, for a slider that you label as "Volume" using accessibilityLabel(), you can provide the current volume setting, like "60%", using accessibilityValue().

method · iOS 14.0+

accessibilityValue

TypeScript
accessibilityValue55499(value: string): _SwiftUICore_ModifiedContent<unknown, AccessibilityAttachmentModifier>
Swift declaration
nonisolated func accessibilityValue<S>(_ value: S) -> ModifiedContent<Content, Modifier> where S : StringProtocol

Adds a textual description of the value that the view contains. Use this method to describe the value represented by a view, but only if that's different than the view's label. For example, for a slider that you label as "Volume" using accessibilityLabel(), you can provide the current volume setting, like "60%", using accessibilityValue().

method · iOS 16.0+

accessibilityAction

TypeScript
accessibilityActionNamed(nameResource: _Foundation_LocalizedStringResource, handler: (() => void)): _SwiftUICore_ModifiedContent<unknown, AccessibilityAttachmentModifier>
Swift declaration
@export(implementation) nonisolated func accessibilityAction(named nameResource: LocalizedStringResource, _ handler: @escaping () -> Void) -> ModifiedContent<Content, Modifier>

Adds an accessibility action to the view. Actions allow assistive technologies, such as the VoiceOver, to interact with the view by invoking the action. For example, this is how a custom action to compose a new email could be added to a view. var body: some View { ContentView() .accessibilityAction(named: "New Message") { // Handle action } }

method · iOS 14.0+

accessibilityAction

TypeScript
accessibilityActionNamed23798(nameKey: _SwiftUICore_LocalizedStringKey, handler: (() => void)): _SwiftUICore_ModifiedContent<unknown, AccessibilityAttachmentModifier>
Swift declaration
nonisolated func accessibilityAction(named nameKey: LocalizedStringKey, _ handler: @escaping () -> Void) -> ModifiedContent<Content, Modifier>

Adds an accessibility action to the view. Actions allow assistive technologies, such as the VoiceOver, to interact with the view by invoking the action. For example, this is how a custom action to compose a new email could be added to a view. var body: some View { ContentView() .accessibilityAction(named: "New Message") { // Handle action } }

method · iOS 13.0+

accessibilityAction

TypeScript
accessibilityActionNamed39113(name: _SwiftUICore_Text, handler: (() => void)): _SwiftUICore_ModifiedContent<unknown, AccessibilityAttachmentModifier>
Swift declaration
nonisolated func accessibilityAction(named name: Text, _ handler: @escaping () -> Void) -> ModifiedContent<Content, Modifier>

Adds an accessibility action to the view. Actions allow assistive technologies, such as the VoiceOver, to interact with the view by invoking the action. For example, this is how a custom action to compose a new email could be added to a view. var body: some View { ContentView() .accessibilityAction(named: Text("New Message")) { // Handle action } }

method · iOS 14.0+

accessibilityAction

TypeScript
accessibilityActionNamed2533(name: string, handler: (() => void)): _SwiftUICore_ModifiedContent<unknown, AccessibilityAttachmentModifier>
Swift declaration
nonisolated func accessibilityAction<S>(named name: S, _ handler: @escaping () -> Void) -> ModifiedContent<Content, Modifier> where S : StringProtocol

Adds an accessibility action to the view. Actions allow assistive technologies, such as the VoiceOver, to interact with the view by invoking the action. For example, this is how a custom action to compose a new email could be added to a view. var body: some View { ContentView() .accessibilityAction(named: "New Message") { // Handle action } }

method · iOS 13.0+

accessibilityAction

TypeScript
accessibilityAction(actionKind: _SwiftUICore_AccessibilityActionKind, handler: (() => void)): _SwiftUICore_ModifiedContent<unknown, AccessibilityAttachmentModifier>
Swift declaration
nonisolated func accessibilityAction(_ actionKind: AccessibilityActionKind = .default, _ handler: @escaping () -> Void) -> ModifiedContent<Content, Modifier>

Adds an accessibility action to the view. Actions allow assistive technologies, such as the VoiceOver, to interact with the view by invoking the action. For example, this is how a `.default` action to compose a new email could be added to a view. var body: some View { ContentView() .accessibilityAction { // Handle action } }

method · iOS 18.0+

accessibilityHidden

TypeScript
accessibilityHiddenIsEnabled(hidden: boolean, isEnabled: boolean): _SwiftUICore_ModifiedContent<unknown, AccessibilityAttachmentModifier>
Swift declaration
nonisolated func accessibilityHidden(_ hidden: Bool, isEnabled: Bool) -> ModifiedContent<Content, Modifier>

Specifies whether to hide this view from system accessibility features. - Parameters: - hidden: Whether to hide this view from accessibility features. - isEnabled: If true the accessibility hidden state is applied; otherwise the accessibility hidden state is unchanged.

method · iOS 14.0+

accessibilityHidden

TypeScript
accessibilityHidden39175(hidden: boolean): _SwiftUICore_ModifiedContent<unknown, AccessibilityAttachmentModifier>
Swift declaration
nonisolated func accessibilityHidden(_ hidden: Bool) -> ModifiedContent<Content, Modifier>

Specifies whether to hide this view from system accessibility features.

method · iOS 15.0+

accessibilityHeading

TypeScript
accessibilityHeading(level: _SwiftUICore_AccessibilityHeadingLevel): _SwiftUICore_ModifiedContent<unknown, AccessibilityAttachmentModifier>
Swift declaration
nonisolated func accessibilityHeading(_ level: AccessibilityHeadingLevel) -> ModifiedContent<Content, Modifier>

Set the level of this heading. Use this modifier to set the level of this heading in relation to other headings. The system speaks the level number of levels ``AccessibilityHeadingLevel/h1`` through ``AccessibilityHeadingLevel/h6`` alongside the text. The default heading level if you don’t use this modifier is ``AccessibilityHeadingLevel/unspecified``. - Parameter level: The heading level to associate with this element from the available ``AccessibilityHeadingLevel`` levels.

method · iOS 14.0+

accessibilityAddTraits

TypeScript
accessibilityAddTraits763(traits: _SwiftUICore_AccessibilityTraits): _SwiftUICore_ModifiedContent<unknown, AccessibilityAttachmentModifier>
Swift declaration
nonisolated func accessibilityAddTraits(_ traits: AccessibilityTraits) -> ModifiedContent<Content, Modifier>

Adds the given traits to the view.

method · iOS 18.0+

accessibilityDragPoint

TypeScript
accessibilityDragPointDescriptionIsEnabled(point: _SwiftUICore_UnitPoint, description: _Foundation_LocalizedStringResource, isEnabled: boolean): _SwiftUICore_ModifiedContent<unknown, AccessibilityAttachmentModifier>
Swift declaration
@export(implementation) nonisolated func accessibilityDragPoint(_ point: UnitPoint, description: LocalizedStringResource, isEnabled: Bool) -> ModifiedContent<Content, Modifier>

The point an assistive technology should use to begin a drag interaction. Use this modifier when you need to provide a description to users when prompted begin a drag interaction. struct FileView: View { var filename: String var body: some View { FileIcon(filename: filename) .accessibilityDragPoint( .center, description: Text("Move \(filename)")) } } By default, if an accessible view or its subtree has drag and/or drop interactions, they will be automatically exposed by assistive technologies. However, if there is more than one such interaction, each drag or drop should have a description to disambiguate it and give a good user experience. - Note: An accessibility element can have multiple points for a drag, provided they have different descriptions. - Parameters: - point: The point the assistive technology will begin a drag interaction. - description: The description of the drag interaction. - isEnabled: If true the accessibility drag point is applied; otherwise the accessibility drag point is unchanged.

method · iOS 18.0+

accessibilityDragPoint

TypeScript
accessibilityDragPointDescriptionIsEnabled94838(point: _SwiftUICore_UnitPoint, description: _SwiftUICore_LocalizedStringKey, isEnabled: boolean): _SwiftUICore_ModifiedContent<unknown, AccessibilityAttachmentModifier>
Swift declaration
nonisolated func accessibilityDragPoint(_ point: UnitPoint, description: LocalizedStringKey, isEnabled: Bool) -> ModifiedContent<Content, Modifier>

The point an assistive technology should use to begin a drag interaction. Use this modifier when you need to provide a description to users when prompted begin a drag interaction. struct FileView: View { var filename: String var body: some View { FileIcon(filename: filename) .accessibilityDragPoint( .center, description: Text("Move \(filename)")) } } By default, if an accessible view or its subtree has drag and/or drop interactions, they will be automatically exposed by assistive technologies. However, if there is more than one such interaction, each drag or drop should have a description to disambiguate it and give a good user experience. - Note: An accessibility element can have multiple points for a drag, provided they have different descriptions. - Parameters: - point: The point the assistive technology will begin a drag interaction. - description: The description of the drag interaction. - isEnabled: If true the accessibility drag point is applied; otherwise the accessibility drag point is unchanged.

method · iOS 18.0+

accessibilityDragPoint

TypeScript
accessibilityDragPointDescriptionIsEnabled84627(point: _SwiftUICore_UnitPoint, description: _SwiftUICore_Text, isEnabled: boolean): _SwiftUICore_ModifiedContent<unknown, AccessibilityAttachmentModifier>
Swift declaration
nonisolated func accessibilityDragPoint(_ point: UnitPoint, description: Text, isEnabled: Bool) -> ModifiedContent<Content, Modifier>

The point an assistive technology should use to begin a drag interaction. Use this modifier when you need to provide a description to users when prompted begin a drag interaction. struct FileView: View { var filename: String var body: some View { FileIcon(filename: filename) .accessibilityDragPoint( .center, description: Text("Move \(filename)")) } } By default, if an accessible view or its subtree has drag and/or drop interactions, they will be automatically exposed by assistive technologies. However, if there is more than one such interaction, each drag or drop should have a description to disambiguate it and give a good user experience. - Note: An accessibility element can have multiple points for a drag, provided they have different descriptions. - Parameters: - point: The point the assistive technology will begin a drag interaction. - description: The description of the drag interaction. - isEnabled: If true the accessibility drag point is applied; otherwise the accessibility drag point is unchanged.

method · iOS 18.0+

accessibilityDragPoint

TypeScript
accessibilityDragPointDescriptionIsEnabled38855(point: _SwiftUICore_UnitPoint, description: string, isEnabled: boolean): _SwiftUICore_ModifiedContent<unknown, AccessibilityAttachmentModifier>
Swift declaration
nonisolated func accessibilityDragPoint<S>(_ point: UnitPoint, description: S, isEnabled: Bool) -> ModifiedContent<Content, Modifier> where S : StringProtocol

The point an assistive technology should use to begin a drag interaction. Use this modifier when you need to provide a description to users when prompted begin a drag interaction. struct FileView: View { var filename: String var body: some View { FileIcon(filename: filename) .accessibilityDragPoint( .center, description: Text("Move \(filename)")) } } By default, if an accessible view or its subtree has drag and/or drop interactions, they will be automatically exposed by assistive technologies. However, if there is more than one such interaction, each drag or drop should have a description to disambiguate it and give a good user experience. - Note: An accessibility element can have multiple points for a drag, provided they have different descriptions. - Parameters: - point: The point the assistive technology will begin a drag interaction. - description: The description of the drag interaction. - isEnabled: If true the accessibility drag point is applied; otherwise the accessibility drag point is unchanged.

method · iOS 16.0+

accessibilityDragPoint

TypeScript
accessibilityDragPointDescription(point: _SwiftUICore_UnitPoint, description: _Foundation_LocalizedStringResource): _SwiftUICore_ModifiedContent<unknown, AccessibilityAttachmentModifier>
Swift declaration
@export(implementation) nonisolated func accessibilityDragPoint(_ point: UnitPoint, description: LocalizedStringResource) -> ModifiedContent<Content, Modifier>

The point an assistive technology should use to begin a drag interaction. Use this modifier when you need to provide a description to users when prompted begin a drag interaction. struct FileView: View { var filename: String var body: some View { FileIcon(filename: filename) .accessibilityDragPoint(.center, description: "Move \(filename)") } } By default, if an accessible view or its subtree has drag and/or drop interactions, they will be automatically exposed by assistive technologies. However, if there is more than one such interaction, each drag or drop should have a description to disambiguate it and give a good user experience. - Note: An accessibility element can have multiple points for a drag, provided they have different descriptions.

method · iOS 16.0+

accessibilityDragPoint

TypeScript
accessibilityDragPointDescription48707(point: _SwiftUICore_UnitPoint, description: _SwiftUICore_LocalizedStringKey): _SwiftUICore_ModifiedContent<unknown, AccessibilityAttachmentModifier>
Swift declaration
nonisolated func accessibilityDragPoint(_ point: UnitPoint, description: LocalizedStringKey) -> ModifiedContent<Content, Modifier>

The point an assistive technology should use to begin a drag interaction. Use this modifier when you need to provide a description to users when prompted begin a drag interaction. struct FileView: View { var filename: String var body: some View { FileIcon(filename: filename) .accessibilityDragPoint(.center, description: "Move \(filename)") } } By default, if an accessible view or its subtree has drag and/or drop interactions, they will be automatically exposed by assistive technologies. However, if there is more than one such interaction, each drag or drop should have a description to disambiguate it and give a good user experience. - Note: An accessibility element can have multiple points for a drag, provided they have different descriptions.

method · iOS 16.0+

accessibilityDragPoint

TypeScript
accessibilityDragPointDescription75042(point: _SwiftUICore_UnitPoint, description: _SwiftUICore_Text): _SwiftUICore_ModifiedContent<unknown, AccessibilityAttachmentModifier>
Swift declaration
nonisolated func accessibilityDragPoint(_ point: UnitPoint, description: Text) -> ModifiedContent<Content, Modifier>

The point an assistive technology should use to begin a drag interaction. Use this modifier when you need to provide a description to users when prompted begin a drag interaction. struct FileView: View { var filename: String var body: some View { FileIcon(filename: filename) .accessibilityDragPoint(.center, description: Text("Move \(filename)")) } } By default, if an accessible view or its subtree has drag and/or drop interactions, they will be automatically exposed by assistive technologies. However, if there is more than one such interaction, each drag or drop should have a description to disambiguate it and give a good user experience. - Note: An accessibility element can have multiple points for a drag, provided they have different descriptions.

method · iOS 16.0+

accessibilityDragPoint

TypeScript
accessibilityDragPointDescription60812(point: _SwiftUICore_UnitPoint, description: string): _SwiftUICore_ModifiedContent<unknown, AccessibilityAttachmentModifier>
Swift declaration
nonisolated func accessibilityDragPoint<S>(_ point: UnitPoint, description: S) -> ModifiedContent<Content, Modifier> where S : StringProtocol

The point an assistive technology should use to begin a drag interaction. Use this modifier when you need to provide a description to users when prompted begin a drag interaction. struct FileView: View { var filename: String var body: some View { FileIcon(filename: filename) .accessibilityDragPoint(.center, description: "Move \(filename)") } } By default, if an accessible view or its subtree has drag and/or drop interactions, they will be automatically exposed by assistive technologies. However, if there is more than one such interaction, each drag or drop should have a description to disambiguate it and give a good user experience. - Note: An accessibility element can have multiple points for a drag, provided they have different descriptions.

method · iOS 18.0+

accessibilityDropPoint

TypeScript
accessibilityDropPointDescriptionIsEnabled(point: _SwiftUICore_UnitPoint, description: _Foundation_LocalizedStringResource, isEnabled: boolean): _SwiftUICore_ModifiedContent<unknown, AccessibilityAttachmentModifier>
Swift declaration
@export(implementation) nonisolated func accessibilityDropPoint(_ point: UnitPoint, description: LocalizedStringResource, isEnabled: Bool) -> ModifiedContent<Content, Modifier>

The point an assistive technology should use to end a drag interaction. Use this modifier when you need to provide a description to users when prompted end a drag interaction. struct FolderView: View { var folderName: String var body: some View { FolderIcon(folderName: folderName) .accessibilityDropPoint( .center, description: Text("Move to \(folderName)")) } } By default, if an accessible view or its subtree has drag and/or drop interactions, they will be automatically exposed by assistive technologies. However, if there is more than one such interaction, each drag or drop should have a description to disambiguate it and give a good user experience. - Note: An accessibility element can have multiple points for a drop, provided they have different descriptions. - Parameters: - point: The point the assistive technology will perform a drop interaction. - description: The description of the drop interaction. - isEnabled: If true the accessibility drop point is applied; otherwise the accessibility drop point is unchanged.

method · iOS 18.0+

accessibilityDropPoint

TypeScript
accessibilityDropPointDescriptionIsEnabled12507(point: _SwiftUICore_UnitPoint, description: _SwiftUICore_LocalizedStringKey, isEnabled: boolean): _SwiftUICore_ModifiedContent<unknown, AccessibilityAttachmentModifier>
Swift declaration
nonisolated func accessibilityDropPoint(_ point: UnitPoint, description: LocalizedStringKey, isEnabled: Bool) -> ModifiedContent<Content, Modifier>

The point an assistive technology should use to end a drag interaction. Use this modifier when you need to provide a description to users when prompted end a drag interaction. struct FolderView: View { var folderName: String var body: some View { FolderIcon(folderName: folderName) .accessibilityDropPoint( .center, description: Text("Move to \(folderName)")) } } By default, if an accessible view or its subtree has drag and/or drop interactions, they will be automatically exposed by assistive technologies. However, if there is more than one such interaction, each drag or drop should have a description to disambiguate it and give a good user experience. - Note: An accessibility element can have multiple points for a drop, provided they have different descriptions. - Parameters: - point: The point the assistive technology will perform a drop interaction. - description: The description of the drop interaction. - isEnabled: If true the accessibility drop point is applied; otherwise the accessibility drop point is unchanged.

method · iOS 18.0+

accessibilityDropPoint

TypeScript
accessibilityDropPointDescriptionIsEnabled53484(point: _SwiftUICore_UnitPoint, description: _SwiftUICore_Text, isEnabled: boolean): _SwiftUICore_ModifiedContent<unknown, AccessibilityAttachmentModifier>
Swift declaration
nonisolated func accessibilityDropPoint(_ point: UnitPoint, description: Text, isEnabled: Bool) -> ModifiedContent<Content, Modifier>

The point an assistive technology should use to end a drag interaction. Use this modifier when you need to provide a description to users when prompted end a drag interaction. struct FolderView: View { var folderName: String var body: some View { FolderIcon(folderName: folderName) .accessibilityDropPoint( .center, description: Text("Move to \(folderName)")) } } By default, if an accessible view or its subtree has drag and/or drop interactions, they will be automatically exposed by assistive technologies. However, if there is more than one such interaction, each drag or drop should have a description to disambiguate it and give a good user experience. - Note: An accessibility element can have multiple points for a drop, provided they have different descriptions. - Parameters: - point: The point the assistive technology will perform a drop interaction. - description: The description of the drop interaction. - isEnabled: If true the accessibility drop point is applied; otherwise the accessibility drop point is unchanged.

method · iOS 18.0+

accessibilityDropPoint

TypeScript
accessibilityDropPointDescriptionIsEnabled11398(point: _SwiftUICore_UnitPoint, description: string, isEnabled: boolean): _SwiftUICore_ModifiedContent<unknown, AccessibilityAttachmentModifier>
Swift declaration
nonisolated func accessibilityDropPoint<S>(_ point: UnitPoint, description: S, isEnabled: Bool) -> ModifiedContent<Content, Modifier> where S : StringProtocol

The point an assistive technology should use to end a drag interaction. Use this modifier when you need to provide a description to users when prompted end a drag interaction. struct FolderView: View { var folderName: String var body: some View { FolderIcon(folderName: folderName) .accessibilityDropPoint( .center, description: Text("Move to \(folderName)")) } } By default, if an accessible view or its subtree has drag and/or drop interactions, they will be automatically exposed by assistive technologies. However, if there is more than one such interaction, each drag or drop should have a description to disambiguate it and give a good user experience. - Note: An accessibility element can have multiple points for a drop, provided they have different descriptions. - Parameters: - point: The point the assistive technology will perform a drop interaction. - description: The description of the drop interaction. - isEnabled: If true the accessibility drop point is applied; otherwise the accessibility drop point is unchanged.

method · iOS 16.0+

accessibilityDropPoint

TypeScript
accessibilityDropPointDescription(point: _SwiftUICore_UnitPoint, description: _Foundation_LocalizedStringResource): _SwiftUICore_ModifiedContent<unknown, AccessibilityAttachmentModifier>
Swift declaration
@export(implementation) nonisolated func accessibilityDropPoint(_ point: UnitPoint, description: LocalizedStringResource) -> ModifiedContent<Content, Modifier>

The point an assistive technology should use to end a drag interaction. Use this modifier when you need to provide a description to users when prompted end a drag interaction. struct FolderView: View { var folderName: String var body: some View { FolderIcon(folderName: folderName) .accessibilityDropPoint(.center, description: "Move to \(folderName)") } } By default, if an accessible view or its subtree has drag and/or drop interactions, they will be automatically exposed by assistive technologies. However, if there is more than one such interaction, each drag or drop should have a description to disambiguate it and give a good user experience. - Note: An accessibility element can have multiple points for a drop, provided they have different descriptions.

method · iOS 16.0+

accessibilityDropPoint

TypeScript
accessibilityDropPointDescription92014(point: _SwiftUICore_UnitPoint, description: _SwiftUICore_LocalizedStringKey): _SwiftUICore_ModifiedContent<unknown, AccessibilityAttachmentModifier>
Swift declaration
nonisolated func accessibilityDropPoint(_ point: UnitPoint, description: LocalizedStringKey) -> ModifiedContent<Content, Modifier>

The point an assistive technology should use to end a drag interaction. Use this modifier when you need to provide a description to users when prompted end a drag interaction. struct FolderView: View { var folderName: String var body: some View { FolderIcon(folderName: folderName) .accessibilityDropPoint(.center, description: "Move to \(folderName)") } } By default, if an accessible view or its subtree has drag and/or drop interactions, they will be automatically exposed by assistive technologies. However, if there is more than one such interaction, each drag or drop should have a description to disambiguate it and give a good user experience. - Note: An accessibility element can have multiple points for a drop, provided they have different descriptions.

method · iOS 16.0+

accessibilityDropPoint

TypeScript
accessibilityDropPointDescription15621(point: _SwiftUICore_UnitPoint, description: _SwiftUICore_Text): _SwiftUICore_ModifiedContent<unknown, AccessibilityAttachmentModifier>
Swift declaration
nonisolated func accessibilityDropPoint(_ point: UnitPoint, description: Text) -> ModifiedContent<Content, Modifier>

The point an assistive technology should use to end a drag interaction. Use this modifier when you need to provide a description to users when prompted end a drag interaction. struct FolderView: View { var folderName: String var body: some View { FolderIcon(folderName: folderName) .accessibilityDropPoint(.center, description: Text("Move to \(folderName)")) } } By default, if an accessible view or its subtree has drag and/or drop interactions, they will be automatically exposed by assistive technologies. However, if there is more than one such interaction, each drag or drop should have a description to disambiguate it and give a good user experience. - Note: An accessibility element can have multiple points for a drop, provided they have different descriptions.

method · iOS 16.0+

accessibilityDropPoint

TypeScript
accessibilityDropPointDescription58425(point: _SwiftUICore_UnitPoint, description: string): _SwiftUICore_ModifiedContent<unknown, AccessibilityAttachmentModifier>
Swift declaration
nonisolated func accessibilityDropPoint<S>(_ point: UnitPoint, description: S) -> ModifiedContent<Content, Modifier> where S : StringProtocol

The point an assistive technology should use to end a drag interaction. Use this modifier when you need to provide a description to users when prompted end a drag interaction. struct FolderView: View { var folderName: String var body: some View { FolderIcon(folderName: folderName) .accessibilityDropPoint(.center, description: "Move to \(folderName)") } } By default, if an accessible view or its subtree has drag and/or drop interactions, they will be automatically exposed by assistive technologies. However, if there is more than one such interaction, each drag or drop should have a description to disambiguate it and give a good user experience. - Note: An accessibility element can have multiple points for a drop, provided they have different descriptions.

method · iOS 18.0+

accessibilityIdentifier

TypeScript
accessibilityIdentifierIsEnabled(identifier: string, isEnabled: boolean): _SwiftUICore_ModifiedContent<unknown, AccessibilityAttachmentModifier>
Swift declaration
nonisolated func accessibilityIdentifier(_ identifier: String, isEnabled: Bool) -> ModifiedContent<Content, Modifier>

Uses the string you specify to identify the view. Use this value for testing. It isn't visible to the user. - Parameters: - identifier: The accessibility identifier to apply. - isEnabled: If true the accessibility identifier is applied; otherwise the accessibility identifier is unchanged.

method · iOS 14.0+

accessibilityIdentifier

TypeScript
accessibilityIdentifier58166(identifier: string): _SwiftUICore_ModifiedContent<unknown, AccessibilityAttachmentModifier>
Swift declaration
nonisolated func accessibilityIdentifier(_ identifier: String) -> ModifiedContent<Content, Modifier>

Uses the string you specify to identify the view. Use this value for testing. It isn't visible to the user.

method · iOS 16.0+

accessibilityZoomAction

TypeScript
accessibilityZoomAction(handler: ((arg0: _SwiftUICore_AccessibilityZoomGestureAction) => void)): _SwiftUICore_ModifiedContent<unknown, AccessibilityAttachmentModifier>
Swift declaration
nonisolated func accessibilityZoomAction(_ handler: @escaping (AccessibilityZoomGestureAction) -> Void) -> ModifiedContent<Content, Modifier>

Adds an accessibility zoom action to the view. Actions allow assistive technologies, such as VoiceOver, to interact with the view by invoking the action. For example, this is how a zoom action is used to transform the scale of a shape which has a `MagnificationGesture`. var body: some View { Circle() .scaleEffect(magnifyBy) .gesture(magnification) .accessibilityLabel("Circle Magnifier") .accessibilityZoomAction { action in switch action.direction { case .zoomIn: magnifyBy += 0.5 case .zoomOut: magnifyBy -= 0.5 } } }

method · iOS 17.0+

accessibilityDirectTouch

TypeScript
accessibilityDirectTouch(isDirectTouchArea?: boolean, options?: _SwiftUICore_AccessibilityDirectTouchOptions): _SwiftUICore_ModifiedContent<unknown, AccessibilityAttachmentModifier>
Swift declaration
nonisolated func accessibilityDirectTouch(_ isDirectTouchArea: Bool = true, options: AccessibilityDirectTouchOptions = []) -> ModifiedContent<Content, Modifier>

Explicitly set whether this accessibility element is a direct touch area. Direct touch areas passthrough touch events to the app rather than being handled through an assistive technology, such as VoiceOver. The modifier accepts an optional `AccessibilityDirectTouchOptions` option set to customize the functionality of the direct touch area. For example, this is how a direct touch area would allow a VoiceOver user to interact with a view with a `rotationEffect` controlled by a `RotationGesture`. The direct touch area would require a user to activate the area before using the direct touch area. var body: some View { Rectangle() .frame(width: 200, height: 200, alignment: .center) .rotationEffect(angle) .gesture(rotation) .accessibilityDirectTouch(options: .requiresActivation) }

method · iOS 18.0+

accessibilityInputLabels

TypeScript
accessibilityInputLabelsIsEnabled(inputLabelKeys: Array<_SwiftUICore_LocalizedStringKey>, isEnabled: boolean): _SwiftUICore_ModifiedContent<unknown, AccessibilityAttachmentModifier>
Swift declaration
nonisolated func accessibilityInputLabels(_ inputLabelKeys: [LocalizedStringKey], isEnabled: Bool) -> ModifiedContent<Content, Modifier>

Sets alternate input labels with which users identify a view. Provide labels in descending order of importance. Voice Control and Full Keyboard Access use the input labels. > Note: If you don't specify any input labels, the user can still refer to the view using the accessibility label that you add with the `accessibilityLabel()` modifier. - Parameters: - inputLabelKeys: The accessibility input labels to apply. - isEnabled: If true the accessibility input labels are applied; otherwise the accessibility input labels are unchanged.

method · iOS 18.0+

accessibilityInputLabels

TypeScript
accessibilityInputLabelsIsEnabled99384(inputLabels: Array<_SwiftUICore_Text>, isEnabled: boolean): _SwiftUICore_ModifiedContent<unknown, AccessibilityAttachmentModifier>
Swift declaration
nonisolated func accessibilityInputLabels(_ inputLabels: [Text], isEnabled: Bool) -> ModifiedContent<Content, Modifier>

Sets alternate input labels with which users identify a view. Provide labels in descending order of importance. Voice Control and Full Keyboard Access use the input labels. > Note: If you don't specify any input labels, the user can still refer to the view using the accessibility label that you add with the `accessibilityLabel()` modifier. - Parameters: - inputLabels: The accessibility input labels to apply. - isEnabled: If true the accessibility input labels are applied; otherwise the accessibility input labels are unchanged.

method · iOS 18.0+

accessibilityInputLabels

TypeScript
accessibilityInputLabelsIsEnabled17654(inputLabels: Array<string>, isEnabled: boolean): _SwiftUICore_ModifiedContent<unknown, AccessibilityAttachmentModifier>
Swift declaration
nonisolated func accessibilityInputLabels<S>(_ inputLabels: [S], isEnabled: Bool) -> ModifiedContent<Content, Modifier> where S : StringProtocol

Sets alternate input labels with which users identify a view. Provide labels in descending order of importance. Voice Control and Full Keyboard Access use the input labels. > Note: If you don't specify any input labels, the user can still refer to the view using the accessibility label that you add with the `accessibilityLabel()` modifier. - Parameters: - inputLabels: The accessibility input labels to apply. - isEnabled: If true the accessibility input labels are applied; otherwise the accessibility input labels are unchanged.

method · iOS 14.0+

accessibilityInputLabels

TypeScript
accessibilityInputLabels46653(inputLabelKeys: Array<_SwiftUICore_LocalizedStringKey>): _SwiftUICore_ModifiedContent<unknown, AccessibilityAttachmentModifier>
Swift declaration
nonisolated func accessibilityInputLabels(_ inputLabelKeys: [LocalizedStringKey]) -> ModifiedContent<Content, Modifier>

Sets alternate input labels with which users identify a view. Provide labels in descending order of importance. Voice Control and Full Keyboard Access use the input labels. > Note: If you don't specify any input labels, the user can still refer to the view using the accessibility label that you add with the `accessibilityLabel()` modifier.

method · iOS 14.0+

accessibilityInputLabels

TypeScript
accessibilityInputLabels87838(inputLabels: Array<_SwiftUICore_Text>): _SwiftUICore_ModifiedContent<unknown, AccessibilityAttachmentModifier>
Swift declaration
nonisolated func accessibilityInputLabels(_ inputLabels: [Text]) -> ModifiedContent<Content, Modifier>

Sets alternate input labels with which users identify a view. If you don't specify any input labels, the user can still refer to the view using the accessibility label that you add with the accessibilityLabel() modifier. Provide labels in descending order of importance. Voice Control and Full Keyboard Access use the input labels.

method · iOS 14.0+

accessibilityInputLabels

TypeScript
accessibilityInputLabels50384(inputLabels: Array<string>): _SwiftUICore_ModifiedContent<unknown, AccessibilityAttachmentModifier>
Swift declaration
nonisolated func accessibilityInputLabels<S>(_ inputLabels: [S]) -> ModifiedContent<Content, Modifier> where S : StringProtocol

Sets alternate input labels with which users identify a view. Provide labels in descending order of importance. Voice Control and Full Keyboard Access use the input labels. > Note: If you don't specify any input labels, the user can still refer to the view using the accessibility label that you add with the `accessibilityLabel()` modifier.

method · iOS 14.0+

accessibilityRemoveTraits

TypeScript
accessibilityRemoveTraits63225(traits: _SwiftUICore_AccessibilityTraits): _SwiftUICore_ModifiedContent<unknown, AccessibilityAttachmentModifier>
Swift declaration
nonisolated func accessibilityRemoveTraits(_ traits: AccessibilityTraits) -> ModifiedContent<Content, Modifier>

Removes the given traits from this view.

method · iOS 13.0+

accessibilityScrollAction

TypeScript
accessibilityScrollAction(handler: ((arg0: _SwiftUICore_Edge) => void)): _SwiftUICore_ModifiedContent<unknown, AccessibilityAttachmentModifier>
Swift declaration
nonisolated func accessibilityScrollAction(_ handler: @escaping (Edge) -> Void) -> ModifiedContent<Content, Modifier>

Adds an accessibility scroll action to the view. Actions allow assistive technologies, such as the VoiceOver, to interact with the view by invoking the action. For example, this is how a scroll action to trigger a refresh could be added to a view. var body: some View { ScrollView { ContentView() } .accessibilityScrollAction { edge in if edge == .top { // Refresh content } } }

method · iOS 26.0+

accessibilityScrollStatus

TypeScript
accessibilityScrollStatusIsEnabled(status: _Foundation_LocalizedStringResource, isEnabled?: boolean): _SwiftUICore_ModifiedContent<unknown, AccessibilityAttachmentModifier>
Swift declaration
@export(implementation) nonisolated func accessibilityScrollStatus(_ status: LocalizedStringResource, isEnabled: Bool = true) -> ModifiedContent<Content, Modifier>

Changes the announcement provided by accessibility technologies when a user scrolls a scroll view within this view. Use this modifier to provide a description of the content at the current position in the scroll view. For example, you could use this modifier to announce the current month being scrolled to in a view that contains a calendar. @State private var position = ScrollPosition(idType: Month.ID.self) ScrollView { LazyVStack { ForEach(months) { months in MonthView(month: months) } } .scrollTargetLayout() } .scrollPosition($position) .accessibilityScrollStatus("\(months.name(position.viewID)) \(year)") By default, VoiceOver announces "Page X of Y" while scrolling. - Parameters: - status: The current status of the scroll view. - isEnabled: If true the accessibility scroll status is applied; otherwise the accessibility scroll status is unchanged.

method · iOS 26.0+

accessibilityScrollStatus

TypeScript
accessibilityScrollStatusIsEnabled40666(statusKey: _SwiftUICore_LocalizedStringKey, isEnabled?: boolean): _SwiftUICore_ModifiedContent<unknown, AccessibilityAttachmentModifier>
Swift declaration
nonisolated func accessibilityScrollStatus(_ statusKey: LocalizedStringKey, isEnabled: Bool = true) -> ModifiedContent<Content, Modifier>

Changes the announcement provided by accessibility technologies when a user scrolls a scroll view within this view. Use this modifier to provide a description of the content at the current position in the scroll view. For example, you could use this modifier to announce the current month being scrolled to in a view that contains a calendar. @State private var position = ScrollPosition(idType: Month.ID.self) ScrollView { LazyVStack { ForEach(months) { months in MonthView(month: months) } } .scrollTargetLayout() } .scrollPosition($position) .accessibilityScrollStatus("\(months.name(position.viewID)) \(year)") By default, VoiceOver announces "Page X of Y" while scrolling. - Parameters: - statusKey: The current status of the scroll view. - isEnabled: If true the accessibility scroll status is applied; otherwise the accessibility scroll status is unchanged.

method · iOS 26.0+

accessibilityScrollStatus

TypeScript
accessibilityScrollStatusIsEnabled2479(status: _SwiftUICore_Text, isEnabled?: boolean): _SwiftUICore_ModifiedContent<unknown, AccessibilityAttachmentModifier>
Swift declaration
nonisolated func accessibilityScrollStatus(_ status: Text, isEnabled: Bool = true) -> ModifiedContent<Content, Modifier>

Changes the announcement provided by accessibility technologies when a user scrolls a scroll view within this view. Use this modifier to provide a description of the content at the current position in the scroll view. For example, you could use this modifier to announce the current month being scrolled to in a view that contains a calendar. @State private var position = ScrollPosition(idType: Month.ID.self) ScrollView { LazyVStack { ForEach(months) { months in MonthView(month: months) } } .scrollTargetLayout() } .scrollPosition($position) .accessibilityScrollStatus("\(months.name(position.viewID)) \(year)") By default, VoiceOver announces "Page X of Y" while scrolling. - Parameters: - status: The current status of the scroll view. - isEnabled: If true the accessibility scroll status is applied; otherwise the accessibility scroll status is unchanged.

method · iOS 26.0+

accessibilityScrollStatus

TypeScript
accessibilityScrollStatusIsEnabled58599(status: SDKHandle, isEnabled?: boolean): _SwiftUICore_ModifiedContent<unknown, AccessibilityAttachmentModifier>
Swift declaration
nonisolated func accessibilityScrollStatus(_ status: some StringProtocol, isEnabled: Bool = true) -> ModifiedContent<Content, Modifier>

Changes the announcement provided by accessibility technologies when a user scrolls a scroll view within this view. Use this modifier to provide a description of the content at the current position in the scroll view. For example, you could use this modifier to announce the current month being scrolled to in a view that contains a calendar. @State private var position = ScrollPosition(idType: Month.ID.self) ScrollView { LazyVStack { ForEach(months) { months in MonthView(month: months) } } .scrollTargetLayout() } .scrollPosition($position) .accessibilityScrollStatus("\(months.name(position.viewID)) \(year)") By default, VoiceOver announces "Page X of Y" while scrolling. - Parameters: - status: The current status of the scroll view. - isEnabled: If true the accessibility scroll status is applied; otherwise the accessibility scroll status is unchanged.

method · iOS 14.0+

accessibilitySortPriority

TypeScript
accessibilitySortPriority37866(sortPriority: number): _SwiftUICore_ModifiedContent<unknown, AccessibilityAttachmentModifier>
Swift declaration
nonisolated func accessibilitySortPriority(_ sortPriority: Double) -> ModifiedContent<Content, Modifier>

Sets the sort priority order for this view's accessibility element, relative to other elements at the same level. Higher numbers are sorted first. The default sort priority is zero.

method · iOS 18.0+

accessibilityActivationPoint

TypeScript
accessibilityActivationPointIsEnabled(activationPoint: _SwiftUICore_UnitPoint, isEnabled: boolean): _SwiftUICore_ModifiedContent<unknown, AccessibilityAttachmentModifier>
Swift declaration
nonisolated func accessibilityActivationPoint(_ activationPoint: UnitPoint, isEnabled: Bool) -> ModifiedContent<Content, Modifier>

The activation point for an element is the location assistive technologies use to initiate gestures. Use this modifier to ensure that the activation point for a small element remains accurate even if you present a larger version of the element to VoiceOver. If an activation point is not provided, an activation point will be derived from one of the accessibility elements decedents or from the center of the accessibility frame. - Parameters: - activationPoint: The accessibility activation point to apply. - isEnabled: If true the accessibility activation point is applied; otherwise the accessibility activation point is unchanged.

method · iOS 18.0+

accessibilityActivationPoint

TypeScript
accessibilityActivationPointIsEnabled45397(activationPoint: { x: number; y: number }, isEnabled: boolean): _SwiftUICore_ModifiedContent<unknown, AccessibilityAttachmentModifier>
Swift declaration
nonisolated func accessibilityActivationPoint(_ activationPoint: CGPoint, isEnabled: Bool) -> ModifiedContent<Content, Modifier>

The activation point for an element is the location assistive technologies use to initiate gestures. Use this modifier to ensure that the activation point for a small element remains accurate even if you present a larger version of the element to VoiceOver. If an activation point is not provided, an activation point will be derived from one of the accessibility elements decedents or from the center of the accessibility frame. - Parameters: - activationPoint: The accessibility activation point to apply. - isEnabled: If true the accessibility activation point is applied; otherwise the accessibility activation point is unchanged.

method · iOS 14.0+

accessibilityActivationPoint

TypeScript
accessibilityActivationPoint17328(activationPoint: _SwiftUICore_UnitPoint): _SwiftUICore_ModifiedContent<unknown, AccessibilityAttachmentModifier>
Swift declaration
nonisolated func accessibilityActivationPoint(_ activationPoint: UnitPoint) -> ModifiedContent<Content, Modifier>

The activation point for an element is the location assistive technologies use to initiate gestures. Use this modifier to ensure that the activation point for a small element remains accurate even if you present a larger version of the element to VoiceOver. If an activation point is not provided, an activation point will be derrived from one of the accessibility elements decendents or from the center of the accessibility frame.

method · iOS 14.0+

accessibilityActivationPoint

TypeScript
accessibilityActivationPoint12063(activationPoint: { x: number; y: number }): _SwiftUICore_ModifiedContent<unknown, AccessibilityAttachmentModifier>
Swift declaration
nonisolated func accessibilityActivationPoint(_ activationPoint: CGPoint) -> ModifiedContent<Content, Modifier>

The activation point for an element is the location assistive technologies use to initiate gestures. Use this modifier to ensure that the activation point for a small element remains accurate even if you present a larger version of the element to VoiceOver. If an activation point is not provided, an activation point will be derrived from one of the accessibility elements decendents or from the center of the accessibility frame.

method · iOS 13.0+

accessibilityAdjustableAction

TypeScript
accessibilityAdjustableAction(handler: ((arg0: _SwiftUICore_AccessibilityAdjustmentDirection) => void)): _SwiftUICore_ModifiedContent<unknown, AccessibilityAttachmentModifier>
Swift declaration
nonisolated func accessibilityAdjustableAction(_ handler: @escaping (AccessibilityAdjustmentDirection) -> Void) -> ModifiedContent<Content, Modifier>

Adds an accessibility adjustable action to the view. Actions allow assistive technologies, such as the VoiceOver, to interact with the view by invoking the action. For example, this is how an adjustable action to navigate through pages could be added to a view. var body: some View { PageControl() .accessibilityAdjustableAction { direction in switch direction { case .increment: // Go to next page case .decrement: // Go to previous page } } }

method · iOS 18.0+

accessibilityRespondsToUserInteraction

TypeScript
accessibilityRespondsToUserInteractionIsEnabled(respondsToUserInteraction: boolean, isEnabled: boolean): _SwiftUICore_ModifiedContent<unknown, AccessibilityAttachmentModifier>
Swift declaration
nonisolated func accessibilityRespondsToUserInteraction(_ respondsToUserInteraction: Bool, isEnabled: Bool) -> ModifiedContent<Content, Modifier>

Explicitly set whether this Accessibility element responds to user interaction and would thus be interacted with by technologies such as Switch Control, Voice Control or Full Keyboard Access. If this is not set, the value is inferred from the traits of the Accessibility element, the presence of Accessibility actions on the element, or the presence of gestures on the element or containing views. - Parameters: - respondsToUserInteraction: Whether the view responds to user interaction. - isEnabled: If true the accessibility interaction state is applied; otherwise the accessibility interaction state is unchanged.

method · iOS 15.0+

accessibilityRespondsToUserInteraction

TypeScript
accessibilityRespondsToUserInteraction(respondsToUserInteraction?: boolean): _SwiftUICore_ModifiedContent<unknown, AccessibilityAttachmentModifier>
Swift declaration
nonisolated func accessibilityRespondsToUserInteraction(_ respondsToUserInteraction: Bool = true) -> ModifiedContent<Content, Modifier>

Explicitly set whether this Accessibility element responds to user interaction and would thus be interacted with by technologies such as Switch Control, Voice Control or Full Keyboard Access. If this is not set, the value is inferred from the traits of the Accessibility element, the presence of Accessibility actions on the element, or the presence of gestures on the element or containing views.

init · iOS 16.0+

init

TypeScript
static initSelectionIn(titleResource: _Foundation_LocalizedStringResource, selection: _SwiftUICore_Binding<Array<_Foundation_DateComponents>>, bounds: SDKHandle): MultiDatePicker<_SwiftUICore_Text>
Swift declaration
@export(implementation) nonisolated init(_ titleResource: LocalizedStringResource, selection: Binding<Set<DateComponents>>, in bounds: Range<Date>)

Creates an instance that selects multiple dates in a range. - Parameters: - titleResource: The localized title of `self`, describing its purpose. - selection: The date values being displayed and selected. - bounds: The exclusive range of selectable dates.

init · iOS 16.0+

init

TypeScript
static initSelectionIn4675(titleResource: _Foundation_LocalizedStringResource, selection: _SwiftUICore_Binding<Array<_Foundation_DateComponents>>, bounds: SDKHandle): MultiDatePicker<_SwiftUICore_Text>
Swift declaration
@export(implementation) nonisolated init(_ titleResource: LocalizedStringResource, selection: Binding<Set<DateComponents>>, in bounds: PartialRangeFrom<Date>)

Creates an instance that selects multiple dates on or after some start date. - Parameters: - titleResource: The localized title of `self`, describing its purpose. - selection: The date values being displayed and selected. - bounds: The open range from some selectable start date.

init · iOS 16.0+

init

TypeScript
static initSelectionIn53103(titleResource: _Foundation_LocalizedStringResource, selection: _SwiftUICore_Binding<Array<_Foundation_DateComponents>>, bounds: SDKHandle): MultiDatePicker<_SwiftUICore_Text>
Swift declaration
@export(implementation) nonisolated init(_ titleResource: LocalizedStringResource, selection: Binding<Set<DateComponents>>, in bounds: PartialRangeUpTo<Date>)

Creates an instance that selects multiple dates before some end date. - Parameters: - titleResource: The localized title of `self`, describing its purpose. - selection: The date values being displayed and selected. - bounds: The open range before some end date.

init · iOS 16.0+

init

TypeScript
static initSelectionIn50233(titleKey: _SwiftUICore_LocalizedStringKey, selection: _SwiftUICore_Binding<Array<_Foundation_DateComponents>>, bounds: SDKHandle): MultiDatePicker<_SwiftUICore_Text>
Swift declaration
nonisolated init(_ titleKey: LocalizedStringKey, selection: Binding<Set<DateComponents>>, in bounds: Range<Date>)

Creates an instance that selects multiple dates in a range. - Parameters: - titleKey: The key for the localized title of `self`, describing its purpose. - selection: The date values being displayed and selected. - bounds: The exclusive range of selectable dates.

init · iOS 16.0+

init

TypeScript
static initSelectionIn26086(titleKey: _SwiftUICore_LocalizedStringKey, selection: _SwiftUICore_Binding<Array<_Foundation_DateComponents>>, bounds: SDKHandle): MultiDatePicker<_SwiftUICore_Text>
Swift declaration
nonisolated init(_ titleKey: LocalizedStringKey, selection: Binding<Set<DateComponents>>, in bounds: PartialRangeFrom<Date>)

Creates an instance that selects multiple dates on or after some start date. - Parameters: - titleKey: The key for the localized title of `self`, describing its purpose. - selection: The date values being displayed and selected. - bounds: The open range from some selectable start date.

init · iOS 16.0+

init

TypeScript
static initSelectionIn93242(titleKey: _SwiftUICore_LocalizedStringKey, selection: _SwiftUICore_Binding<Array<_Foundation_DateComponents>>, bounds: SDKHandle): MultiDatePicker<_SwiftUICore_Text>
Swift declaration
nonisolated init(_ titleKey: LocalizedStringKey, selection: Binding<Set<DateComponents>>, in bounds: PartialRangeUpTo<Date>)

Creates an instance that selects multiple dates before some end date. - Parameters: - titleKey: The key for the localized title of `self`, describing its purpose. - selection: The date values being displayed and selected. - bounds: The open range before some end date.

init · iOS 16.0+

init

TypeScript
static initSelectionIn56369(title: string, selection: _SwiftUICore_Binding<Array<_Foundation_DateComponents>>, bounds: SDKHandle): MultiDatePicker<_SwiftUICore_Text>
Swift declaration
nonisolated init<S>(_ title: S, selection: Binding<Set<DateComponents>>, in bounds: Range<Date>) where S : StringProtocol

Creates an instance that selects multiple dates in a range. - Parameters: - title: The title of `self`, describing its purpose. - selection: The date values being displayed and selected. - bounds: The exclusive range of selectable dates.

init · iOS 16.0+

init

TypeScript
static initSelectionIn73510(title: string, selection: _SwiftUICore_Binding<Array<_Foundation_DateComponents>>, bounds: SDKHandle): MultiDatePicker<_SwiftUICore_Text>
Swift declaration
nonisolated init<S>(_ title: S, selection: Binding<Set<DateComponents>>, in bounds: PartialRangeFrom<Date>) where S : StringProtocol

Creates an instance that selects multiple dates on or after some start date. - Parameters: - title: The title of `self`, describing its purpose. - selection: The date values being displayed and selected. - bounds: The open range from some selectable start date.

init · iOS 16.0+

init

TypeScript
static initSelectionIn71402(title: string, selection: _SwiftUICore_Binding<Array<_Foundation_DateComponents>>, bounds: SDKHandle): MultiDatePicker<_SwiftUICore_Text>
Swift declaration
nonisolated init<S>(_ title: S, selection: Binding<Set<DateComponents>>, in bounds: PartialRangeUpTo<Date>) where S : StringProtocol

Creates an instance that selects multiple dates before some end date. - Parameters: - title: The title of `self`, describing its purpose. - selection: The date values being displayed and selected. - bounds: The open range before some end date.

init · iOS 16.0+

init

TypeScript
static initSelection(titleResource: _Foundation_LocalizedStringResource, selection: _SwiftUICore_Binding<Array<_Foundation_DateComponents>>): MultiDatePicker<_SwiftUICore_Text>
Swift declaration
@export(implementation) nonisolated init(_ titleResource: LocalizedStringResource, selection: Binding<Set<DateComponents>>)

Creates an instance that selects multiple dates with an unbounded range. - Parameters: - titleResource: The localized title of `self`, describing its purpose. - selection: The date values being displayed and selected.

init · iOS 16.0+

init

TypeScript
static initSelection20105(titleKey: _SwiftUICore_LocalizedStringKey, selection: _SwiftUICore_Binding<Array<_Foundation_DateComponents>>): MultiDatePicker<_SwiftUICore_Text>
Swift declaration
nonisolated init(_ titleKey: LocalizedStringKey, selection: Binding<Set<DateComponents>>)

Creates an instance that selects multiple dates with an unbounded range. - Parameters: - titleKey: The key for the localized title of `self`, describing its purpose. - selection: The date values being displayed and selected.

init · iOS 16.0+

init

TypeScript
static initSelection43777(title: string, selection: _SwiftUICore_Binding<Array<_Foundation_DateComponents>>): MultiDatePicker<_SwiftUICore_Text>
Swift declaration
nonisolated init<S>(_ title: S, selection: Binding<Set<DateComponents>>) where S : StringProtocol

Creates an instance that selects multiple dates with an unbounded range. - Parameters: - title: The title of `self`, describing its purpose. - selection: The date values being displayed and selected.

init · iOS 14.0+

init

TypeScript
init(uiLegibilityWeight: _UIKit_UILegibilityWeight): (_SwiftUICore_LegibilityWeight) | null
Swift declaration
init?(_ uiLegibilityWeight: UILegibilityWeight)

Creates a legibility weight from its UILegibilityWeight equivalent.

get · iOS 14.0+

content

TypeScript
get content(): ((arg0: ScrollViewProxy) => Promise<SDKHandle>)
Swift declaration
var content: (ScrollViewProxy) -> Content

The content builder that creates the reader's content.

get · iOS 13.0+

content

TypeScript
get content(): SDKHandle
Swift declaration
var content: Content

The content view.

set · iOS 13.0+

content

TypeScript
set content(value: SDKHandle)
Swift declaration
var content: Content

The content view.

init · iOS 16.0+

init

TypeScript
static init(): ToolbarTitleMenu<_SwiftUICore_EmptyView>
Swift declaration
nonisolated init() where Content == EmptyView

Creates a toolbar title menu where actions are inferred from your apps commands.

get · iOS 16.0+

openWindow

TypeScript
get openWindow(): OpenWindowAction
Swift declaration
var openWindow: OpenWindowAction { get }

A window presentation action stored in a view's environment. Use the `openWindow` environment value to get an ``OpenWindowAction`` instance for a given ``Environment``. Then call the instance to open a window. You call the instance directly because it defines a ``OpenWindowAction/callAsFunction(id:)`` method that Swift calls when you call the instance. For example, you can define a button that opens a new mail viewer window: @main struct Mail: App { var body: some Scene { WindowGroup(id: "mail-viewer") { MailViewer() } } } struct NewViewerButton: View { @Environment(\.openWindow) private var openWindow var body: some View { Button("Open new mail viewer") { openWindow(id: "mail-viewer") } } } You indicate which scene to open by providing one of the following: * A string identifier that you pass through the `id` parameter, as in the above example. * A `value` parameter that has a type that matches the type that you specify in the scene's initializer. * Both an identifier and a value. This enables you to define multiple window groups that take input values of the same type like a <doc://com.apple.documentation/documentation/Foundation/UUID>. Use the first option to target either a ``WindowGroup`` or a ``Window`` scene in your app that has a matching identifier. For a `WindowGroup`, the system creates a new window for the group. If the window group presents data, the system provides the default value or `nil` to the window's root view. If the targeted scene is a `Window`, the system orders it to the front. Use the other two options to target a `WindowGroup` and provide a value to present. If the interface already has a window from the group that's presenting the specified value, the system brings the window to the front. Otherwise, the system creates a new window and passes a binding to the specified value.

get · iOS 14.0+

scenePhase

TypeScript
get scenePhase(): ScenePhase
Swift declaration
var scenePhase: ScenePhase { get set }

The current phase of the scene. The system sets this value to provide an indication of the operational state of a scene or collection of scenes. The exact meaning depends on where you access the value. For more information, see ``ScenePhase``.

set · iOS 14.0+

scenePhase

TypeScript
set scenePhase(value: ScenePhase)
Swift declaration
var scenePhase: ScenePhase { get set }

The current phase of the scene. The system sets this value to provide an indication of the operational state of a scene or collection of scenes. The exact meaning depends on where you access the value. For more information, see ``ScenePhase``.

get · iOS 26.0+

findContext

TypeScript
get findContext(): (FindContext) | null
Swift declaration
var findContext: FindContext? { get }
get · iOS 15.0+

isPresented

TypeScript
get isPresented(): boolean
Swift declaration
var isPresented: Bool { get }

A Boolean value that indicates whether the view associated with this environment is currently presented. You can read this value like any of the other ``EnvironmentValues`` by creating a property with the ``Environment`` property wrapper: @Environment(\.isPresented) private var isPresented Read the value inside a view if you need to know when SwiftUI presents that view. For example, you can take an action when SwiftUI presents a view by using the ``View/onChange(of:initial:_:)`` modifier: .onChange(of: isPresented) { _, isPresented in if isPresented { // Do something when first presented. } } This behaves differently than ``View/onAppear(perform:)``, which SwiftUI can call more than once for a given presentation, like when you navigate back to a view that's already in the navigation hierarchy. To dismiss the currently presented view, use ``EnvironmentValues/dismiss``.

get · iOS 15.0+

isSearching

TypeScript
get isSearching(): boolean
Swift declaration
var isSearching: Bool { get }

A Boolean value that indicates when the user is searching. You can read this value like any of the other ``EnvironmentValues``, by creating a property with the ``Environment`` property wrapper: @Environment(\.isSearching) private var isSearching Get the value to find out when the user interacts with a search field that's produced by one of the searchable modifiers, like ``View/searchable(text:placement:prompt:)``: struct SearchingExample: View { @State private var searchText = "" var body: some View { NavigationStack { SearchedView() .searchable(text: $searchText) } } } struct SearchedView: View { @Environment(\.isSearching) private var isSearching var body: some View { Text(isSearching ? "Searching!" : "Not searching.") } } When the user first taps or clicks in a search field, the `isSearching` property becomes `true`. When the user cancels the search operation, the property becomes `false`. To programmatically set the value to `false` and dismiss the search operation, use ``EnvironmentValues/dismissSearch``. > Important: Access the value from inside the searched view, as the example above demonstrates, rather than from the searched view’s parent. SwiftUI sets the value in the environment of the view that you apply the searchable modifier to, and doesn’t propagate the value up the view hierarchy.

get · iOS 13.0+

undoManager

TypeScript
get undoManager(): (_Foundation_UndoManager) | null
Swift declaration
var undoManager: UndoManager? { get }

The undo manager used to register a view's undo operations. This value is `nil` when the environment represents a context that doesn't support undo and redo operations. You can skip registration of an undo operation when this value is `nil`.

get · iOS 15.0+

dismissSearch

TypeScript
get dismissSearch(): DismissSearchAction
Swift declaration
var dismissSearch: DismissSearchAction { get }

An action that ends the current search interaction. Use this environment value to get the ``DismissSearchAction`` instance for the current ``Environment``. Then call the instance to dismiss the current search interaction. You call the instance directly because it defines a ``DismissSearchAction/callAsFunction()`` method that Swift calls when you call the instance. When you dismiss search, SwiftUI: * Sets ``EnvironmentValues/isSearching`` to `false`. * Clears any text from the search field. * Removes focus from the search field. > Note: Calling this instance has no effect if the user isn't interacting with a search field. Use this action to dismiss a search operation based on another user interaction. For example, consider a searchable view with a ``Button`` that presents more information about the first matching item from a collection: struct ContentView: View { @State private var searchText = "" var body: some View { NavigationStack { SearchedView(searchText: searchText) .searchable(text: $searchText) } } } private struct SearchedView: View { let searchText: String let items = ["a", "b", "c"] var filteredItems: [String] { items.filter { $0 == searchText.lowercased() } } @State private var isPresented = false @Environment(\.dismissSearch) private var dismissSearch var body: some View { if let item = filteredItems.first { Button("Details about \(item)") { isPresented = true } .sheet(isPresented: $isPresented) { NavigationStack { DetailView(item: item, dismissSearch: dismissSearch) } } } } } The button becomes visible only after the user enters search text that produces a match. When the user taps the button, SwiftUI shows a sheet that provides more information about the item, including an Add button for adding the item to a stored list of items: private struct DetailView: View { var item: String var dismissSearch: DismissSearchAction @Environment(\.dismiss) private var dismiss var body: some View { Text("Information about \(item).") .toolbar { Button("Add") { // Store the item here... dismiss() dismissSearch() } } } } People can dismiss the sheet by dragging it down, effectively canceling the operation, leaving the in-progress search interaction intact. Alternatively, people can tap the Add button to store the item. Because the person using your app is likely to be done with both the detail view and the search interaction at this point, the button's closure also uses the ``EnvironmentValues/dismiss`` property to dismiss the sheet, and the ``EnvironmentValues/dismissSearch`` property to reset the search field. > Important: Access the action from inside the searched view, as the example above demonstrates, rather than from the searched view’s parent, or another hierarchy, like that of a sheet. SwiftUI sets the value in the environment of the view that you apply the searchable modifier to, and doesn’t propagate the value up the view hierarchy.

get · iOS 17.0+

dismissWindow

TypeScript
get dismissWindow(): DismissWindowAction
Swift declaration
var dismissWindow: DismissWindowAction { get }

A window dismissal action stored in a view's environment. Use the `dismissWindow` environment value to get an ``DismissWindowAction`` instance for a given ``Environment``. Then call the instance to dismiss a window. You call the instance directly because it defines a ``DismissWindowAction/callAsFunction(id:)`` method that Swift calls when you call the instance. For example, you can define a button that dismisses an auxiliary window: @main struct MyApp: App { var body: some Scene { WindowGroup { ContentView() } #if os(macOS) Window("Auxiliary", id: "auxiliary") { AuxiliaryContentView() } #endif } } struct DismissWindowButton: View { @Environment(\.dismissWindow) private var dismissWindow var body: some View { Button("Close Auxiliary Window") { dismissWindow(id: "auxiliary") } } } If the window was opened with ``EnvironmentValues/pushWindow``, the presenting window will reappear when this action is performed.

get · iOS 16.0+

sidebarRowSize

TypeScript
get sidebarRowSize(): SidebarRowSize
Swift declaration
var sidebarRowSize: SidebarRowSize { get set }

The current size of sidebar rows. On macOS, reflects the value of the "Sidebar icon size" in System Settings' Appearance settings. This can be used to update the content shown in the sidebar in response to this size. And it can be overridden to force a sidebar to a particularly size, regardless of the user preference. On other platforms, the value is always `.medium` and setting a different value has no effect. SwiftUI views like `Label` automatically adapt to the sidebar row size.

set · iOS 16.0+

sidebarRowSize

TypeScript
set sidebarRowSize(value: SidebarRowSize)
Swift declaration
var sidebarRowSize: SidebarRowSize { get set }

The current size of sidebar rows. On macOS, reflects the value of the "Sidebar icon size" in System Settings' Appearance settings. This can be used to update the content shown in the sidebar in response to this size. And it can be overridden to force a sidebar to a particularly size, regardless of the user preference. On other platforms, the value is always `.medium` and setting a different value has no effect. SwiftUI views like `Label` automatically adapt to the sidebar row size.

get · iOS 17.0+

badgeProminence

TypeScript
get badgeProminence(): BadgeProminence
Swift declaration
var badgeProminence: BadgeProminence { get set }

The prominence to apply to badges associated with this environment. The default is ``BadgeProminence/standard``.

set · iOS 17.0+

badgeProminence

TypeScript
set badgeProminence(value: BadgeProminence)
Swift declaration
var badgeProminence: BadgeProminence { get set }

The prominence to apply to badges associated with this environment. The default is ``BadgeProminence/standard``.

get · iOS 17.0+

isSceneCaptured

TypeScript
get isSceneCaptured(): boolean
Swift declaration
var isSceneCaptured: Bool { get set }

The current capture state. Use this value to determine whether the scene is actively being cloned to another destination (like during AirPlay) or is being mirrored or recorded. Your app can respond to changes in this value to take appropriate action, like obscuring content.

set · iOS 17.0+

isSceneCaptured

TypeScript
set isSceneCaptured(value: boolean)
Swift declaration
var isSceneCaptured: Bool { get set }

The current capture state. Use this value to determine whether the scene is actively being cloned to another destination (like during AirPlay) or is being mirrored or recorded. Your app can respond to changes in this value to take appropriate action, like obscuring content.

get · iOS 16.0+

isScrollEnabled

TypeScript
get isScrollEnabled(): boolean
Swift declaration
var isScrollEnabled: Bool { get set }

A Boolean value that indicates whether any scroll views associated with this environment allow scrolling to occur. The default value is `true`. Use the ``View/scrollDisabled(_:)`` modifier to configure this property.

set · iOS 16.0+

isScrollEnabled

TypeScript
set isScrollEnabled(value: boolean)
Swift declaration
var isScrollEnabled: Bool { get set }

A Boolean value that indicates whether any scroll views associated with this environment allow scrolling to occur. The default value is `true`. Use the ``View/scrollDisabled(_:)`` modifier to configure this property.

get · iOS 18.0+

tabBarPlacement

TypeScript
get tabBarPlacement(): (TabBarPlacement) | null
Swift declaration
var tabBarPlacement: TabBarPlacement? { get }

The current placement of the tab bar. Note that this value is only set within the content views of a ``TabView``. A `nil` value corresponds to an undefined placement.

get · iOS 15.0+

keyboardShortcut

TypeScript
get keyboardShortcut(): (KeyboardShortcut) | null
Swift declaration
var keyboardShortcut: KeyboardShortcut? { get }

The keyboard shortcut that buttons in this environment will be triggered with. This is particularly useful in button styles when a button's appearance depends on the shortcut associated with it. On macOS, for example, when a button is bound to the Return key, it is typically drawn with a special emphasis. This happens automatically when using the built-in button styles, and can be implemented manually in custom styles using this environment key: private struct MyButtonStyle: ButtonStyle { @Environment(\.keyboardShortcut) private var shortcut: KeyboardShortcut? func makeBody(configuration: Configuration) -> some View { let labelFont = Font.body .weight(shortcut == .defaultAction ? .bold : .regular) configuration.label .font(labelFont) } } If no keyboard shortcut has been applied to the view or its ancestor, then the environment value will be `nil`.

get · iOS 18.0+

labelsVisibility

TypeScript
get labelsVisibility(): _SwiftUICore_Visibility
Swift declaration
var labelsVisibility: Visibility { get set }

The labels visibility set by ``View/labelsVisibility(_:)``. Read this environment value from within a view to obtain the preferred visibility for labels within the hierarchy. If you would like to dynamically hide the label of your custom view, make sure to include an accessibility label via the ``View/accessibilityLabel(content:)`` modifier as illustrated below: @Environment(\.labelsVisibility) private var labelsVisibility var body: some View { VStack { QuizCardView() if labelsVisibility != .hidden { label } } .accessibilityLabel { label } } private var label: some View { Text("Quiz Card") }

set · iOS 18.0+

labelsVisibility

TypeScript
set labelsVisibility(value: _SwiftUICore_Visibility)
Swift declaration
var labelsVisibility: Visibility { get set }

The labels visibility set by ``View/labelsVisibility(_:)``. Read this environment value from within a view to obtain the preferred visibility for labels within the hierarchy. If you would like to dynamically hide the label of your custom view, make sure to include an accessibility label via the ``View/accessibilityLabel(content:)`` modifier as illustrated below: @Environment(\.labelsVisibility) private var labelsVisibility var body: some View { VStack { QuizCardView() if labelsVisibility != .hidden { label } } .accessibilityLabel { label } } private var label: some View { Text("Quiz Card") }

get · iOS 13.0+ · Deprecated in iOS 100000.0

presentationMode

TypeScript
get presentationMode(): _SwiftUICore_Binding<PresentationMode>
Swift declaration
var presentationMode: Binding<PresentationMode> { get }

A binding to the current presentation mode of the view associated with this environment.

get · iOS 18.0+

toolbarLabelStyle

TypeScript
get toolbarLabelStyle(): (ToolbarLabelStyle) | null
Swift declaration
var toolbarLabelStyle: ToolbarLabelStyle? { get }

The label style to apply to controls within a toolbar. The default is `nil` for items outside the window toolbar.

get · iOS 17.0+

buttonRepeatBehavior

TypeScript
get buttonRepeatBehavior(): ButtonRepeatBehavior
Swift declaration
var buttonRepeatBehavior: ButtonRepeatBehavior { get }

Whether buttons with this associated environment should repeatedly trigger their actions on prolonged interactions. A value of `enabled` means that buttons will be able to repeatedly trigger their action, and `disabled` means they should not. A value of `automatic` means that buttons will defer to default behavior.

get · iOS 17.0+

isFocusEffectEnabled

TypeScript
get isFocusEffectEnabled(): boolean
Swift declaration
var isFocusEffectEnabled: Bool { get set }

A Boolean value that indicates whether the view associated with this environment allows focus effects to be displayed. The default value is `true`.

set · iOS 17.0+

isFocusEffectEnabled

TypeScript
set isFocusEffectEnabled(value: boolean)
Swift declaration
var isFocusEffectEnabled: Bool { get set }

A Boolean value that indicates whether the view associated with this environment allows focus effects to be displayed. The default value is `true`.

get · iOS 13.0+

managedObjectContext

TypeScript
get managedObjectContext(): _CoreData_NSManagedObjectContext
Swift declaration
var managedObjectContext: NSManagedObjectContext { get set }
set · iOS 13.0+

managedObjectContext

TypeScript
set managedObjectContext(value: _CoreData_NSManagedObjectContext)
Swift declaration
var managedObjectContext: NSManagedObjectContext { get set }
get · iOS 26.0+

supportsRemoteScenes

TypeScript
get supportsRemoteScenes(): boolean
Swift declaration
var supportsRemoteScenes: Bool { get }

Indicates if the current device supports presenting a ``RemoteImmersiveSpace`` on a remote device. Use this to provide affordances for displaying your app's content on a remote device. struct NewSolarSystemImmersiveSpaceButton: View { @Environment(\.openImmersiveSpace) private var openImmersiveSpace @Environment(\.supportsRemoteScenes) private var supportsRemoteScenes var body: some View { Button("Present Solar System") { Task { await openImmersiveSpace(id: "solarSystem") } } .disabled(!supportsRemoteScenes) .help(!supportsRemoteScenes ? "Presenting remote scenes is not supported on this device." : "") } }

get · iOS 18.0+

writingToolsBehavior

TypeScript
get writingToolsBehavior(): (WritingToolsBehavior) | null
Swift declaration
var writingToolsBehavior: WritingToolsBehavior? { get }

The current Writing Tools behavior for text and text input. This can be used by views that provide a custom text input to determine the Writing Tools editing experience to provide.

get · iOS 13.0+ · Deprecated in iOS 100000.0

disableAutocorrection

TypeScript
get disableAutocorrection(): (boolean) | null
Swift declaration
var disableAutocorrection: Bool? { get set }

A Boolean value that determines whether the view hierarchy has auto-correction enabled. When the value is `nil`, SwiftUI uses the system default. The default value is `nil`.

set · iOS 13.0+ · Deprecated in iOS 100000.0

disableAutocorrection

TypeScript
set disableAutocorrection(value: (boolean) | null)
Swift declaration
var disableAutocorrection: Bool? { get set }

A Boolean value that determines whether the view hierarchy has auto-correction enabled. When the value is `nil`, SwiftUI uses the system default. The default value is `nil`.

get · iOS 17.0+

documentConfiguration

TypeScript
get documentConfiguration(): (DocumentConfiguration) | null
Swift declaration
var documentConfiguration: DocumentConfiguration? { get }

The configuration of a document in a ``DocumentGroup``. The value is `nil` for views that are not enclosed in a ``DocumentGroup``. For example, if the app shows the document path in the footer of each document, it can get the URL from the environment: struct ContentView: View { @Binding var document: TextDocument @Environment(\.documentConfiguration) private var configuration: DocumentConfiguration? var body: some View { … Label( configuration?.fileURL?.path ?? "", systemImage: "folder.circle" ) } }

get · iOS 17.0+

springLoadingBehavior

TypeScript
get springLoadingBehavior(): SpringLoadingBehavior
Swift declaration
var springLoadingBehavior: SpringLoadingBehavior { get }

The behavior of spring loaded interactions for the views associated with this environment. Spring loading refers to a view being activated during a drag and drop interaction. On iOS this can occur when pausing briefly on top of a view with dragged content. On macOS this can occur with similar brief pauses or on pressure-sensitive systems by "force clicking" during the drag. This has no effect on tvOS or watchOS. This is commonly used with views that have a navigation or presentation effect, allowing the destination to be revealed without pausing the drag interaction. For example, a button that reveals a list of folders that a dragged item can be dropped onto. A value of `enabled` means that a view should support spring loaded interactions if it is able, and `disabled` means it should not. A value of `automatic` means that a view should follow its default behavior, such as a `TabView` automatically allowing spring loading, but a `Picker` with `segmented` style would not.

get · iOS 18.0+

textSelectionAffinity

TypeScript
get textSelectionAffinity(): TextSelectionAffinity
Swift declaration
var textSelectionAffinity: TextSelectionAffinity { get set }

A representation of the direction or association of a selection or cursor relative to a text character. This concept becomes much more prominent when dealing with bidirectional text (text that contains both LTR and RTL scripts, like English and Arabic combined). You can configure the selection affinity on a given hierarchy by using the ``View/textSelectionAffinity(_:)`` modifier.

set · iOS 18.0+

textSelectionAffinity

TypeScript
set textSelectionAffinity(value: TextSelectionAffinity)
Swift declaration
var textSelectionAffinity: TextSelectionAffinity { get set }

A representation of the direction or association of a selection or cursor relative to a text character. This concept becomes much more prominent when dealing with bidirectional text (text that contains both LTR and RTL scripts, like English and Arabic combined). You can configure the selection affinity on a given hierarchy by using the ``View/textSelectionAffinity(_:)`` modifier.

get · iOS 13.0+

autocorrectionDisabled

TypeScript
get autocorrectionDisabled(): boolean
Swift declaration
@export(implementation) var autocorrectionDisabled: Bool { get set }

A Boolean value that determines whether the view hierarchy has auto-correction enabled. The default value is `false`.

set · iOS 13.0+

autocorrectionDisabled

TypeScript
set autocorrectionDisabled(value: boolean)
Swift declaration
@export(implementation) var autocorrectionDisabled: Bool { get set }

A Boolean value that determines whether the view hierarchy has auto-correction enabled. The default value is `false`.

get · iOS 26.0+

labelReservedIconWidth

TypeScript
get labelReservedIconWidth(): (number) | null
Swift declaration
var labelReservedIconWidth: CGFloat? { get }

The width reserved for icons in labels. The value that should be used for the reserved icon width in labels. To set a different value for labels, use the `labelReservedIconWidth` modifier. This environment value can be used in custom label styles to allow changing the reserved icon width using the `labelReservedIconWidth` modifier. If the value is `nil`, a default behavior to size the icon should be used instead.

get · iOS 13.0+

defaultMinListRowHeight

TypeScript
get defaultMinListRowHeight(): number
Swift declaration
var defaultMinListRowHeight: CGFloat { get set }

The default minimum height of rows in a list. The height of list rows is bounded below by this default value, and is otherwise determined by the height of the row's content and the row insets.

set · iOS 13.0+

defaultMinListRowHeight

TypeScript
set defaultMinListRowHeight(value: number)
Swift declaration
var defaultMinListRowHeight: CGFloat { get set }

The default minimum height of rows in a list. The height of list rows is bounded below by this default value, and is otherwise determined by the height of the row's content and the row insets.

get · iOS 18.0+

isTabBarShowingSections

TypeScript
get isTabBarShowingSections(): boolean
Swift declaration
var isTabBarShowingSections: Bool { get }

A Boolean value that determines whether a tab view shows the expanded contents of a tab section.

get · iOS 26.0+

labelIconToTitleSpacing

TypeScript
get labelIconToTitleSpacing(): (number) | null
Swift declaration
var labelIconToTitleSpacing: CGFloat? { get }

The spacing between the icon and title of a label. The value that should be used for the icon-to-title spacing in labels. To set a different value for labels, use the `labelIconToTitleSpacing` modifier. This environment value can be used in custom label styles to allow changing the icon-to-title spacing using the `labelIconToTitleSpacing` modifier. If the value is `nil`, a default value should be used instead.

get · iOS 15.0+

menuIndicatorVisibility

TypeScript
get menuIndicatorVisibility(): _SwiftUICore_Visibility
Swift declaration
var menuIndicatorVisibility: Visibility { get set }

The menu indicator visibility to apply to controls within a view. - Note: On tvOS, the standard button styles do not include a menu indicator, so this modifier will have no effect when using a built-in button style. You can implement an indicator in your own ``ButtonStyle`` implementation by checking the value of this environment value.

set · iOS 15.0+

menuIndicatorVisibility

TypeScript
set menuIndicatorVisibility(value: _SwiftUICore_Visibility)
Swift declaration
var menuIndicatorVisibility: Visibility { get set }

The menu indicator visibility to apply to controls within a view. - Note: On tvOS, the standard button styles do not include a menu indicator, so this modifier will have no effect when using a built-in button style. You can implement an indicator in your own ``ButtonStyle`` implementation by checking the value of this environment value.

get · iOS 16.0+

supportsMultipleWindows

TypeScript
get supportsMultipleWindows(): boolean
Swift declaration
var supportsMultipleWindows: Bool { get }

A Boolean value that indicates whether the current platform supports opening multiple windows. Read this property from the environment to determine if your app can use the ``EnvironmentValues/openWindow`` action to open new windows: struct NewMailViewerButton: View { @Environment(\.supportsMultipleWindows) private var supportsMultipleWindows @Environment(\.openWindow) private var openWindow var body: some View { Button("Open New Window") { openWindow(id: "mail-viewer") } .disabled(!supportsMultipleWindows) } } The reported value depends on both the platform and how you configure your app: * In macOS, this property returns `true` for any app that uses the SwiftUI app lifecycle. * In iPadOS, this property returns `true` for any app that uses the SwiftUI app lifecycle and has the Information Property List key <doc://com.apple.documentation/documentation/BundleResources/Information-Property-List/UIApplicationSceneManifest/UIApplicationSupportsMultipleScenes> set to `true`. * For all other platforms and configurations, the value returns `false`. If the value is false and you try to open a window, SwiftUI ignores the action and logs a runtime error.

get · iOS 27.0+

isTabViewSidebarAvailable

TypeScript
get isTabViewSidebarAvailable(): boolean
Swift declaration
var isTabViewSidebarAvailable: Bool { get }

A Boolean value that indicates whether a tab sidebar is available within the content of a surrounding ``TabView``. This value is only meaningful inside the content views of a ``TabView`` that uses a sidebar-capable style such as ``TabViewStyle/sidebarAdaptable``. Reading it from a view that is not nested inside a `TabView`'s content — for example, a view above the `TabView` in the hierarchy — returns `false`. struct ContentView: View { var body: some View { TabView { Tab("Home", systemImage: "house") { HomeTab() } } .tabViewStyle(.sidebarAdaptable) } } struct HomeTab: View { @Environment(\.isTabViewSidebarAvailable) private var isTabViewSidebarAvailable var body: some View { if isTabViewSidebarAvailable { // Sidebar is (or can become) visible — adjust UI. } else { // No sidebar in this context. } } } Use this value to gate behaviors or UI that depend on the sidebar's availability, rather than inspecting size classes directly.

get · iOS 13.0+

defaultMinListHeaderHeight

TypeScript
get defaultMinListHeaderHeight(): (number) | null
Swift declaration
var defaultMinListHeaderHeight: CGFloat? { get set }

The default minimum height of a header in a list. When this value is `nil`, the system chooses the appropriate height. The default is `nil`.

set · iOS 13.0+

defaultMinListHeaderHeight

TypeScript
set defaultMinListHeaderHeight(value: (number) | null)
Swift declaration
var defaultMinListHeaderHeight: CGFloat? { get set }

The default minimum height of a header in a list. When this value is `nil`, the system chooses the appropriate height. The default is `nil`.

get · iOS 16.0+

searchSuggestionsPlacement

TypeScript
get searchSuggestionsPlacement(): SearchSuggestionsPlacement
Swift declaration
var searchSuggestionsPlacement: SearchSuggestionsPlacement { get }

The current placement of search suggestions. Search suggestions render based on the platform and surrounding context in which you place the searchable modifier containing suggestions. You can render search suggestions in two ways: * In a menu attached to the search field. * Inline with the main content of the app. You find the current search suggestion placement by querying the ``EnvironmentValues/searchSuggestionsPlacement`` in your search suggestions. enum FruitSuggestion: String, Identifiable { case apple, banana, orange var id: Self { self } } @State private var text: String = "" @State private var suggestions: [FruitSuggestion] = [] var body: some View { MainContent() .searchable(text: $text) { FruitSuggestions(suggestions: suggestions) } } struct FruitSuggestions: View { var suggestions: [FruitSuggestion] @Environment(\.searchSuggestionsPlacement) private var placement var body: some View { if shouldRender { ForEach(suggestions) { suggestion in Text(suggestion.rawValue.capitalized) .searchCompletion(suggestion.rawValue) } } } var shouldRender: Bool { #if os(iOS) placement == .menu #else true #endif } } In the above example, search suggestions only render in iOS if the searchable modifier displays them in a menu. You might want to do this to render suggestions in your own list alongside your own search results when they would render in a list.

get · iOS 18.0+

isUserAuthenticationEnabled

TypeScript
get isUserAuthenticationEnabled(): boolean
Swift declaration
var isUserAuthenticationEnabled: Bool { get }

The current system user authentication enablement status. Use this value to determine whether the system will issue additional device-owner authentication challenges before revealing this piece of user interface from under a system-installed shield. Your app can respond to changes in this value to take appropriate action, like installing or uninstalling a bespoke UI shield for sensitive content.

get · iOS 16.0+

scrollDismissesKeyboardMode

TypeScript
get scrollDismissesKeyboardMode(): ScrollDismissesKeyboardMode
Swift declaration
var scrollDismissesKeyboardMode: ScrollDismissesKeyboardMode { get set }

The way that scrollable content interacts with the software keyboard. The default value is ``ScrollDismissesKeyboardMode/automatic``. Use the ``View/scrollDismissesKeyboard(_:)`` modifier to configure this property.

set · iOS 16.0+

scrollDismissesKeyboardMode

TypeScript
set scrollDismissesKeyboardMode(value: ScrollDismissesKeyboardMode)
Swift declaration
var scrollDismissesKeyboardMode: ScrollDismissesKeyboardMode { get set }

The way that scrollable content interacts with the software keyboard. The default value is ``ScrollDismissesKeyboardMode/automatic``. Use the ``View/scrollDismissesKeyboard(_:)`` modifier to configure this property.

get · iOS 17.5+

preferredPencilSqueezeAction

TypeScript
get preferredPencilSqueezeAction(): PencilPreferredAction
Swift declaration
var preferredPencilSqueezeAction: PencilPreferredAction { get }

The action that the user prefers to perform when squeezing their Apple Pencil, as selected in the Settings app. You can read this value by creating a property with the ``Environment`` property wrapper and using it inside the action closure of the ``View/onPencilSqueeze(perform:)`` view modifier as an indication of what to do when the user squeezes their Apple Pencil: ``` @Environment(\.preferredPencilSqueezeAction) private var preferredAction var body: some View { MyDrawingCanvas() .onPencilSqueeze { phase in switch (phase, preferredAction) { ... } } } ``` In macOS, this value cannot be changed by users and is always set to ``PencilPreferredAction/showContextualPalette``.

get · iOS 16.4+

verticalScrollBounceBehavior

TypeScript
get verticalScrollBounceBehavior(): ScrollBounceBehavior
Swift declaration
var verticalScrollBounceBehavior: ScrollBounceBehavior { get set }

The scroll bounce mode for the vertical axis of scrollable views. Use the ``View/scrollBounceBehavior(_:axes:)`` view modifier to set this value in the ``Environment``.

set · iOS 16.4+

verticalScrollBounceBehavior

TypeScript
set verticalScrollBounceBehavior(value: ScrollBounceBehavior)
Swift declaration
var verticalScrollBounceBehavior: ScrollBounceBehavior { get set }

The scroll bounce mode for the vertical axis of scrollable views. Use the ``View/scrollBounceBehavior(_:axes:)`` view modifier to set this value in the ``Environment``.

get · iOS 16.4+

horizontalScrollBounceBehavior

TypeScript
get horizontalScrollBounceBehavior(): ScrollBounceBehavior
Swift declaration
var horizontalScrollBounceBehavior: ScrollBounceBehavior { get set }

The scroll bounce mode for the horizontal axis of scrollable views. Use the ``View/scrollBounceBehavior(_:axes:)`` view modifier to set this value in the ``Environment``.

set · iOS 16.4+

horizontalScrollBounceBehavior

TypeScript
set horizontalScrollBounceBehavior(value: ScrollBounceBehavior)
Swift declaration
var horizontalScrollBounceBehavior: ScrollBounceBehavior { get set }

The scroll bounce mode for the horizontal axis of scrollable views. Use the ``View/scrollBounceBehavior(_:axes:)`` view modifier to set this value in the ``Environment``.

get · iOS 17.5+

preferredPencilDoubleTapAction

TypeScript
get preferredPencilDoubleTapAction(): PencilPreferredAction
Swift declaration
var preferredPencilDoubleTapAction: PencilPreferredAction { get }

The action that the user prefers to perform after double-tapping their Apple Pencil, as selected in the Settings app. You can read this value by creating a property with the ``Environment`` property wrapper and using it inside the action closure of the ``View/onPencilDoubleTap(perform:)`` view modifier as an indication of what to do after the user double-taps their Apple Pencil: ``` @Environment(\.preferredPencilDoubleTapAction) private var preferredAction var body: some View { MyDrawingCanvas() .onPencilDoubleTap { value in switch preferredAction { ... } } } ``` In macOS, this value cannot be changed by users and is always set to ``PencilPreferredAction/switchEraser``.

get · iOS 26.0+

tabViewBottomAccessoryPlacement

TypeScript
get tabViewBottomAccessoryPlacement(): (TabViewBottomAccessoryPlacement) | null
Swift declaration
var tabViewBottomAccessoryPlacement: TabViewBottomAccessoryPlacement? { get }

The current placement of the tab view bottom accessory. A `nil` value corresponds to an undefined placement.

get · iOS 16.0+

accessibilityQuickActionsEnabled

TypeScript
get accessibilityQuickActionsEnabled(): boolean
Swift declaration
var accessibilityQuickActionsEnabled: Bool { get }

A Boolean that indicates whether the quick actions feature is enabled. The system uses quick actions to provide users with a fast alternative interaction method. Quick actions can be presented to users with a textual banner at the top of their screen and/or an outline around a view that is already on screen.

get · iOS 17.0+

navigationLinkIndicatorVisibility

TypeScript
get navigationLinkIndicatorVisibility(): _SwiftUICore_Visibility
Swift declaration
@export(implementation) var navigationLinkIndicatorVisibility: Visibility { get }

A value that says whether a built-in navigation link would show a disclosure indicator in the current context. You can set this value with ``View/navigationLinkIndicatorVisibility(_:)``.

get · iOS 27.0+

systemPrefersReducedResourceUsage

TypeScript
get systemPrefersReducedResourceUsage(): boolean
Swift declaration
var systemPrefersReducedResourceUsage: Bool { get set }

A boolean value indicating whether the system would prefer the app to reduce its overall resource usage. When this value is `true`, the system has entered a state where it would prefer apps to scale back resource-intensive work. The default value is `false`. Use this to avoid or reduce expensive work. For example: - Gate or simplify resource-intensive UI, such as 3D or AR viewers, advanced camera modes, or live effects. - Choose lighter-weight paths, such as lower-resolution assets or fewer simultaneous operations. - Defer or shrink non-essential background work, such as prefetching or precomputation. Avoid performing or scheduling expensive work in response to changes in this property, as this could worsen resource usage. - Tip: For in-memory caching, consider using ``NSCache`` with ``NSPurgeableData``, which automatically evicts entries under system memory pressure. Use `systemPrefersReducedResourceUsage` for higher-level decisions that ``NSCache`` cannot make on its own. When accessed outside in an `App` or `Scene` struct, this defaults to an app-wide aggregate value based on all scenes.

set · iOS 27.0+

systemPrefersReducedResourceUsage

TypeScript
set systemPrefersReducedResourceUsage(value: boolean)
Swift declaration
var systemPrefersReducedResourceUsage: Bool { get set }

A boolean value indicating whether the system would prefer the app to reduce its overall resource usage. When this value is `true`, the system has entered a state where it would prefer apps to scale back resource-intensive work. The default value is `false`. Use this to avoid or reduce expensive work. For example: - Gate or simplify resource-intensive UI, such as 3D or AR viewers, advanced camera modes, or live effects. - Choose lighter-weight paths, such as lower-resolution assets or fewer simultaneous operations. - Defer or shrink non-essential background work, such as prefetching or precomputation. Avoid performing or scheduling expensive work in response to changes in this property, as this could worsen resource usage. - Tip: For in-memory caching, consider using ``NSCache`` with ``NSPurgeableData``, which automatically evicts entries under system memory pressure. Use `systemPrefersReducedResourceUsage` for higher-level decisions that ``NSCache`` cannot make on its own. When accessed outside in an `App` or `Scene` struct, this defaults to an app-wide aggregate value based on all scenes.

get · iOS 16.0+

verticalScrollIndicatorVisibility

TypeScript
get verticalScrollIndicatorVisibility(): ScrollIndicatorVisibility
Swift declaration
var verticalScrollIndicatorVisibility: ScrollIndicatorVisibility { get set }

The visiblity to apply to scroll indicators of any vertically scrollable content.

set · iOS 16.0+

verticalScrollIndicatorVisibility

TypeScript
set verticalScrollIndicatorVisibility(value: ScrollIndicatorVisibility)
Swift declaration
var verticalScrollIndicatorVisibility: ScrollIndicatorVisibility { get set }

The visiblity to apply to scroll indicators of any vertically scrollable content.

get · iOS 16.0+

horizontalScrollIndicatorVisibility

TypeScript
get horizontalScrollIndicatorVisibility(): ScrollIndicatorVisibility
Swift declaration
var horizontalScrollIndicatorVisibility: ScrollIndicatorVisibility { get set }

The visibility to apply to scroll indicators of any horizontally scrollable content.

set · iOS 16.0+

horizontalScrollIndicatorVisibility

TypeScript
set horizontalScrollIndicatorVisibility(value: ScrollIndicatorVisibility)
Swift declaration
var horizontalScrollIndicatorVisibility: ScrollIndicatorVisibility { get set }

The visibility to apply to scroll indicators of any horizontally scrollable content.

get · iOS 16.0+

rename

TypeScript
get rename(): (RenameAction) | null
Swift declaration
var rename: RenameAction? { get }

An action that activates the standard rename interaction. Use the ``View/renameAction(_:)`` modifier to configure the rename action in the environment.

get · iOS 15.0+

dismiss

TypeScript
get dismiss(): DismissAction
Swift declaration
var dismiss: DismissAction { get }

An action that dismisses the current presentation. Use this environment value to get the ``DismissAction`` instance for the current ``Environment``. Then call the instance to perform the dismissal. You call the instance directly because it defines a ``DismissAction/callAsFunction()`` method that Swift calls when you call the instance. You can use this action to: * Dismiss a modal presentation, like a sheet or a popover. * Pop the current view from a ``NavigationStack``. On apps targetting iOS 18 and aligned releases, you also use the dismiss action to pop the implicit stack of a collapsed ``NavigationSplitView``, or clear the equivalent state in an expanded split view. The specific behavior of the action depends on where you call it from. For example, you can create a button that calls the ``DismissAction`` inside a view that acts as a sheet: private struct SheetContents: View { @Environment(\.dismiss) private var dismiss var body: some View { Button("Done") { dismiss() } } } When you present the `SheetContents` view, someone can dismiss the sheet by tapping or clicking the sheet's button: private struct DetailView: View { @State private var isSheetPresented = false var body: some View { Button("Show Sheet") { isSheetPresented = true } .sheet(isPresented: $isSheetPresented) { SheetContents() } } } Be sure that you define the action in the appropriate environment. For example, don't reorganize the `DetailView` in the example above so that it creates the `dismiss` property and calls it from the ``View/sheet(item:onDismiss:content:)`` view modifier's `content` closure: private struct DetailView: View { @State private var isSheetPresented = false @Environment(\.dismiss) private var dismiss // Applies to DetailView. var body: some View { Button("Show Sheet") { isSheetPresented = true } .sheet(isPresented: $isSheetPresented) { Button("Done") { dismiss() // Fails to dismiss the sheet. } } } } If you do this, the sheet fails to dismiss because the action applies to the environment where you declared it, which is that of the detail view, rather than the sheet. In fact, in macOS and iPadOS, if the `DetailView` is the root view of a window, the dismiss action closes the window instead. The dismiss action has no effect on a view that isn't currently presented. If you need to query whether SwiftUI is currently presenting a view, read the ``EnvironmentValues/isPresented`` environment value. - Note: While the dismiss action can be used to a close window that you create with ``WindowGroup`` or ``Window``, prefer ``DismissWindowAction`` for that use case instead.

get · iOS 15.0+

refresh

TypeScript
get refresh(): (RefreshAction) | null
Swift declaration
var refresh: RefreshAction? { get }

A refresh action stored in a view's environment. When this environment value contains an instance of the ``RefreshAction`` structure, certain built-in views in the corresponding ``Environment`` begin offering a refresh capability. They apply the instance's handler to any refresh operation that the user initiates. By default, the environment value is `nil`, but you can use the ``View/refreshable(action:)`` modifier to create and store a new refresh action that uses the handler that you specify: List(mailbox.conversations) { conversation in ConversationCell(conversation) } .refreshable { await mailbox.fetch() } On iOS and iPadOS, the ``List`` in the example above offers a pull to refresh gesture because it detects the refresh action. When the user drags the list down and releases, the list calls the action's handler. Because SwiftUI declares the handler as asynchronous, it can safely make long-running asynchronous calls, like fetching network data. ### Refreshing custom views You can also offer refresh capability in your custom views. Read the `refresh` environment value to get the ``RefreshAction`` instance for a given ``Environment``. If you find a non-`nil` value, change your view's appearance or behavior to offer the refresh to the user, and call the instance to conduct the refresh. You can call the refresh instance directly because it defines a ``RefreshAction/callAsFunction()`` method that Swift calls when you call the instance: struct RefreshableView: View { @Environment(\.refresh) private var refresh var body: some View { Button("Refresh") { Task { await refresh?() } } .disabled(refresh == nil) } } Be sure to call the handler asynchronously by preceding it with `await`. Because the call is asynchronous, you can use its lifetime to indicate progress to the user. For example, you can reveal an indeterminate ``ProgressView`` before calling the handler, and hide it when the handler completes. If your code isn't already in an asynchronous context, create a <doc://com.apple.documentation/documentation/Swift/Task> for the method to run in. If you do this, consider adding a way for the user to cancel the task. For more information, see [Concurrency](https://docs.swift.org/swift-book/LanguageGuide/Concurrency.html) in *The Swift Programming Language*.

get · iOS 13.0+

editMode

TypeScript
get editMode(): (_SwiftUICore_Binding<EditMode>) | null
Swift declaration
var editMode: Binding<EditMode>? { get set }

An indication of whether the user can edit the contents of a view associated with this environment. Read this environment value to receive a optional binding to the edit mode state. The binding contains an ``EditMode`` value that indicates whether edit mode is active, and that you can use to change the mode. To learn how to read an environment value, see ``EnvironmentValues``. Certain built-in views automatically alter their appearance and behavior in edit mode. For example, a ``List`` with a ``ForEach`` that's configured with the ``DynamicViewContent/onDelete(perform:)`` or ``DynamicViewContent/onMove(perform:)`` modifier provides controls to delete or move list items while in edit mode. On devices without an attached keyboard and mouse or trackpad, people can make multiple selections in lists only when edit mode is active. You can also customize your own views to react to edit mode. The following example replaces a read-only ``Text`` view with an editable ``TextField``, checking for edit mode by testing the wrapped value's ``EditMode/isEditing`` property: @Environment(\.editMode) private var editMode @State private var name = "Maria Ruiz" var body: some View { Form { if editMode?.wrappedValue.isEditing == true { TextField("Name", text: $name) } else { Text(name) } } .animation(nil, value: editMode?.wrappedValue) .toolbar { // Assumes embedding this view in a NavigationView. EditButton() } } You can set the edit mode through the binding, or you can rely on an ``EditButton`` to do that for you, as the example above demonstrates. The button activates edit mode when the user taps the Edit button, and disables editing mode when the user taps Done.

set · iOS 13.0+

editMode

TypeScript
set editMode(value: (_SwiftUICore_Binding<EditMode>) | null)
Swift declaration
var editMode: Binding<EditMode>? { get set }

An indication of whether the user can edit the contents of a view associated with this environment. Read this environment value to receive a optional binding to the edit mode state. The binding contains an ``EditMode`` value that indicates whether edit mode is active, and that you can use to change the mode. To learn how to read an environment value, see ``EnvironmentValues``. Certain built-in views automatically alter their appearance and behavior in edit mode. For example, a ``List`` with a ``ForEach`` that's configured with the ``DynamicViewContent/onDelete(perform:)`` or ``DynamicViewContent/onMove(perform:)`` modifier provides controls to delete or move list items while in edit mode. On devices without an attached keyboard and mouse or trackpad, people can make multiple selections in lists only when edit mode is active. You can also customize your own views to react to edit mode. The following example replaces a read-only ``Text`` view with an editable ``TextField``, checking for edit mode by testing the wrapped value's ``EditMode/isEditing`` property: @Environment(\.editMode) private var editMode @State private var name = "Maria Ruiz" var body: some View { Form { if editMode?.wrappedValue.isEditing == true { TextField("Name", text: $name) } else { Text(name) } } .animation(nil, value: editMode?.wrappedValue) .toolbar { // Assumes embedding this view in a NavigationView. EditButton() } } You can set the edit mode through the binding, or you can rely on an ``EditButton`` to do that for you, as the example above demonstrates. The button activates edit mode when the user taps the Edit button, and disables editing mode when the user taps Done.

get · iOS 14.0+

isFocused

TypeScript
get isFocused(): boolean
Swift declaration
var isFocused: Bool { get }

Returns whether the nearest focusable ancestor has focus. If there is no focusable ancestor, the value is `false`.

get · iOS 16.0+

menuOrder

TypeScript
get menuOrder(): MenuOrder
Swift declaration
var menuOrder: MenuOrder { get set }

The preferred order of items for menus presented from this view. Set this value for a view hierarchy by calling the ``View/menuOrder(_:)`` view modifier.

set · iOS 16.0+

menuOrder

TypeScript
set menuOrder(value: MenuOrder)
Swift declaration
var menuOrder: MenuOrder { get set }

The preferred order of items for menus presented from this view. Set this value for a view hierarchy by calling the ``View/menuOrder(_:)`` view modifier.

init · iOS 18.0+

init

TypeScript
static initContentTypePrepareDocumentURL(title: _Foundation_LocalizedStringResource, contentType: _UniformTypeIdentifiers_UTType, prepareDocumentURL?: (() => Promise<(string) | null>)): Promise<NewDocumentButton<_SwiftUICore_Text>>
Swift declaration
@export(implementation) nonisolated init(_ title: LocalizedStringResource, contentType: UTType, prepareDocumentURL: @escaping () async throws -> URL? = { nil })

Creates and opens new documents. This initializer allows presenting a template picker, where a document can be prepopulated or preconfigured using a template. @State private var isTemplatePickerPresented = false @State private var documentCreationContinuation: CheckedContinuation<URL?, any Error>? var body: some Scene { DocumentGroupLaunchScene("My Documents") { NewDocumentButton("Start Writing…") NewDocumentButton("Choose a Template") { try await withCheckedThrowingContinuation { continuation in documentCreationContinuation = continuation isTemplatePickerPresented = true } } .fullScreenCover(isPresented: $isTemplatePickerPresented) { TemplatePicker( continuation: $documentCreationContinuation ) } } DocumentGroup(newDocument: TextDocument()) { configuration in MyDocumentView(document: configuration.$document)) } } struct TemplatePicker: View { @Binding var continuation: CheckedContinuation<URL?, any Error>? @Environment(\.dismiss) var dismiss var body: some View { VStack { Text("Choose a template") .font(.title) Button("Meeting minutes") { let document = makeMeetingMinutes() documentCreationContinuation?.resume(returning: document) dismiss() } Button("Letter") { let document = makeLetter() documentCreationContinuation?.resume(returning: document) dismiss() } Button("Cancel") { documentCreationContinuation?.resume(throwing: CancellationError()) dismiss() } } } private func makeMeetingMinutes() -> URL { ... } private func makeLetter() -> URL { ... } } - Parameters: - title: A title resource for the button title. - contentType: A content type of the document to create. - prepareDocumentURL: A closure that is called when a user presses the button. At this point, you can present a document template picker or another UI that allows users to choose a theme, configuration, or a template to create a document from. Return a prepared document, or throw an error if document creation failed. Return `nil` to request creation of an empty document.

init · iOS 18.0+

init

TypeScript
static initContentTypePrepareDocumentURL152(title: _SwiftUICore_LocalizedStringKey, contentType: _UniformTypeIdentifiers_UTType, prepareDocumentURL?: (() => Promise<(string) | null>)): NewDocumentButton<_SwiftUICore_Text>
Swift declaration
nonisolated init(_ title: LocalizedStringKey, contentType: UTType, prepareDocumentURL: @escaping () async throws -> URL? = { nil })

Creates and opens new documents. This initializer allows presenting a template picker, where a document can be prepopulated or preconfigured using a template. @State private var isTemplatePickerPresented = false @State private var documentCreationContinuation: CheckedContinuation<URL?, any Error>? var body: some Scene { DocumentGroupLaunchScene("My Documents") { NewDocumentButton("Start Writing…") NewDocumentButton("Choose a Template") { try await withCheckedThrowingContinuation { continuation in documentCreationContinuation = continuation isTemplatePickerPresented = true } } .fullScreenCover(isPresented: $isTemplatePickerPresented) { TemplatePicker( continuation: $documentCreationContinuation ) } } DocumentGroup(newDocument: TextDocument()) { configuration in MyDocumentView(document: configuration.$document)) } } struct TemplatePicker: View { @Binding var continuation: CheckedContinuation<URL?, any Error>? @Environment(\.dismiss) var dismiss var body: some View { VStack { Text("Choose a template") .font(.title) Button("Meeting minutes") { let document = makeMeetingMinutes() documentCreationContinuation?.resume(returning: document) dismiss() } Button("Letter") { let document = makeLetter() documentCreationContinuation?.resume(returning: document) dismiss() } Button("Cancel") { documentCreationContinuation?.resume(throwing: CancellationError()) dismiss() } } } private func makeMeetingMinutes() -> URL { ... } private func makeLetter() -> URL { ... } } - Parameters: - title: A title key for the button title. - contentType: A content type of the document to create. - prepareDocumentURL: A closure that is called when a user presses the button. At this point, you can present a document template picker or another UI that allows users to choose a theme, configuration, or a template to create a document from. Return a prepared document, or throw an error if document creation failed. Return `nil` to request creation of an empty document.

init · iOS 18.0+

init

TypeScript
static initContentTypePrepareDocumentURL26306(label: (_SwiftUICore_Text) | null, contentType: _UniformTypeIdentifiers_UTType, prepareDocumentURL?: (() => Promise<(string) | null>)): NewDocumentButton<_SwiftUICore_Text>
Swift declaration
nonisolated init(_ label: Text? = nil, contentType: UTType, prepareDocumentURL: @escaping () async throws -> URL? = { nil })

Creates and opens new documents. This initializer allows presenting a template picker, where a document can be prepopulated or preconfigured using a template. @State private var isTemplatePickerPresented = false @State private var documentCreationContinuation: CheckedContinuation<URL?, any Error>? var body: some Scene { DocumentGroupLaunchScene("My Documents") { NewDocumentButton(Text("Start Writing…")) NewDocumentButton(Text("Choose a Template")) { try await withCheckedThrowingContinuation { continuation in documentCreationContinuation = continuation isTemplatePickerPresented = true } } .fullScreenCover(isPresented: $isTemplatePickerPresented) { TemplatePicker( continuation: $documentCreationContinuation ) } } DocumentGroup(newDocument: TextDocument()) { configuration in MyDocumentView(document: configuration.$document)) } } struct TemplatePicker: View { @Binding var continuation: CheckedContinuation<URL?, any Error>? @Environment(\.dismiss) var dismiss var body: some View { VStack { Text("Choose a template") .font(.title) Button("Meeting minutes") { let document = makeMeetingMinutes() documentCreationContinuation?.resume(returning: document) dismiss() } Button("Letter") { let document = makeLetter() documentCreationContinuation?.resume(returning: document) dismiss() } Button("Cancel") { documentCreationContinuation?.resume(throwing: CancellationError()) dismiss() } } } private func makeMeetingMinutes() -> URL { ... } private func makeLetter() -> URL { ... } } - Parameters: - label: A label for the button. - contentType: A content type of the document to create. - prepareDocumentURL: A closure that is called when a user presses the button. At this point, you can present a document template picker or another UI that allows users to choose a theme, configuration, or a template to create a document from. Return a prepared document, or throw an error if document creation failed. Return `nil` to request creation of an empty document.

init · iOS 18.0+

init

TypeScript
static initContentTypePrepareDocumentURL75260(title: SDKHandle, contentType: _UniformTypeIdentifiers_UTType, prepareDocumentURL?: (() => Promise<(string) | null>)): NewDocumentButton<_SwiftUICore_Text>
Swift declaration
nonisolated init(_ title: some StringProtocol, contentType: UTType, prepareDocumentURL: @escaping () async throws -> URL? = { nil })

Creates and opens new documents. This initializer allows presenting a template picker, where a document can be prepopulated or preconfigured using a template. @State private var isTemplatePickerPresented = false @State private var documentCreationContinuation: CheckedContinuation<TextDocument?, any Error>? var body: some Scene { DocumentGroupLaunchScene("My Documents") { NewDocumentButton("Start Writing…") NewDocumentButton("Choose a Template", for: TextDocument.self) { try await withCheckedThrowingContinuation { continuation in documentCreationContinuation = continuation isTemplatePickerPresented = true } } .fullScreenCover(isPresented: $isTemplatePickerPresented) { TemplatePicker( continuation: $documentCreationContinuation ) } } DocumentGroup(newDocument: TextDocument()) { configuration in MyDocumentView(document: configuration.$document)) } } struct TemplatePicker: View { @Binding var continuation: CheckedContinuation<TextDocument?, any Error>? var body: some View { VStack { Text("Choose a template") .font(.title) Button("Meeting minutes") { let document = makeMeetingMinutes() documentCreationContinuation?.resume(returning: document) dismiss() } Button("Letter") { let document = makeLetter() documentCreationContinuation?.resume(returning: document) dismiss() } Button("Cancel") { documentCreationContinuation?.resume(throwing: CancellationError()) dismiss() } } } private func makeMeetingMinutes() -> TextDocument { ... } private func makeLetter() -> TextDocument { ... } } struct TextDocument: FileDocument { ... } - Parameters: - title: A title key for the button title. - contentType: A content type of the document to create. - prepareDocumentURL: A closure that is called when a user presses the button. At this point, you can present a document template picker or another UI that allows users to choose a theme, configuration, or a template to create a document from. Return a prepared document, or throw an error if document creation failed. Return `nil` to request creation of an empty document.

init · iOS 27.0+

init

TypeScript
static initContentTypeSourcePrepareDocumentURL(title: _Foundation_LocalizedStringResource, contentType: _UniformTypeIdentifiers_UTType, source: DocumentCreationSource, prepareDocumentURL?: (() => Promise<(string) | null>)): NewDocumentButton<_SwiftUICore_Text>
Swift declaration
nonisolated init(_ title: LocalizedStringResource, contentType: UTType, source: DocumentCreationSource, prepareDocumentURL: @escaping () async throws -> URL? = { nil })

Creates and opens new URL-based documents from a template picker. - Parameters: - title: A localized string resource for the button. - contentType: The content type of the document to create. - source: A source for the document creation flow. When a document is created, you can retrieve its source from ``FileDocumentConfiguration`` or ``URLDocumentConfiguration``. - prepareDocumentURL: Called when the user taps the button.

init · iOS 27.0+

init

TypeScript
static initContentTypeSourcePrepareDocumentURL47011(title: _SwiftUICore_LocalizedStringKey, contentType: _UniformTypeIdentifiers_UTType, source: DocumentCreationSource, prepareDocumentURL?: (() => Promise<(string) | null>)): NewDocumentButton<_SwiftUICore_Text>
Swift declaration
nonisolated init(_ title: LocalizedStringKey, contentType: UTType, source: DocumentCreationSource, prepareDocumentURL: @escaping () async throws -> URL? = { nil })

Creates and opens new URL-based documents from a template picker. - Parameters: - title: A title key for the button. - contentType: The content type of the document to create. - source: A source for the document creation flow. When a document is created, you can retrieve its source from ``FileDocumentConfiguration`` or ``URLDocumentConfiguration``. - prepareDocumentURL: Called when the user taps the button.

init · iOS 27.0+

init

TypeScript
static initContentTypeSourcePrepareDocumentURL26363(title: SDKHandle, contentType: _UniformTypeIdentifiers_UTType, source: DocumentCreationSource, prepareDocumentURL?: (() => Promise<(string) | null>)): NewDocumentButton<_SwiftUICore_Text>
Swift declaration
nonisolated init(_ title: some StringProtocol, contentType: UTType, source: DocumentCreationSource, prepareDocumentURL: @escaping () async throws -> URL? = { nil })

Creates and opens new URL-based documents from a template picker. - Parameters: - title: A title string for the button. - contentType: The content type of the document to create. - source: A source for the document creation flow. When a document is created, you can retrieve its source from ``FileDocumentConfiguration`` or ``URLDocumentConfiguration``. - prepareDocumentURL: Called when the user taps the button.

init · iOS 27.0+

init

TypeScript
static initContentTypeSource(title: _Foundation_LocalizedStringResource, contentType: (_UniformTypeIdentifiers_UTType) | null, source: DocumentCreationSource): NewDocumentButton<_SwiftUICore_Text>
Swift declaration
nonisolated init(_ title: LocalizedStringResource, contentType: UTType? = nil, source: DocumentCreationSource)

Creates and opens new documents, tagging them with a creation source. - Parameters: - title: A localized string resource to use as the button title. - contentType: An optional content type of the document to create. - source: A source for the document creation flow. When a document is created, you can retrieve its source from ``FileDocumentConfiguration`` or ``URLDocumentConfiguration``.

init · iOS 27.0+

init

TypeScript
static initContentTypeSource10053(title: _SwiftUICore_LocalizedStringKey, contentType: (_UniformTypeIdentifiers_UTType) | null, source: DocumentCreationSource): NewDocumentButton<_SwiftUICore_Text>
Swift declaration
nonisolated init(_ title: LocalizedStringKey, contentType: UTType? = nil, source: DocumentCreationSource)

Creates and opens new documents, tagging them with a creation source. - Parameters: - title: A title key to use as the button title. - contentType: An optional content type of the document to create. - source: A source for the document creation flow. When a document is created, you can retrieve its source from ``FileDocumentConfiguration`` or ``URLDocumentConfiguration``.

init · iOS 27.0+

init

TypeScript
static initContentTypeSource86793(label: (_SwiftUICore_Text) | null, contentType: (_UniformTypeIdentifiers_UTType) | null, source: DocumentCreationSource): NewDocumentButton<_SwiftUICore_Text>
Swift declaration
nonisolated init(_ label: Text? = nil, contentType: UTType? = nil, source: DocumentCreationSource)

Creates and opens new documents, tagging them with a creation source. extension DocumentCreationSource { static let brainstorming: Self = DocumentCreationSource(id: "brainstorming") } DocumentGroupLaunchScene("Meeting Minutes") { NewDocumentButton(Text("New meeting minutes…")) NewDocumentButton( Text("New brainstorming meeting…"), source: .brainstorming ) } - Parameters: - label: A label for the button. - contentType: An optional content type of the document to create. If not provided, the first content type of the first document type listed in the app definition is used. - source: A source for the document creation flow. When a document is created, you can retrieve its source from ``FileDocumentConfiguration`` or ``URLDocumentConfiguration``.

init · iOS 27.0+

init

TypeScript
static initContentTypeSource56971(title: SDKHandle, contentType: (_UniformTypeIdentifiers_UTType) | null, source: DocumentCreationSource): NewDocumentButton<_SwiftUICore_Text>
Swift declaration
nonisolated init(_ title: some StringProtocol, contentType: UTType? = nil, source: DocumentCreationSource)

Creates and opens new documents, tagging them with a creation source. - Parameters: - title: A title string to use as the button title. - contentType: An optional content type of the document to create. - source: A source for the document creation flow. When a document is created, you can retrieve its source from ``FileDocumentConfiguration`` or ``URLDocumentConfiguration``.

init · iOS 27.0+

init

TypeScript
static initContentTypeSource39347(label: (_SwiftUICore_Text) | null, contentType: _UniformTypeIdentifiers_UTType, source: DocumentCreationSource, prepareDocumentURL?: (() => Promise<(string) | null>)): NewDocumentButton<_SwiftUICore_Text>
Swift declaration
nonisolated init(_ label: Text? = nil, contentType: UTType, source: DocumentCreationSource, _ prepareDocumentURL: @escaping () async throws -> URL? = { nil })

Creates and opens new URL-based documents from a template picker. NewDocumentButton( contentType: .text, source: .template ) { try await withCheckedThrowingContinuation { continuation in documentCreationContinuation = continuation showTemplatePicker = true } } - Parameters: - label: A label for the button. - contentType: The content type of the document to create. - source: A source for the document creation flow. When a document is created, you can retrieve its source from ``FileDocumentConfiguration`` or ``URLDocumentConfiguration``. - prepareDocumentURL: Called when the user taps the button. Present a template picker or other UI, then return the URL of the prepared document, `nil` to request an empty document, or throw on cancellation.

init · iOS 18.0+

init

TypeScript
static initContentType(title: _Foundation_LocalizedStringResource, contentType?: (_UniformTypeIdentifiers_UTType) | null): NewDocumentButton<_SwiftUICore_Text>
Swift declaration
@export(implementation) nonisolated init(_ title: LocalizedStringResource, contentType: UTType? = nil)

Creates and opens new documents. - Parameters: - title: A title resource to use as the button title. - contentType: An optional content type of the document to create.

init · iOS 18.0+

init

TypeScript
static initContentType79411(title: _SwiftUICore_LocalizedStringKey, contentType?: (_UniformTypeIdentifiers_UTType) | null): NewDocumentButton<_SwiftUICore_Text>
Swift declaration
nonisolated init(_ title: LocalizedStringKey, contentType: UTType? = nil)

Creates and opens new documents. - Parameters: - title: A title key to use as the button title. - contentType: An optional content type of the document to create.

init · iOS 18.0+

init

TypeScript
static initContentType30773(label?: (_SwiftUICore_Text) | null, contentType?: (_UniformTypeIdentifiers_UTType) | null): NewDocumentButton<_SwiftUICore_Text>
Swift declaration
nonisolated init(_ label: Text? = nil, contentType: UTType? = nil)

Creates and opens new documents. - Parameters: - label: A label to use for the button. - contentType: An optional content type of the document to create.

init · iOS 18.0+

init

TypeScript
static initContentType91733(title: SDKHandle, contentType?: (_UniformTypeIdentifiers_UTType) | null): NewDocumentButton<_SwiftUICore_Text>
Swift declaration
nonisolated init(_ title: some StringProtocol, contentType: UTType? = nil)

Creates and opens new documents. - Parameters: - title: A title to use as the button title. - contentType: An optional content type of the document to create.

get · iOS 27.0+

collectionID

TypeScript
get collectionID(): unknown
Swift declaration
var collectionID: CollectionID

The collection that contains the destination's position.

set · iOS 27.0+

collectionID

TypeScript
set collectionID(value: unknown)
Swift declaration
var collectionID: CollectionID

The collection that contains the destination's position.

init · iOS 27.0+

init

TypeScript
static initPositionCollectionID(position: ReorderDifference_Destination_Position<unknown, unknown>, collectionID: unknown): ReorderDifference_Destination<unknown, unknown>
Swift declaration
init(position: ReorderDifference<ItemID, CollectionID>.Destination.Position, collectionID: CollectionID)

Initializes the destination value with the provided position and collectionID. - Parameters: - position: The position within the collection. - destination: The identifier that represents this collection.

get · iOS 27.0+

position

TypeScript
get position(): ReorderDifference_Destination_Position<unknown, unknown>
Swift declaration
var position: ReorderDifference<ItemID, CollectionID>.Destination.Position

The identifier position in the collection where the sources should be moved to.

set · iOS 27.0+

position

TypeScript
set position(value: ReorderDifference_Destination_Position<unknown, unknown>)
Swift declaration
var position: ReorderDifference<ItemID, CollectionID>.Destination.Position

The identifier position in the collection where the sources should be moved to.

init · iOS 27.0+

init

TypeScript
static initPosition(position: ReorderDifference_Destination_Position<unknown, ReorderableSingleCollectionIdentifier>): ReorderDifference_Destination<unknown, ReorderableSingleCollectionIdentifier>
Swift declaration
init(position: ReorderDifference<ItemID, CollectionID>.Destination.Position) where CollectionID == ReorderableSingleCollectionIdentifier

Initializes the destination value with the provided position and an instance of `ReorderableSingleCollectionIdentifier`. - Parameters: - position: The position within the collection.

get · iOS 27.0+

destination

TypeScript
get destination(): ReorderDifference_Destination<unknown, unknown>
Swift declaration
var destination: ReorderDifference<ItemID, CollectionID>.Destination

The end position of items to move during a reordering operation.

set · iOS 27.0+

destination

TypeScript
set destination(value: ReorderDifference_Destination<unknown, unknown>)
Swift declaration
var destination: ReorderDifference<ItemID, CollectionID>.Destination

The end position of items to move during a reordering operation.

get · iOS 27.0+

sources

TypeScript
get sources(): Array<unknown>
Swift declaration
var sources: [ItemID]

The identifiers of items to move during a reordering operation.

set · iOS 27.0+

sources

TypeScript
set sources(value: Array<unknown>)
Swift declaration
var sources: [ItemID]

The identifiers of items to move during a reordering operation.

init · iOS 14.0+

init

TypeScript
init(uiAccessibilityContrast: _UIKit_UIAccessibilityContrast): (_SwiftUICore_ColorSchemeContrast) | null
Swift declaration
init?(_ uiAccessibilityContrast: UIAccessibilityContrast)

Creates a contrast from its accessibility contrast equivalent.

init · iOS 14.0+

init

TypeScript
init(uiSizeCategory: _UIKit_UIContentSizeCategory): (_SwiftUICore_ContentSizeCategory) | null
Swift declaration
init?(_ uiSizeCategory: UIContentSizeCategory)

Create a size category from its UIContentSizeCategory equivalent.

get · iOS 13.0+

keyCommands

TypeScript
get keyCommands(): Promise<(Array<_UIKit_UIKeyCommand>) | null>
Swift declaration
@MainActor @preconcurrency override dynamic var keyCommands: [UIKeyCommand]? { get }
get · iOS 13.0+

undoManager

TypeScript
get undoManager(): Promise<(_Foundation_UndoManager) | null>
Swift declaration
@MainActor @preconcurrency override dynamic var undoManager: UndoManager? { get }
method · iOS 13.0+

sizeThatFits

TypeScript
sizeThatFits(size: { width: number; height: number }): Promise<{ width: number; height: number }>
Swift declaration
@MainActor @preconcurrency func sizeThatFits(in size: CGSize) -> CGSize

Calculates and returns the most appropriate size for the current view. - Parameter size: The proposed new size for the view. - Returns: The size that offers the best fit for the root view and its contents.

get · iOS 16.0+

sizingOptions

TypeScript
get sizingOptions(): Promise<UIHostingControllerSizingOptions>
Swift declaration
@MainActor @preconcurrency var sizingOptions: UIHostingControllerSizingOptions { get set }

The options for how the hosting controller tracks changes to the size of its SwiftUI content. The default value is the empty set.

set · iOS 16.0+

sizingOptions

TypeScript
setSizingOptions(value: UIHostingControllerSizingOptions): Promise<void>
Swift declaration
@MainActor @preconcurrency var sizingOptions: UIHostingControllerSizingOptions { get set }

The options for how the hosting controller tracks changes to the size of its SwiftUI content. The default value is the empty set.

method · iOS 13.0+

viewDidAppear

TypeScript
viewDidAppear(animated: boolean): Promise<void>
Swift declaration
@MainActor @preconcurrency override dynamic func viewDidAppear(_ animated: Bool)

Notifies the view controller that its view has been added to a view hierarchy. SwiftUI calls this method after adding the hosting controller's root view to the view hierarchy. You can override this method to perform custom tasks associated with the appearance of the view. If you override this method, you must call `super` at some point in your implementation. - Parameter animated: If `true`, the view is being added using an animation.

method · iOS 13.0+

viewWillAppear

TypeScript
viewWillAppear(animated: boolean): Promise<void>
Swift declaration
@MainActor @preconcurrency override dynamic func viewWillAppear(_ animated: Bool)

Notifies the view controller that its view is about to be added to a view hierarchy. SwiftUI calls this method before adding the hosting controller's root view to the view hierarchy. You can override this method to perform custom tasks associated with the appearance of the view. If you override this method, you must call `super` at some point in your implementation. - Parameter animated: If `true`, the view is being added using an animation.

get · iOS 16.4+

safeAreaRegions

TypeScript
get safeAreaRegions(): Promise<_SwiftUICore_SafeAreaRegions>
Swift declaration
@MainActor @preconcurrency var safeAreaRegions: SafeAreaRegions { get set }

The safe area regions that this view controller adds to its view. An example of when this is appropriate to use is when hosting content that you know should never be affected by the safe area, such as a custom scrollable container. Disabling a safe area region omits it from the SwiftUI layout system altogether. The default value is ``SafeAreaRegions.all``.

set · iOS 16.4+

safeAreaRegions

TypeScript
setSafeAreaRegions(value: _SwiftUICore_SafeAreaRegions): Promise<void>
Swift declaration
@MainActor @preconcurrency var safeAreaRegions: SafeAreaRegions { get set }

The safe area regions that this view controller adds to its view. An example of when this is appropriate to use is when hosting content that you know should never be affected by the safe area, such as a custom scrollable container. Disabling a safe area region omits it from the SwiftUI layout system altogether. The default value is ``SafeAreaRegions.all``.

method · iOS 13.0+

viewDidDisappear

TypeScript
viewDidDisappear(animated: boolean): Promise<void>
Swift declaration
@MainActor @preconcurrency override dynamic func viewDidDisappear(_ animated: Bool)
method · iOS 13.0+

viewWillDisappear

TypeScript
viewWillDisappear(animated: boolean): Promise<void>
Swift declaration
@MainActor @preconcurrency override dynamic func viewWillDisappear(_ animated: Bool)

Notifies the view controller that its view will be removed from a view hierarchy. SwiftUI calls this method before removing the hosting controller's root view from the view hierarchy. You can override this method to perform custom tasks associated with the disappearance of the view. If you override this method, you must call `super` at some point in your implementation. - Parameter animated: If `true`, the view is being removed using an animation.

method · iOS 13.0+

viewWillTransition

TypeScript
viewWillTransition(size: { width: number; height: number }, coordinator: SDKHandle): Promise<void>
Swift declaration
@MainActor @preconcurrency override dynamic func viewWillTransition(to size: CGSize, with coordinator: any UIViewControllerTransitionCoordinator)
get · iOS 13.0+

isModalInPresentation

TypeScript
get isModalInPresentation(): Promise<boolean>
Swift declaration
@MainActor @preconcurrency override dynamic var isModalInPresentation: Bool { get set }
set · iOS 13.0+

isModalInPresentation

TypeScript
setIsModalInPresentation(value: boolean): Promise<void>
Swift declaration
@MainActor @preconcurrency override dynamic var isModalInPresentation: Bool { get set }
get · iOS 13.0+

childForStatusBarStyle

TypeScript
get childForStatusBarStyle(): Promise<(_UIKit_UIViewController) | null>
Swift declaration
@MainActor @preconcurrency override dynamic var childForStatusBarStyle: UIViewController? { get }
get · iOS 13.0+

prefersStatusBarHidden

TypeScript
get prefersStatusBarHidden(): Promise<boolean>
Swift declaration
@MainActor @preconcurrency override dynamic var prefersStatusBarHidden: Bool { get }

A Boolean value that indicates whether the view controller prefers the status bar to be hidden or shown.

method · iOS 13.0+

viewWillLayoutSubviews

TypeScript
viewWillLayoutSubviews(): Promise<void>
Swift declaration
@MainActor @preconcurrency override dynamic func viewWillLayoutSubviews()
get · iOS 13.0+

childForStatusBarHidden

TypeScript
get childForStatusBarHidden(): Promise<(_UIKit_UIViewController) | null>
Swift declaration
@MainActor @preconcurrency override dynamic var childForStatusBarHidden: UIViewController? { get }
get · iOS 13.0+

preferredStatusBarStyle

TypeScript
get preferredStatusBarStyle(): Promise<_UIKit_UIStatusBarStyle>
Swift declaration
@MainActor @preconcurrency override dynamic var preferredStatusBarStyle: UIStatusBarStyle { get }

The preferred status bar style for the view controller.

method · iOS 13.0+

preferredContentSizeDidChange

TypeScript
preferredContentSizeDidChange(container: SDKHandle): Promise<void>
Swift declaration
@MainActor @preconcurrency override dynamic func preferredContentSizeDidChange(forChildContentContainer container: any UIContentContainer)
get · iOS 13.0+

prefersHomeIndicatorAutoHidden

TypeScript
get prefersHomeIndicatorAutoHidden(): Promise<boolean>
Swift declaration
@MainActor @preconcurrency override dynamic var prefersHomeIndicatorAutoHidden: Bool { get }

A Boolean value that indicates whether the view controller prefers the home indicator to be hidden or shown.

get · iOS 13.0+

childForHomeIndicatorAutoHidden

TypeScript
get childForHomeIndicatorAutoHidden(): Promise<(_UIKit_UIViewController) | null>
Swift declaration
@MainActor @preconcurrency override dynamic var childForHomeIndicatorAutoHidden: UIViewController? { get }
get · iOS 13.0+

preferredStatusBarUpdateAnimation

TypeScript
get preferredStatusBarUpdateAnimation(): Promise<_UIKit_UIStatusBarAnimation>
Swift declaration
@MainActor @preconcurrency override dynamic var preferredStatusBarUpdateAnimation: UIStatusBarAnimation { get }

The animation style to use when hiding or showing the status bar for this view controller.

get · iOS 13.0+

childForScreenEdgesDeferringSystemGestures

TypeScript
get childForScreenEdgesDeferringSystemGestures(): Promise<(_UIKit_UIViewController) | null>
Swift declaration
@MainActor @preconcurrency override dynamic var childForScreenEdgesDeferringSystemGestures: UIViewController? { get }
get · iOS 13.0+

preferredScreenEdgesDeferringSystemGestures

TypeScript
get preferredScreenEdgesDeferringSystemGestures(): Promise<SDKHandle>
Swift declaration
@MainActor @preconcurrency override dynamic var preferredScreenEdgesDeferringSystemGestures: UIRectEdge { get }

Sets the screen edge from which you want your gesture to take precedence over the system gesture.

init · iOS 13.0+

init

TypeScript
static initCoderRootView(aDecoder: _Foundation_NSCoder, rootView: SDKHandle): Promise<(UIHostingController<SDKHandle>) | null>
Swift declaration
@MainActor @preconcurrency init?(coder aDecoder: NSCoder, rootView: Content)

Creates a hosting controller object from an archive and the specified SwiftUI view. - Parameters: - aDecoder: The decoder to use during initialization. - rootView: The root view of the SwiftUI view hierarchy that you want to manage using this view controller. - Returns: A `UIViewController` object that you can present from your interface.

init · iOS 13.0+

init

TypeScript
static initCoder(aDecoder: _Foundation_NSCoder): Promise<(UIHostingController<SDKHandle>) | null>
Swift declaration
@MainActor @preconcurrency required dynamic init?(coder aDecoder: NSCoder)

Creates a hosting controller object from the contents of the specified archive. The default implementation of this method throws an exception. To create your view controller from an archive, override this method and initialize the superclass using the ``init(coder:rootView:)`` method instead. -Parameter coder: The decoder to use during initialization.

method · iOS 13.0+

didMove

TypeScript
didMove(parent?: (_UIKit_UIViewController) | null): Promise<void>
Swift declaration
@MainActor @preconcurrency override dynamic func didMove(toParent parent: UIViewController?)
method · iOS 13.0+

loadView

TypeScript
loadView(): Promise<void>
Swift declaration
@MainActor @preconcurrency override dynamic func loadView()
init · iOS 13.0+

init

TypeScript
static initRootView(rootView: SDKHandle): Promise<UIHostingController<SDKHandle>>
Swift declaration
@MainActor @preconcurrency init(rootView: Content)

Creates a hosting controller object that wraps the specified SwiftUI view. - Parameter rootView: The root view of the SwiftUI view hierarchy that you want to manage using the hosting view controller. - Returns: A `UIHostingController` object initialized with the specified SwiftUI view.

get · iOS 13.0+

rootView

TypeScript
get rootView(): Promise<SDKHandle>
Swift declaration
@MainActor @preconcurrency var rootView: Content { get set }

The root view of the SwiftUI view hierarchy managed by this view controller.

set · iOS 13.0+

rootView

TypeScript
setRootView(value: SDKHandle): Promise<void>
Swift declaration
@MainActor @preconcurrency var rootView: Content { get set }

The root view of the SwiftUI view hierarchy managed by this view controller.

method · iOS 13.0+

willMove

TypeScript
willMove(parent?: (_UIKit_UIViewController) | null): Promise<void>
Swift declaration
@MainActor @preconcurrency override dynamic func willMove(toParent parent: UIViewController?)
get · iOS 18.0+

actions

TypeScript
get actions(): SectionConfiguration_Actions
Swift declaration
var actions: SectionConfiguration.Actions { get }

Custom actions associated with a section. This property provides programmatic access to the actions defined on a ``Section``. If no actions were specified, the collection will be empty. The following `MailboxView` will put actions into an overflow menu if there are too many to display inline. struct MailboxView<Content: View>: View { var content: Content init(@ContentBuilder content: () -> Content) { self.content = content() } var body: some View { ForEach(sections: content) { section in HStack { section.header Spacer() Group(subviews: section.actions) { actions in if actions.count > 2 { actions[0] // Place the extras in an overflow menu. Menu("Actions", systemImage: "plus") { actions[1...] } } else { actions } } } section.content } } } You can then use actions in `MailboxView` without considering overflow. MailboxView { Section("iCloud") { Label("Receipts", systemImage: "folder") Label("Mailing Lists", systemImage: "folder") } .sectionActions { Button("New", systemImage: "folder.badge.plus") {} Button("Edit", systemImage: "folder.badge.gearshape") {} Button("Delete", systemImage: "folder.badge.minus") {} } }

get · iOS 16.0+

value

TypeScript
get value(): unknown
Swift declaration
var value: T
set · iOS 16.0+

value

TypeScript
set value(value: unknown)
Swift declaration
var value: T
get · iOS 15.0+

sortDescriptors

TypeScript
get sortDescriptors(): Promise<Array<_Foundation_SortDescriptor<_CoreData_NSManagedObject>>>
Swift declaration
var sortDescriptors: [SortDescriptor<Result>] { get set }

The request's sort descriptors, accessed as value types. Set this configuration value to cause a ``SectionedFetchRequest`` to execute a fetch with a new collection of <doc://com.apple.documentation/documentation/Foundation/SortDescriptor> instances. If you want to use <doc://com.apple.documentation/documentation/Foundation/NSSortDescriptor> instances, set ``SectionedFetchRequest/Configuration/nsSortDescriptors`` instead. Use care to coordinate section and sort updates, as described in ``SectionedFetchRequest/Configuration``. Access this value for a given request by using the ``SectionedFetchResults/sortDescriptors`` property on the associated ``SectionedFetchResults`` instance, either directly or with a ``Binding``.

set · iOS 15.0+

sortDescriptors

TypeScript
setSortDescriptors(value: Array<_Foundation_SortDescriptor<_CoreData_NSManagedObject>>): Promise<void>
Swift declaration
var sortDescriptors: [SortDescriptor<Result>] { get set }

The request's sort descriptors, accessed as value types. Set this configuration value to cause a ``SectionedFetchRequest`` to execute a fetch with a new collection of <doc://com.apple.documentation/documentation/Foundation/SortDescriptor> instances. If you want to use <doc://com.apple.documentation/documentation/Foundation/NSSortDescriptor> instances, set ``SectionedFetchRequest/Configuration/nsSortDescriptors`` instead. Use care to coordinate section and sort updates, as described in ``SectionedFetchRequest/Configuration``. Access this value for a given request by using the ``SectionedFetchResults/sortDescriptors`` property on the associated ``SectionedFetchResults`` instance, either directly or with a ``Binding``.

init · iOS 15.0+

init

TypeScript
static initSectionIdentifierSortDescriptorsPredicateAnimation(sectionIdentifier: "faultingState" | SDKHandle, sortDescriptors: Array<_Foundation_SortDescriptor<_CoreData_NSManagedObject>>, predicate?: (_Foundation_NSPredicate) | null, animation?: (_SwiftUICore_Animation) | null): Promise<SectionedFetchRequest<number, _CoreData_NSManagedObject>>
Swift declaration
@MainActor @preconcurrency init(sectionIdentifier: KeyPath<Result, SectionIdentifier>, sortDescriptors: [SortDescriptor<Result>], predicate: NSPredicate? = nil, animation: Animation? = nil)

Creates a sectioned fetch request based on a section identifier, a predicate, and value type sort parameters. The request gets the entity type from the `Result` instance by calling that managed object's <doc://com.apple.documentation/documentation/CoreData/NSManagedObject/entity()> type method. If you need to specify the entity type explicitly, use the ``init(entity:sectionIdentifier:sortDescriptors:predicate:animation:)`` initializer instead. If you need more control over the fetch request configuration, use ``init(fetchRequest:sectionIdentifier:animation:)``. For reference type sort descriptors, use ``init(sectionIdentifier:sortDescriptors:predicate:animation:)``. - Parameters: - sectionIdentifier: A key path that SwiftUI applies to the `Result` type to get an object's section identifier. - sortDescriptors: An array of sort descriptors that define the sort order of the fetched results. - predicate: An <doc://com.apple.documentation/documentation/Foundation/NSPredicate> instance that defines logical conditions used to filter the fetched results. - animation: The animation to use for user interface changes that result from changes to the fetched results.

init · iOS 15.0+

init

TypeScript
static initSectionIdentifierSortDescriptorsPredicateAnimation94113(sectionIdentifier: "faultingState" | SDKHandle, sortDescriptors: Array<_Foundation_NSSortDescriptor>, predicate?: (_Foundation_NSPredicate) | null, animation?: (_SwiftUICore_Animation) | null): Promise<SectionedFetchRequest<number, _CoreData_NSManagedObject>>
Swift declaration
@MainActor @preconcurrency init(sectionIdentifier: KeyPath<Result, SectionIdentifier>, sortDescriptors: [NSSortDescriptor], predicate: NSPredicate? = nil, animation: Animation? = nil)

Creates a sectioned fetch request based on a section identifier, a predicate, and reference type sort parameters. The request gets the entity type from the `Result` instance by calling that managed object's <doc://com.apple.documentation/documentation/CoreData/NSManagedObject/entity()> type method. If you need to specify the entity type explicitly, use the ``init(entity:sectionIdentifier:sortDescriptors:predicate:animation:)`` initializer instead. If you need more control over the fetch request configuration, use ``init(fetchRequest:sectionIdentifier:animation:)``. For value type sort descriptors, use ``init(sectionIdentifier:sortDescriptors:predicate:animation:)``. - Parameters: - sectionIdentifier: A key path that SwiftUI applies to the `Result` type to get an object's section identifier. - sortDescriptors: An array of sort descriptors that define the sort order of the fetched results. - predicate: An <doc://com.apple.documentation/documentation/Foundation/NSPredicate> instance that defines logical conditions used to filter the fetched results. - animation: The animation to use for user interface changes that result from changes to the fetched results.

get · iOS 15.0+

sortDescriptors

TypeScript
get sortDescriptors(): Promise<Array<_Foundation_SortDescriptor<_CoreData_NSManagedObject>>>
Swift declaration
@MainActor @preconcurrency var sortDescriptors: [SortDescriptor<Result>] { get nonmutating set }

The request's sort descriptors, accessed as value types. Set this value to cause the associated ``SectionedFetchRequest`` to execute a fetch with a new collection of <doc://com.apple.documentation/documentation/Foundation/SortDescriptor> instances. The order of entities stored in the results collection may change as a result. Use care to coordinate section and sort updates, as described in ``SectionedFetchRequest/Configuration``. If you want to use <doc://com.apple.documentation/documentation/Foundation/NSSortDescriptor> instances, set ``SectionedFetchResults/nsSortDescriptors`` instead.

set · iOS 15.0+

sortDescriptors

TypeScript
setSortDescriptors(value: Array<_Foundation_SortDescriptor<_CoreData_NSManagedObject>>): Promise<void>
Swift declaration
@MainActor @preconcurrency var sortDescriptors: [SortDescriptor<Result>] { get nonmutating set }

The request's sort descriptors, accessed as value types. Set this value to cause the associated ``SectionedFetchRequest`` to execute a fetch with a new collection of <doc://com.apple.documentation/documentation/Foundation/SortDescriptor> instances. The order of entities stored in the results collection may change as a result. Use care to coordinate section and sort updates, as described in ``SectionedFetchRequest/Configuration``. If you want to use <doc://com.apple.documentation/documentation/Foundation/NSSortDescriptor> instances, set ``SectionedFetchResults/nsSortDescriptors`` instead.

static · iOS 17.0+

search

TypeScript
static searchText(text: string): ContentUnavailableView<SearchUnavailableContent_Label, SearchUnavailableContent_Description, SearchUnavailableContent_Actions>
Swift declaration
static func search(text: String) -> ContentUnavailableView<Label, Description, Actions>

Creates a `ContentUnavailableView` instance that conveys a search state. For example, consider the usage of this static member in *ContactsListView*: struct ContactsListView: View { @ObservedObject private var viewModel = ContactsViewModel() var body: some View { NavigationStack { CustomSearchBar(query: $viewModel.searchText) List { ForEach(viewModel.searchResults) { contact in NavigationLink { ContactsView(contact) } label: { Text(contact.name) } } } .navigationTitle("Contacts") .overlay { if viewModel.searchResults.isEmpty { ContentUnavailableView .search(text: viewModel.searchText) } } } } } - Parameter text: The search text query.

get · iOS 17.0+

search

TypeScript
static get search(): ContentUnavailableView<SearchUnavailableContent_Label, SearchUnavailableContent_Description, SearchUnavailableContent_Actions>
Swift declaration
static var search: ContentUnavailableView<SearchUnavailableContent.Label, SearchUnavailableContent.Description, SearchUnavailableContent.Actions> { get }

Creates a `ContentUnavailableView` instance that conveys a search state. A `ContentUnavailableView` initialized with this static member is expected to be contained within a searchable view hierarchy. Such a configuration enables the search query to be parsed into the view's description. For example, consider the usage of this static member in *ContactsListView*: struct ContactsListView: View { @ObservedObject private var viewModel = ContactsViewModel() var body: some View { NavigationStack { List { ForEach(viewModel.searchResults) { contact in NavigationLink { ContactsView(contact) } label: { Text(contact.name) } } } .navigationTitle("Contacts") .searchable(text: $viewModel.searchText) .overlay { if searchResults.isEmpty { ContentUnavailableView.search } } } } }

get · iOS 26.0+

body

TypeScript
get body(): Array<SliderTick<number>>
Swift declaration
var body: [SliderTick<V>] { get }

The value of this type's content.

get · iOS 26.0+

value

TypeScript
get value(): unknown
Swift declaration
var value: T
set · iOS 26.0+

value

TypeScript
set value(value: unknown)
Swift declaration
var value: T
method · iOS 16.0+

background

TypeScript
background(style: SDKHandle): UIHostingConfiguration<SDKHandle, SDKHandle>
Swift declaration
func background<S>(_ style: S) -> UIHostingConfiguration<Content, _UIHostingConfigurationBackgroundView<S>> where S : ShapeStyle

Sets the background contents for the hosting configuration's enclosing cell. The following example sets a custom view to the background of the cell: UIHostingConfiguration { Text("My Contents") } .background(Color.blue) - Parameter style: The shape style to be used as the background of the cell.

method · iOS 16.0+

makeContentView

TypeScript
makeContentView(): Promise<(_UIKit_UIView) & (SDKHandle)>
Swift declaration
@MainActor func makeContentView() -> any UIView & UIContentView
method · iOS 16.0+

margins

TypeScript
margins(edges: _SwiftUICore_Edge_Set, length: number): UIHostingConfiguration<SDKHandle, SDKHandle>
Swift declaration
func margins(_ edges: Edge.Set = .all, _ length: CGFloat) -> UIHostingConfiguration<Content, Background>

Sets the margins around the content of the configuration. Use this modifier to replace the default margins applied to the root of the configuration. The following example creates 20 points of space between the content and the background on the horizontal edges. UIHostingConfiguration { Text("My Contents") } .margins(.horizontal, 20.0) - Parameters: - edges: The edges to apply the insets. Any edges not specified will use the system default values. The default value is ``Edge/Set/all``. - length: The amount to apply.

method · iOS 16.0+

margins

TypeScript
margins14625(edges: _SwiftUICore_Edge_Set, insets: _SwiftUICore_EdgeInsets): UIHostingConfiguration<SDKHandle, SDKHandle>
Swift declaration
func margins(_ edges: Edge.Set = .all, _ insets: EdgeInsets) -> UIHostingConfiguration<Content, Background>

Sets the margins around the content of the configuration. Use this modifier to replace the default margins applied to the root of the configuration. The following example creates 10 points of space between the content and the background on the leading edge and 20 points of space on the trailing edge: UIHostingConfiguration { Text("My Contents") } .margins(.horizontal, 20.0) - Parameters: - edges: The edges to apply the insets. Any edges not specified will use the system default values. The default value is ``Edge/Set/all``. - insets: The insets to apply.

method · iOS 16.0+

minSize

TypeScript
minSizeWidthHeight(width?: (number) | null, height?: (number) | null): UIHostingConfiguration<SDKHandle, SDKHandle>
Swift declaration
func minSize(width: CGFloat? = nil, height: CGFloat? = nil) -> UIHostingConfiguration<Content, Background>

Sets the minimum size for the configuration. Use this modifier to indicate that a configuration's associated cell can be resized to a specific minimum. The following example allows the cell to be compressed to zero size: UIHostingConfiguration { Text("My Contents") } .minSize(width: 0, height: 0) - Parameter width: The value to use for the width dimension. A value of `nil` indicates that the system default should be used. - Parameter height: The value to use for the height dimension. A value of `nil` indicates that the system default should be used.

method · iOS 16.0+

minSize

TypeScript
minSize(): UIHostingConfiguration<SDKHandle, SDKHandle>
Swift declaration
@export(implementation) func minSize() -> UIHostingConfiguration<Content, Background>

Sets the minimum size for the configuration. Use the version with parameters instead.

method · iOS 16.0+

updated

TypeScript
updated(state: SDKHandle): UIHostingConfiguration<SDKHandle, SDKHandle>
Swift declaration
func updated(for state: any UIConfigurationState) -> UIHostingConfiguration<Content, Background>
init · iOS 14.0+

init

TypeScript
init(uiUserInterfaceSizeClass: _UIKit_UIUserInterfaceSizeClass): (_SwiftUICore_UserInterfaceSizeClass) | null
Swift declaration
init?(_ uiUserInterfaceSizeClass: UIUserInterfaceSizeClass)

Creates a SwiftUI size class from the specified UIKit size class.

get · iOS 15.0+

wrappedValue

TypeScript
get wrappedValue(): number
Swift declaration
var wrappedValue: Value { get nonmutating set }

The current state value, taking into account whatever bindings might be in effect due to the current location of focus. When focus is not in any view that is bound to this state, the wrapped value will be `nil` (for optional-typed state) or `false` (for `Bool`- typed state).

set · iOS 15.0+

wrappedValue

TypeScript
set wrappedValue(value: number)
Swift declaration
var wrappedValue: Value { get nonmutating set }

The current state value, taking into account whatever bindings might be in effect due to the current location of focus. When focus is not in any view that is bound to this state, the wrapped value will be `nil` (for optional-typed state) or `false` (for `Bool`- typed state).

get · iOS 15.0+

projectedValue

TypeScript
get projectedValue(): AccessibilityFocusState_Binding<number>
Swift declaration
var projectedValue: AccessibilityFocusState<Value>.Binding { get }

A projection of the state value that can be used to establish bindings between view content and accessibility focus placement. Use `projectedValue` in conjunction with ``SwiftUI/View/accessibilityFocused(_:equals:)`` to establish bindings between view content and accessibility focus placement.

init · iOS 15.0+

init

TypeScript
static initFor(technologies: _SwiftUICore_AccessibilityTechnologies): AccessibilityFocusState<boolean>
Swift declaration
init(for technologies: AccessibilityTechnologies) where Value == Bool

Creates a new accessibility focus state for a Boolean value, using the accessibility technologies you specify. - Parameters: - technologies: One of the available ``AccessibilityTechnologies``.

init · iOS 15.0+

init

TypeScript
static initFor83063(technologies: _SwiftUICore_AccessibilityTechnologies): AccessibilityFocusState<(number) | null>
Swift declaration
init<T>(for technologies: AccessibilityTechnologies) where Value == T?, T : Hashable

Creates a new accessibility focus state of the type and using the accessibility technologies you specify. - Parameter technologies: One or more of the available ``AccessibilityTechnologies``.

get · iOS 15.0+

wrappedValue

TypeScript
get wrappedValue(): number
Swift declaration
var wrappedValue: Value { get nonmutating set }

The underlying value referenced by the bound property.

set · iOS 15.0+

wrappedValue

TypeScript
set wrappedValue(value: number)
Swift declaration
var wrappedValue: Value { get nonmutating set }

The underlying value referenced by the bound property.

get · iOS 15.0+

projectedValue

TypeScript
get projectedValue(): AccessibilityFocusState_Binding<number>
Swift declaration
var projectedValue: AccessibilityFocusState<Value>.Binding { get }

The currently focused element.

init · iOS 15.0+

init

TypeScript
static init(): AccessibilityFocusState<boolean>
Swift declaration
init() where Value == Bool

Creates a new accessibility focus state for a Boolean value.

init · iOS 15.0+

init

TypeScript
static init72086(): AccessibilityFocusState<(number) | null>
Swift declaration
init<T>() where Value == T?, T : Hashable

Creates a new accessibility focus state of the type you provide.

get · iOS 15.0+

body

TypeScript
get body(): Promise<never>
Swift declaration
@MainActor @preconcurrency var body: Never { get }

The internal content of this `AccessibilityRotorContent`.

init · iOS 16.0+

init

TypeScript
static initIdInTextRangePrepare(label: _Foundation_LocalizedStringResource, id: number, namespace: _SwiftUICore_Namespace_ID, textRange?: (SDKHandle) | null, prepare?: (() => void)): AccessibilityRotorEntry<number>
Swift declaration
@export(implementation) init(_ label: LocalizedStringResource, id: ID, in namespace: Namespace.ID, textRange: Range<String.Index>? = nil, prepare: @escaping () -> Void = {})

Create a Rotor entry with a specific label, identifier and namespace, and with an optional range. - Parameters: - label: Localized string used to show this Rotor entry to users. - id: Used to find the UI element associated with this Rotor entry. This identifier and namespace should match a call to `accessibilityRotorEntry(id:in)`. - namespace: Namespace for this identifier. Should match a call to `accessibilityRotorEntry(id:in)`. - textRange: Optional range of text associated with this Rotor entry. This should be a range within text that is set as the accessibility label or accessibility value of the associated element. - prepare: Optional closure to run before a Rotor entry is navigated to, to prepare the UI as needed. This should be used to bring the Accessibility element on-screen, if scrolling is needed to get to it.

init · iOS 15.0+

init

TypeScript
static initIdInTextRangePrepare42212(labelKey: _SwiftUICore_LocalizedStringKey, id: number, namespace: _SwiftUICore_Namespace_ID, textRange?: (SDKHandle) | null, prepare?: (() => void)): AccessibilityRotorEntry<number>
Swift declaration
init(_ labelKey: LocalizedStringKey, id: ID, in namespace: Namespace.ID, textRange: Range<String.Index>? = nil, prepare: @escaping () -> Void = {})

Create a Rotor entry with a specific label, identifier and namespace, and with an optional range. - Parameters: - labelKey: Localized string used to show this Rotor entry to users. - id: Used to find the UI element associated with this Rotor entry. This identifier and namespace should match a call to `accessibilityRotorEntry(id:in)`. - namespace: Namespace for this identifier. Should match a call to `accessibilityRotorEntry(id:in)`. - textRange: Optional range of text associated with this Rotor entry. This should be a range within text that is set as the accessibility label or accessibility value of the associated element. - prepare: Optional closure to run before a Rotor entry is navigated to, to prepare the UI as needed. This should be used to bring the Accessibility element on-screen, if scrolling is needed to get to it.

init · iOS 15.0+

init

TypeScript
static initIdInTextRangePrepare27547(label: _SwiftUICore_Text, id: number, namespace: _SwiftUICore_Namespace_ID, textRange?: (SDKHandle) | null, prepare?: (() => void)): AccessibilityRotorEntry<number>
Swift declaration
init(_ label: Text, id: ID, in namespace: Namespace.ID, textRange: Range<String.Index>? = nil, prepare: @escaping () -> Void = {})

Create a Rotor entry with a specific label, identifier and namespace, and with an optional range. - Parameters: - label: Localized string used to show this Rotor entry to users. - id: Used to find the UI element associated with this Rotor entry. This identifier and namespace should match a call to `accessibilityRotorEntry(id:in)`. - namespace: Namespace for this identifier. Should match a call to `accessibilityRotorEntry(id:in)`. - textRange: Optional range of text associated with this Rotor entry. This should be a range within text that is set as the accessibility label or accessibility value of the associated element. - prepare: Optional closure to run before a Rotor entry is navigated to, to prepare the UI as needed. This should be used to bring the Accessibility element on-screen, if scrolling is needed to get to it.

init · iOS 16.0+

init

TypeScript
static initIdTextRangePrepare(label: _Foundation_LocalizedStringResource, id: number, textRange?: (SDKHandle) | null, prepare?: (() => void)): AccessibilityRotorEntry<number>
Swift declaration
@export(implementation) init(_ label: LocalizedStringResource, id: ID, textRange: Range<String.Index>? = nil, prepare: @escaping () -> Void = {})

Create a Rotor entry with a specific label and identifier, with an optional range. - Parameters: - id: Used to find the UI element associated with this Rotor entry. This identifier should be used within a `scrollView`, either in a `ForEach` or using an `id` call. - label: Localized string used to show this Rotor entry to users. - textRange: Optional range of text associated with this Rotor entry. This should be a range within text that is set as the accessibility label or accessibility value of the associated element. - prepare: Optional closure to run before a Rotor entry is navigated to, to prepare the UI as needed. This can be used to bring the UI element on-screen if it isn't already, and SwiftUI is not able to automatically scroll to it.

init · iOS 15.0+

init

TypeScript
static initIdTextRangePrepare57174(labelKey: _SwiftUICore_LocalizedStringKey, id: number, textRange?: (SDKHandle) | null, prepare?: (() => void)): AccessibilityRotorEntry<number>
Swift declaration
init(_ labelKey: LocalizedStringKey, id: ID, textRange: Range<String.Index>? = nil, prepare: @escaping () -> Void = {})

Create a Rotor entry with a specific label and identifier, with an optional range. - Parameters: - labelKey: Localized string used to show this Rotor entry to users. - id: Used to find the UI element associated with this Rotor entry. This identifier should be used within a `scrollView`, either in a `ForEach` or using an `id` call. - textRange: Optional range of text associated with this Rotor entry. This should be a range within text that is set as the accessibility label or accessibility value of the associated element. - prepare: Optional closure to run before a Rotor entry is navigated to, to prepare the UI as needed. This can be used to bring the UI element on-screen if it isn't already, and SwiftUI is not able to automatically scroll to it.

init · iOS 15.0+

init

TypeScript
static initIdTextRangePrepare84633(label: _SwiftUICore_Text, id: number, textRange?: (SDKHandle) | null, prepare?: (() => void)): AccessibilityRotorEntry<number>
Swift declaration
init(_ label: Text, id: ID, textRange: Range<String.Index>? = nil, prepare: @escaping () -> Void = {})

Create a Rotor entry with a specific label and identifier, with an optional range. - Parameters: - label: Localized string used to show this Rotor entry to users. - id: Used to find the UI element associated with this Rotor entry. This identifier should be used within a `scrollView`, either in a `ForEach` or using an `id` call. - textRange: Optional range of text associated with this Rotor entry. This should be a range within text that is set as the either label or accessibility value of the associated element. - prepare: Optional closure to run before a Rotor entry is navigated to, to prepare the UI as needed. This can be used to bring the UI element on-screen if it isn't already, and SwiftUI is not able to automatically scroll to it.

init · iOS 15.0+

init

TypeScript
static initIdTextRangePrepare87936(label: string, id: number, textRange?: (SDKHandle) | null, prepare?: (() => void)): AccessibilityRotorEntry<number>
Swift declaration
init<L>(_ label: L, id: ID, textRange: Range<String.Index>? = nil, prepare: @escaping () -> Void = {}) where L : StringProtocol

Create a Rotor entry with a specific label and identifier, with an optional range. - Parameters: - label: Localized string used to show this Rotor entry to users. - id: Used to find the UI element associated with this Rotor entry. This identifier should be used within a `scrollView`, either in a `ForEach` or using an `id` call. - textRange: Optional range of text associated with this Rotor entry. This should be a range within text that is set as the accessibility label or accessibility value of the associated element. - prepare: Optional closure to run before a Rotor entry is navigated to, to prepare the UI as needed. This can be used to bring the UI element on-screen if it isn't already, and SwiftUI is not able to automatically scroll to it.

init · iOS 16.0+

init

TypeScript
static initTextRangePrepare(label: _Foundation_LocalizedStringResource, textRange: SDKHandle, prepare?: (() => void)): AccessibilityRotorEntry<never>
Swift declaration
@export(implementation) init(_ label: LocalizedStringResource, textRange: Range<String.Index>, prepare: @escaping () -> Void = {}) where ID == Never

Create a Rotor entry with a specific label and range. This Rotor entry will be associated with the Accessibility element that owns the Rotor. - Parameters: - label: Localized string used to show this Rotor entry to users. If no label is specified, the Rotor entry will be labeled based on the text at that range. - textRange: Range of text associated with this Rotor entry. - prepare: Optional closure to run before a Rotor entry is navigated to, to prepare the UI as needed. This can be used to bring the UI element or text on-screen if it isn't already, and SwiftUI not able to automatically scroll to it.

init · iOS 15.0+

init

TypeScript
static initTextRangePrepare24341(label: (_SwiftUICore_Text) | null, textRange: SDKHandle, prepare?: (() => void)): AccessibilityRotorEntry<never>
Swift declaration
init(_ label: Text? = nil, textRange: Range<String.Index>, prepare: @escaping () -> Void = {}) where ID == Never

Create a Rotor entry with a specific label and range. This Rotor entry will be associated with the Accessibility element that owns the Rotor. - Parameters: - label: Optional localized string used to show this Rotor entry to users. If no label is specified, the Rotor entry will be labeled based on the text at that range. - textRange: Range of text associated with this Rotor entry. - prepare: Optional closure to run before a Rotor entry is navigated to, to prepare the UI as needed. This can be used to bring the UI element or text on-screen if it isn't already, and SwiftUI not able to automatically scroll to it.

init · iOS 15.0+

init

TypeScript
static initTextRangePrepare24101(label: string, textRange: SDKHandle, prepare?: (() => void)): AccessibilityRotorEntry<never>
Swift declaration
init<L>(_ label: L, textRange: Range<String.Index>, prepare: @escaping () -> Void = {}) where ID == Never, L : StringProtocol

Create a Rotor entry with a specific label and range. This Rotor entry will be associated with the Accessibility element that owns the Rotor. - Parameters: - label: Localized string used to show this Rotor entry to users. If no label is specified, the Rotor entry will be labeled based on the text at that range. - textRange: Range of text associated with this Rotor entry. - prepare: Optional closure to run before a Rotor entry is navigated to, to prepare the UI as needed. This can be used to bring the UI element or text on-screen if it isn't already, and SwiftUI not able to automatically scroll to it.

init · iOS 15.0+

init

TypeScript
static initTextRangePrepare56839(labelKey: _SwiftUICore_LocalizedStringKey, textRange: SDKHandle, prepare?: (() => void)): AccessibilityRotorEntry<number>
Swift declaration
init(_ labelKey: LocalizedStringKey, textRange: Range<String.Index>, prepare: @escaping () -> Void = {})

Create a Rotor entry with a specific label and range. This Rotor entry will be associated with the Accessibility element that owns the Rotor. - Parameters: - labelKey: Localized string used to show this Rotor entry to users. If no label is specified, the Rotor entry will be labeled based on the text at that range. - textRange: Range of text associated with this Rotor entry. - prepare: Optional closure to run before a Rotor entry is navigated to, to prepare the UI as needed. This can be used to bring the UI element or text on-screen if it isn't already, and SwiftUI not able to automatically scroll to it.

init · iOS 15.0+

init

TypeScript
static initInTextRangePrepare(label: string, id: number, namespace: _SwiftUICore_Namespace_ID, textRange?: (SDKHandle) | null, prepare?: (() => void)): AccessibilityRotorEntry<number>
Swift declaration
init<L>(_ label: L, _ id: ID, in namespace: Namespace.ID, textRange: Range<String.Index>? = nil, prepare: @escaping () -> Void = {}) where L : StringProtocol

Create a Rotor entry with a specific label, identifier and namespace, and with an optional range. - Parameters: - label: Localized string used to show this Rotor entry to users. - id: Used to find the UI element associated with this Rotor entry. This identifier and namespace should match a call to `accessibilityRotorEntry(id:in)`. - namespace: Namespace for this identifier. Should match a call to `accessibilityRotorEntry(id:in)`. - textRange: Optional range of text associated with this Rotor entry. This should be a range within text that is set as the accessibility label or accessibility value of the associated element. - prepare: Optional closure to run before a Rotor entry is navigated to, to prepare the UI as needed. This should be used to bring the Accessibility element on-screen, if scrolling is needed to get to it.

get · iOS 16.0+

value

TypeScript
get value(): unknown
Swift declaration
var value: T

The value of a row presented by this column content.

set · iOS 16.0+

value

TypeScript
set value(value: unknown)
Swift declaration
var value: T

The value of a row presented by this column content.

get · iOS 26.0+

body

TypeScript
get body(): Array<SliderTick<SDKHandle>>
Swift declaration
var body: [SliderTick<SliderTickContentForEach<Data, ID, Content>.Value>] { get }

The value of this type's content.

method · iOS 17.0+

resetOrder

TypeScript
resetOrder(): void
Swift declaration
mutating func resetOrder()

Resets the column order back to the default, preserving the customized visibility and size. Tables that are bound to this state will order their columns as described by their column builder.

subscript · iOS 17.0+

subscript

TypeScript
subscript(id: string): _SwiftUICore_Visibility
Swift declaration
subscript(visibility id: String) -> Visibility { get set }

The visibility of the column identified by its identifier. Explicit identifiers can be associated with a `TableColumn` using the `customizationID(_:)` modifier. TableColumn("Number of Reports", value: \.duplicateCount) { Text($0.duplicateCount, format: .number) } .customizationID("numberOfReports") ... columnsCustomization[visibility: "numberOfReports"] = .hidden If the ID isn't associated with the state, a default value of `.automatic` is returned.

get · iOS 14.0+ · Deprecated in iOS 100000.0

isEditable

TypeScript
get isEditable(): boolean
Swift declaration
var isEditable: Bool

A Boolean that indicates whether you can edit the document. This value is `false` if the document is in viewing mode, or if the file is not writable.

set · iOS 14.0+ · Deprecated in iOS 100000.0

isEditable

TypeScript
set isEditable(value: boolean)
Swift declaration
var isEditable: Bool

A Boolean that indicates whether you can edit the document. This value is `false` if the document is in viewing mode, or if the file is not writable.

get · iOS 27.0+ · Deprecated in iOS 100000.0

creationSource

TypeScript
get creationSource(): (DocumentCreationSource) | null
Swift declaration
var creationSource: DocumentCreationSource? { get }

The source associated with the button that created this document. On iOS, you can specify the source via a ``NewDocumentButton`` in ``DocumentGroupLaunchScene``: extension DocumentCreationSource { static let scanner: Self = DocumentCreationSource(id: "document-from-scanner") static let template: Self = DocumentCreationSource(id: "document-from-template") } DocumentGroupLaunchScene("Documents") { NewDocumentButton("Scan Document", source: .scanner) NewDocumentButton("New from Template", source: .template) } Use this property to determine which ``NewDocumentButton`` triggered the creation of the current document, allowing you to customize the UI accordingly.

get · iOS 14.0+ · Deprecated in iOS 100000.0

fileURL

TypeScript
get fileURL(): (string) | null
Swift declaration
var fileURL: URL?

The URL of the open file document.

set · iOS 14.0+ · Deprecated in iOS 100000.0

fileURL

TypeScript
set fileURL(value: (string) | null)
Swift declaration
var fileURL: URL?

The URL of the open file document.

get · iOS 14.0+ · Deprecated in iOS 100000.0

$document

TypeScript
get $document(): _SwiftUICore_Binding<SDKHandle>
Swift declaration
var $document: Binding<Document> { get }
init · iOS 27.0+

init

TypeScript
static init(configuration: DocumentReadConfiguration, makeSnapshot: ((arg0: _Foundation_FileWrapper) => Promise<unknown>)): FileWrapperDocumentReader<unknown>
Swift declaration
init(_ configuration: sending FileWrapperDocumentReader<Snapshot>.ReadConfiguration, makeSnapshot: @escaping (FileWrapper) async throws -> sending Snapshot)

Creates a reader that converts a `FileWrapper` into a snapshot. - Parameters: - configuration: The read configuration passed to ``ReadableDocument/reader(configuration:)``. - makeSnapshot: A closure that deserializes the `FileWrapper` into a snapshot. For flat files, read `regularFileContents`. For packages, navigate `fileWrappers` to find children. Throw an error if the data is malformed.

init · iOS 27.0+

init

TypeScript
static init(configuration: DocumentWriteConfiguration, makeFileWrapper: ((arg0: unknown, arg1: (_Foundation_FileWrapper) | null) => Promise<_Foundation_FileWrapper>)): FileWrapperDocumentWriter<unknown>
Swift declaration
init(_ configuration: sending FileWrapperDocumentWriter<Snapshot>.WriteConfiguration, makeFileWrapper: @escaping (Snapshot, FileWrapper?) async throws -> FileWrapper)

Creates a writer that converts a snapshot into a `FileWrapper`. - Parameters: - configuration: Properties required to write a document to disk. - makeFileWrapper: Serializes a `Snapshot` into a `FileWrapper`. The closure takes the following parameters: - `snapshot`: The snapshot to serialize into a `FileWrapper`. - `previous`: The previous file wrapper that can be reused to optimize writing. If the latest operation for the document was writing, it is the file wrapper used for writing. If the latest operation was reading, SwiftUI passes the file wrapper read by a companion `FileWrapperDocumentReader`.

get · iOS 16.0+

startIndex

TypeScript
get startIndex(): SDKHandle
Swift declaration
var startIndex: IndexedIdentifierCollection<Base, ID>.Index { get }

The position of the first element in a nonempty collection. If the collection is empty, `startIndex` is equal to `endIndex`.

method · iOS 16.0+

index

TypeScript
index(i: SDKHandle): SDKHandle
Swift declaration
func index(after i: IndexedIdentifierCollection<Base, ID>.Index) -> IndexedIdentifierCollection<Base, ID>.Index

Returns the position immediately after the given index. The successor of an index must be well defined. For an index `i` into a collection `c`, calling `c.index(after: i)` returns the same index every time. - Parameter i: A valid index of the collection. `i` must be less than `endIndex`. - Returns: The index value immediately after `i`.

get · iOS 16.0+

endIndex

TypeScript
get endIndex(): SDKHandle
Swift declaration
var endIndex: IndexedIdentifierCollection<Base, ID>.Index { get }

The collection's "past the end" position---that is, the position one greater than the last valid subscript argument. When you need a range that includes the last element of a collection, use the half-open range operator (`..<`) with `endIndex`. The `..<` operator creates a range that doesn't include the upper bound, so it's always safe to use with `endIndex`. For example: let numbers = [10, 20, 30, 40, 50] if let index = numbers.firstIndex(of: 30) { print(numbers[index ..< numbers.endIndex]) } // Prints "[30, 40, 50]" If the collection is empty, `endIndex` is equal to `startIndex`.

subscript · iOS 16.0+

subscript

TypeScript
subscript(position: SDKHandle): IndexedIdentifierCollection_Element<SDKHandle, number>
Swift declaration
subscript(position: IndexedIdentifierCollection<Base, ID>.Index) -> IndexedIdentifierCollection<Base, ID>.Element { get }

Accesses the element at the specified position. The following example accesses an element of an array through its subscript to print its value: var streets = ["Adams", "Bryant", "Channing", "Douglas", "Evarts"] print(streets[1]) // Prints "Bryant" You can subscript a collection with any valid index other than the collection's end index. The end index refers to the position one past the last element of a collection, so it doesn't correspond with an element. - Parameter position: The position of the element to access. `position` must be a valid index of the collection that is not equal to the `endIndex` property. - Complexity: O(1)

get · iOS 18.0+

converter

TypeScript
get converter(): UIGestureRecognizerRepresentableCoordinateSpaceConverter
Swift declaration
let converter: UIGestureRecognizerRepresentableCoordinateSpaceConverter

A structure used to convert locations to/from coordinate spaces in the hierarchy of the associated SwiftUI view.

get · iOS 18.0+

body

TypeScript
get body(): Promise<Tab<number, SDKHandle, SDKHandle>>
Swift declaration
@MainActor @preconcurrency var body: Tab<Value, Content, Label> { get }

The value of this type's nested content.

init · iOS 16.0+

init

TypeScript
static init(configuration: FormStyleConfiguration): Form<FormStyleConfiguration_Content>
Swift declaration
nonisolated init(_ configuration: FormStyleConfiguration)

Creates a form based on a form style configuration. - Parameter configuration: The properties of the form.

init · iOS 16.0+

init

TypeScript
static initDestination(titleResource: _Foundation_LocalizedStringResource, destination: string): Promise<Link<_SwiftUICore_Text>>
Swift declaration
@export(implementation) nonisolated init(_ titleResource: LocalizedStringResource, destination: URL)

Creates a control, consisting of a URL and a title resource, used to navigate to a URL. Use ``Link`` to create a control that your app uses to navigate to a URL that you provide. The example below creates a link to `example.com` and uses `Visit Example Co` as the title key to generate a link-styled view in your app: Link("Visit Example Co", destination: URL(string: "https://www.example.com/")!) - Parameters: - titleResource: The localized title that describes the purpose of this link. - destination: The URL for the link.

init · iOS 14.0+

init

TypeScript
static initDestination43721(titleKey: _SwiftUICore_LocalizedStringKey, destination: string): Promise<Link<_SwiftUICore_Text>>
Swift declaration
nonisolated init(_ titleKey: LocalizedStringKey, destination: URL)

Creates a control, consisting of a URL and a title key, used to navigate to a URL. Use ``Link`` to create a control that your app uses to navigate to a URL that you provide. The example below creates a link to `example.com` and uses `Visit Example Co` as the title key to generate a link-styled view in your app: Link("Visit Example Co", destination: URL(string: "https://www.example.com/")!) - Parameters: - titleKey: The key for the localized title that describes the purpose of this link. - destination: The URL for the link.

init · iOS 14.0+

init

TypeScript
static initDestination68447(title: string, destination: string): Promise<Link<_SwiftUICore_Text>>
Swift declaration
nonisolated init<S>(_ title: S, destination: URL) where S : StringProtocol

Creates a control, consisting of a URL and a title string, used to navigate to a URL. Use ``Link`` to create a control that your app uses to navigate to a URL that you provide. The example below creates a link to `example.com` and displays the title string you provide as a link-styled view in your app: func marketingLink(_ callToAction: String) -> Link { Link(callToAction, destination: URL(string: "https://www.example.com/")!) } - Parameters: - title: A text string used as the title for describing the underlying `destination` URL. - destination: The URL for the link.

init · iOS 14.0+

init

TypeScript
static init(configuration: MenuStyleConfiguration): Menu<MenuStyleConfiguration_Label, MenuStyleConfiguration_Content>
Swift declaration
nonisolated init(_ configuration: MenuStyleConfiguration)

Creates a menu based on a style configuration. Use this initializer within the ``MenuStyle/makeBody(configuration:)`` method of a ``MenuStyle`` instance to create an instance of the menu being styled. This is useful for custom menu styles that modify the current menu style. For example, the following code creates a new, custom style that adds a red border around the current menu style: struct RedBorderMenuStyle: MenuStyle { func makeBody(configuration: Configuration) -> some View { Menu(configuration) .border(Color.red) } }

init · iOS 15.0+

init

TypeScript
static init(nsUnderlineStyle: _UIKit_NSUnderlineStyle): (_SwiftUICore_Text_LineStyle) | null
Swift declaration
init?(nsUnderlineStyle: NSUnderlineStyle)

Creates a ``Text.LineStyle`` from ``NSUnderlineStyle``. > Note: Use this initializer only if you need to convert an existing ``NSUnderlineStyle`` to a SwiftUI ``Text.LineStyle``. Otherwise, create a ``Text.LineStyle`` using an initializer like ``init(pattern:color:)``. - Parameter nsUnderlineStyle: A value of ``NSUnderlineStyle`` to wrap with ``Text.LineStyle``. - Returns: A new ``Text.LineStyle`` or `nil` when `nsUnderlineStyle` contains styles not supported by ``Text.LineStyle``.

method · iOS 15.0+

accessibilityTextContentType

TypeScript
accessibilityTextContentType(value: _SwiftUICore_AccessibilityTextContentType): _SwiftUICore_Text
Swift declaration
nonisolated func accessibilityTextContentType(_ value: AccessibilityTextContentType) -> Text

Sets an accessibility text content type. Use this modifier to set the content type of this accessibility element. Assistive technologies can use this property to choose an appropriate way to output the text. For example, when encountering a source coding context, VoiceOver could choose to speak all punctuation. If you don't set a value with this method, the default content type is ``AccessibilityTextContentType/plain``. - Parameter value: The accessibility content type from the available ``AccessibilityTextContentType`` options.

method · iOS 15.0+

accessibilityLabel

TypeScript
accessibilityLabel(label: _SwiftUICore_Text): _SwiftUICore_Text
Swift declaration
nonisolated func accessibilityLabel(_ label: Text) -> Text

Adds a label to the view that describes its contents. Use this method to provide an alternative accessibility label to the text that is displayed. For example, you can give an alternate label to a navigation title: var body: some View { NavigationView { ContentView() .navigationTitle(Text("􀈤").accessibilityLabel("Inbox")) } } You can't style the label that you add - Parameter label: The text view to add the label to.

method · iOS 16.0+

accessibilityLabel

TypeScript
accessibilityLabel61829(label: _Foundation_LocalizedStringResource): _SwiftUICore_Text
Swift declaration
@export(implementation) nonisolated func accessibilityLabel(_ label: LocalizedStringResource) -> Text

Adds a label to the view that describes its contents. Use this method to provide an alternative accessibility label to the text that is displayed. For example, you can give an alternate label to a navigation title: var body: some View { NavigationView { ContentView() .navigationTitle(Text("􀈤").accessibilityLabel("Inbox")) } } - Parameter label: The string resource for the alternative accessibility label.

method · iOS 15.0+

accessibilityLabel

TypeScript
accessibilityLabel70866(label: string): _SwiftUICore_Text
Swift declaration
nonisolated func accessibilityLabel<S>(_ label: S) -> Text where S : StringProtocol

Adds a label to the view that describes its contents. Use this method to provide an alternative accessibility label to the text that is displayed. For example, you can give an alternate label to a navigation title: var body: some View { NavigationView { ContentView() .navigationTitle(Text("􀈤").accessibilityLabel("Inbox")) } } - Parameter label: The string for the alternative accessibility label.

method · iOS 15.0+

accessibilityLabel

TypeScript
accessibilityLabel60513(labelKey: _SwiftUICore_LocalizedStringKey): _SwiftUICore_Text
Swift declaration
nonisolated func accessibilityLabel(_ labelKey: LocalizedStringKey) -> Text

Adds a label to the view that describes its contents. Use this method to provide an alternative accessibility label to the text that is displayed. For example, you can give an alternate label to a navigation title: var body: some View { NavigationView { ContentView() .navigationTitle(Text("􀈤").accessibilityLabel("Inbox")) } } - Parameter labelKey: The string key for the alternative accessibility label.

method · iOS 15.0+

accessibilityHeading

TypeScript
accessibilityHeading(level: _SwiftUICore_AccessibilityHeadingLevel): _SwiftUICore_Text
Swift declaration
nonisolated func accessibilityHeading(_ level: AccessibilityHeadingLevel) -> Text

Sets the accessibility level of this heading. Use this modifier to set the level of this heading in relation to other headings. The system speaks the level number of levels ``AccessibilityHeadingLevel/h1`` through ``AccessibilityHeadingLevel/h6`` alongside the text. The default heading level if you don't use this modifier is ``AccessibilityHeadingLevel/unspecified``. - Parameter level: The heading level to associate with this element from the available ``AccessibilityHeadingLevel`` levels.

init · iOS 15.0+

init

TypeScript
static initUiColor(uiColor: _UIKit_UIColor): _SwiftUICore_Color
Swift declaration
init(uiColor: UIColor)

Creates a color from a UIKit color. Use this method to create a SwiftUI color from a <doc://com.apple.documentation/documentation/UIKit/UIColor> instance. The new color preserves the adaptability of the original. For example, you can create a rectangle using <doc://com.apple.documentation/documentation/UIKit/UIColor/link> to see how the shade adjusts to match the user's system settings: struct Box: View { var body: some View { Color(uiColor: .link) .frame(width: 200, height: 100) } } The `Box` view defined above automatically changes its appearance when the user turns on Dark Mode. With the light and dark appearances placed side by side, you can see the subtle difference in shades: ![A side by side comparison of light and dark appearance screenshots of rectangles rendered with the link color. The light variant appears on the left, and the dark variant on the right.](Color-init-3) > Note: Use this initializer only if you need to convert an existing <doc://com.apple.documentation/documentation/UIKit/UIColor> to a SwiftUI color. Otherwise, create a SwiftUI ``Color`` using an initializer like ``init(_:red:green:blue:opacity:)``, or use a system color like ``ShapeStyle/blue``. - Parameter uiColor: A <doc://com.apple.documentation/documentation/UIKit/UIColor> instance from which to create a color.

init · iOS 13.0+ · Deprecated in iOS 100000.0

init

TypeScript
static init(color: _UIKit_UIColor): _SwiftUICore_Color
Swift declaration
init(_ color: UIColor)

Creates a color from a UIKit color. Use this method to create a SwiftUI color from a <doc://com.apple.documentation/documentation/UIKit/UIColor> instance. The new color preserves the adaptability of the original. For example, you can create a rectangle using <doc://com.apple.documentation/documentation/UIKit/UIColor/link> to see how the shade adjusts to match the user's system settings: struct Box: View { var body: some View { Color(UIColor.link) .frame(width: 200, height: 100) } } The `Box` view defined above automatically changes its appearance when the user turns on Dark Mode. With the light and dark appearances placed side by side, you can see the subtle difference in shades: ![A side by side comparison of light and dark appearance screenshots of rectangles rendered with the link color. The light variant appears on the left, and the dark variant on the right.](Color-init-3) > Note: Use this initializer only if you need to convert an existing <doc://com.apple.documentation/documentation/UIKit/UIColor> to a SwiftUI color. Otherwise, create a SwiftUI ``Color`` using an initializer like ``init(_:red:green:blue:opacity:)``, or use a system color like ``ShapeStyle/blue``. - Parameter color: A <doc://com.apple.documentation/documentation/UIKit/UIColor> instance from which to create a color.

init · iOS 13.0+

init

TypeScript
static init(uiImage: _UIKit_UIImage): _SwiftUICore_Image
Swift declaration
init(uiImage: UIImage)

Creates a SwiftUI image from a UIKit image instance. - Parameter uiImage: The UIKit image to wrap with a SwiftUI ``Image`` instance.

init · iOS 14.0+

init

TypeScript
static init(configuration: LabelStyleConfiguration): Label<LabelStyleConfiguration_Title, LabelStyleConfiguration_Icon>
Swift declaration
nonisolated init(_ configuration: LabelStyleConfiguration)

Creates a label representing the configuration of a style. You can use this initializer within the ``LabelStyle/makeBody(configuration:)`` method of a ``LabelStyle`` instance to create an instance of the label that's being styled. This is useful for custom label styles that only wish to modify the current style, as opposed to implementing a brand new style. For example, the following style adds a red border around the label, but otherwise preserves the current style: struct RedBorderedLabelStyle: LabelStyle { func makeBody(configuration: Configuration) -> some View { Label(configuration) .border(Color.red) } } - Parameter configuration: The label style to use.

init · iOS 16.0+

init

TypeScript
static initSystemImage(titleResource: _Foundation_LocalizedStringResource, name: string): Label<_SwiftUICore_Text, _SwiftUICore_Image>
Swift declaration
@export(implementation) nonisolated init(_ titleResource: LocalizedStringResource, systemImage name: String)

Creates a label with a system icon image and a title generated from a localized string. - Parameters: - titleResource: A title generated from a localized string. - name: The name of the image resource to lookup.

init · iOS 14.0+

init

TypeScript
static initSystemImage2271(titleKey: _SwiftUICore_LocalizedStringKey, name: string): Label<_SwiftUICore_Text, _SwiftUICore_Image>
Swift declaration
nonisolated init(_ titleKey: LocalizedStringKey, systemImage name: String)

Creates a label with a system icon image and a title generated from a localized string. - Parameters: - titleKey: A title generated from a localized string. - name: The name of the image resource to lookup.

init · iOS 14.0+

init

TypeScript
static initSystemImage62115(title: string, name: string): Label<_SwiftUICore_Text, _SwiftUICore_Image>
Swift declaration
nonisolated init<S>(_ title: S, systemImage name: String) where S : StringProtocol

Creates a label with a system icon image and a title generated from a string. - Parameters: - title: A string used as the label's title. - name: The name of the image resource to lookup.

init · iOS 17.0+

init

TypeScript
static initImage(titleResource: _Foundation_LocalizedStringResource, resource: _DeveloperToolsSupport_ImageResource): Label<_SwiftUICore_Text, _SwiftUICore_Image>
Swift declaration
@export(implementation) nonisolated init(_ titleResource: LocalizedStringResource, image resource: ImageResource)

Creates a label with an icon image and a title generated from a localized string. - Parameters: - titleResource: A title generated from a localized string. - resource: The image resource to lookup.

init · iOS 16.0+

init

TypeScript
static initImage96328(titleResource: _Foundation_LocalizedStringResource, name: string): Label<_SwiftUICore_Text, _SwiftUICore_Image>
Swift declaration
@export(implementation) nonisolated init(_ titleResource: LocalizedStringResource, image name: String)

Creates a label with an icon image and a title generated from a localized string. - Parameters: - titleResource: A title generated from a localized string. - name: The name of the image resource to lookup.

init · iOS 17.0+

init

TypeScript
static initImage7343(titleKey: _SwiftUICore_LocalizedStringKey, resource: _DeveloperToolsSupport_ImageResource): Label<_SwiftUICore_Text, _SwiftUICore_Image>
Swift declaration
nonisolated init(_ titleKey: LocalizedStringKey, image resource: ImageResource)

Creates a label with an icon image and a title generated from a localized string. - Parameters: - titleKey: A title generated from a localized string. - resource: The image resource to lookup.

init · iOS 14.0+

init

TypeScript
static initImage25193(titleKey: _SwiftUICore_LocalizedStringKey, name: string): Label<_SwiftUICore_Text, _SwiftUICore_Image>
Swift declaration
nonisolated init(_ titleKey: LocalizedStringKey, image name: String)

Creates a label with an icon image and a title generated from a localized string. - Parameters: - titleKey: A title generated from a localized string. - name: The name of the image resource to lookup.

init · iOS 17.0+

init

TypeScript
static initImage11013(title: string, resource: _DeveloperToolsSupport_ImageResource): Label<_SwiftUICore_Text, _SwiftUICore_Image>
Swift declaration
nonisolated init<S>(_ title: S, image resource: ImageResource) where S : StringProtocol

Creates a label with an icon image and a title generated from a string. - Parameters: - title: A string used as the label's title. - resource: The image resource to lookup.

init · iOS 14.0+

init

TypeScript
static initImage13949(title: string, name: string): Label<_SwiftUICore_Text, _SwiftUICore_Image>
Swift declaration
nonisolated init<S>(_ title: S, image name: String) where S : StringProtocol

Creates a label with an icon image and a title generated from a string. - Parameters: - title: A string used as the label's title. - name: The name of the image resource to lookup.

init · iOS 26.0+

init

TypeScript
static initRoleAction(role: ButtonRole, action: (() => void)): Promise<Button<DefaultButtonLabel>>
Swift declaration
@preconcurrency nonisolated init(role: ButtonRole, action: @escaping @MainActor () -> Void)

Creates a button that displays a default label. For example, the following view would display a button with a 'x' symbol in the toolbar. ```swift struct NewContactSheet: View { var body: some View { NavigationStack { NewContactEditor() .toolbar { Button(role: .cancel) { dismissView() } } } } } ``` - Parameters: - role: A semantic role describing the button. - action: The action to perform when the user triggers the button.

init · iOS 13.0+

init

TypeScript
static init(configuration: PrimitiveButtonStyleConfiguration): Button<PrimitiveButtonStyleConfiguration_Label>
Swift declaration
nonisolated init(_ configuration: PrimitiveButtonStyleConfiguration)

Creates a button based on a configuration for a style with a custom appearance and custom interaction behavior. Use this initializer within the ``PrimitiveButtonStyle/makeBody(configuration:)`` method of a ``PrimitiveButtonStyle`` to create an instance of the button that you want to style. This is useful for custom button styles that modify the current button style, rather than implementing a brand new style. For example, the following style adds a red border around the button, but otherwise preserves the button's current style: struct RedBorderedButtonStyle: PrimitiveButtonStyle { func makeBody(configuration: Configuration) -> some View { Button(configuration) .border(Color.red) } } - Parameter configuration: A configuration for a style with a custom appearance and custom interaction behavior.

init · iOS 16.0+

init

TypeScript
static initRoleAction13932(titleResource: _Foundation_LocalizedStringResource, role: (ButtonRole) | null, action: (() => void)): Promise<Button<_SwiftUICore_Text>>
Swift declaration
@preconcurrency @export(implementation) nonisolated init(_ titleResource: LocalizedStringResource, role: ButtonRole?, action: @escaping @MainActor () -> Void)

Creates a button with a specified role that generates its label from a localized string resource. This initializer creates a ``Text`` view on your behalf. See ``Text`` for more information about localizing strings. - Parameters: - titleResource: Text resource for the button's localized title, that describes the purpose of the button's `action`. - role: An optional semantic role describing the button. A value of `nil` means that the button doesn't have an assigned role. - action: The action to perform when the user triggers the button.

init · iOS 15.0+

init

TypeScript
static initRoleAction94939(titleKey: _SwiftUICore_LocalizedStringKey, role: (ButtonRole) | null, action: (() => void)): Promise<Button<_SwiftUICore_Text>>
Swift declaration
@preconcurrency nonisolated init(_ titleKey: LocalizedStringKey, role: ButtonRole?, action: @escaping @MainActor () -> Void)

Creates a button with a specified role that generates its label from a localized string key. This initializer creates a ``Text`` view on your behalf, and treats the localized key similar to ``Text/init(_:tableName:bundle:comment:)``. See ``Text`` for more information about localizing strings. - Parameters: - titleKey: The key for the button's localized title, that describes the purpose of the button's `action`. - role: An optional semantic role describing the button. A value of `nil` means that the button doesn't have an assigned role. - action: The action to perform when the user triggers the button.

init · iOS 15.0+

init

TypeScript
static initRoleAction99449(title: string, role: (ButtonRole) | null, action: (() => void)): Promise<Button<_SwiftUICore_Text>>
Swift declaration
@preconcurrency nonisolated init<S>(_ title: S, role: ButtonRole?, action: @escaping @MainActor () -> Void) where S : StringProtocol

Creates a button with a specified role that generates its label from a string. This initializer creates a ``Text`` view on your behalf, and treats the title similar to ``Text/init(_:)``. See ``Text`` for more information about localizing strings. - Parameters: - title: A string that describes the purpose of the button's `action`. - role: An optional semantic role describing the button. A value of `nil` means that the button doesn't have an assigned role. - action: The action to perform when the user interacts with the button.

init · iOS 16.0+

init

TypeScript
static initAction(titleResource: _Foundation_LocalizedStringResource, action: (() => void)): Promise<Button<_SwiftUICore_Text>>
Swift declaration
@preconcurrency @export(implementation) nonisolated init(_ titleResource: LocalizedStringResource, action: @escaping @MainActor () -> Void)

Creates a button that generates its label from a localized string resource. This initializer creates a ``Text`` view on your behalf. See ``Text`` for more information about localizing strings. - Parameters: - titleResource: Text resource for the button's localized title, that describes the purpose of the button's `action`. - action: The action to perform when the user triggers the button.

init · iOS 13.0+

init

TypeScript
static initAction12422(titleKey: _SwiftUICore_LocalizedStringKey, action: (() => void)): Promise<Button<_SwiftUICore_Text>>
Swift declaration
@preconcurrency nonisolated init(_ titleKey: LocalizedStringKey, action: @escaping @MainActor () -> Void)

Creates a button that generates its label from a localized string key. This initializer creates a ``Text`` view on your behalf, and treats the localized key similar to ``Text/init(_:tableName:bundle:comment:)``. See ``Text`` for more information about localizing strings. - Parameters: - titleKey: The key for the button's localized title, that describes the purpose of the button's `action`. - action: The action to perform when the user triggers the button.

init · iOS 13.0+

init

TypeScript
static initAction1196(title: string, action: (() => void)): Promise<Button<_SwiftUICore_Text>>
Swift declaration
@preconcurrency nonisolated init<S>(_ title: S, action: @escaping @MainActor () -> Void) where S : StringProtocol

Creates a button that generates its label from a string. This initializer creates a ``Text`` view on your behalf, and treats the title similar to ``Text/init(_:)``. See ``Text`` for more information about localizing strings. - Parameters: - title: A string that describes the purpose of the button's `action`. - action: The action to perform when the user triggers the button.

init · iOS 13.0+

init

TypeScript
static initValueInOnEditingChanged(value: _SwiftUICore_Binding<number>, bounds?: SDKHandle, onEditingChanged?: ((arg0: boolean) => void)): Slider<_SwiftUICore_EmptyView, _SwiftUICore_EmptyView>
Swift declaration
nonisolated init<V>(value: Binding<V>, in bounds: ClosedRange<V> = 0...1, onEditingChanged: @escaping (Bool) -> Void = { _ in }) where V : BinaryFloatingPoint, V.Stride : BinaryFloatingPoint

Creates a slider to select a value from a given range. - Parameters: - value: The selected value within `bounds`. - bounds: The range of the valid values. Defaults to `0...1`. - onEditingChanged: A callback for when editing begins and ends. The `value` of the created instance is equal to the position of the given value within `bounds`, mapped into `0...1`. The slider calls `onEditingChanged` when editing begins and ends. For example, on iOS, editing begins when the user starts to drag the thumb along the slider's track.

init · iOS 13.0+

init

TypeScript
static initValueInStepOnEditingChanged(value: _SwiftUICore_Binding<number>, bounds: SDKHandle, step?: number, onEditingChanged?: ((arg0: boolean) => void)): Slider<_SwiftUICore_EmptyView, _SwiftUICore_EmptyView>
Swift declaration
nonisolated init<V>(value: Binding<V>, in bounds: ClosedRange<V>, step: V.Stride = 1, onEditingChanged: @escaping (Bool) -> Void = { _ in }) where V : BinaryFloatingPoint, V.Stride : BinaryFloatingPoint

Creates a slider to select a value from a given range, subject to a step increment. - Parameters: - value: The selected value within `bounds`. - bounds: The range of the valid values. - step: The distance between each valid value. - onEditingChanged: A callback for when editing begins and ends. The `value` of the created instance is equal to the position of the given value within `bounds`, mapped into `0...1`. The slider calls `onEditingChanged` when editing begins and ends. For example, on iOS, editing begins when the user starts to drag the thumb along the slider's track.

init · iOS 13.0+

init

TypeScript
static init(configuration: ToggleStyleConfiguration): Toggle<ToggleStyleConfiguration_Label>
Swift declaration
nonisolated init(_ configuration: ToggleStyleConfiguration)

Creates a toggle based on a toggle style configuration. You can use this initializer within the ``ToggleStyle/makeBody(configuration:)`` method of a ``ToggleStyle`` to create an instance of the styled toggle. This is useful for custom toggle styles that only modify the current toggle style, as opposed to implementing a brand new style. For example, the following style adds a red border around the toggle, but otherwise preserves the toggle's current style: struct RedBorderToggleStyle: ToggleStyle { func makeBody(configuration: Configuration) -> some View { Toggle(configuration) .padding() .border(.red) } } - Parameter configuration: The properties of the toggle, including a label and a binding to the toggle's state.

init · iOS 16.0+

init

TypeScript
static initIsOn(titleResource: _Foundation_LocalizedStringResource, isOn: _SwiftUICore_Binding<boolean>): Toggle<_SwiftUICore_Text>
Swift declaration
@export(implementation) nonisolated init(_ titleResource: LocalizedStringResource, isOn: Binding<Bool>)

Creates a toggle that generates its label from a localized string resource. This initializer creates a ``Text`` view on your behalf. See `Text` for more information about localizing strings. - Parameters: - titleResource: Text resource for the toggle's localized title, that describes the purpose of the toggle. - isOn: A binding to a property that indicates whether the toggle is on or off.

init · iOS 13.0+

init

TypeScript
static initIsOn40719(titleKey: _SwiftUICore_LocalizedStringKey, isOn: _SwiftUICore_Binding<boolean>): Toggle<_SwiftUICore_Text>
Swift declaration
nonisolated init(_ titleKey: LocalizedStringKey, isOn: Binding<Bool>)

Creates a toggle that generates its label from a localized string key. This initializer creates a ``Text`` view on your behalf, and treats the localized key similar to ``Text/init(_:tableName:bundle:comment:)``. See `Text` for more information about localizing strings. - Parameters: - titleKey: The key for the toggle's localized title, that describes the purpose of the toggle. - isOn: A binding to a property that indicates whether the toggle is on or off.

init · iOS 13.0+

init

TypeScript
static initIsOn19415(title: string, isOn: _SwiftUICore_Binding<boolean>): Toggle<_SwiftUICore_Text>
Swift declaration
nonisolated init<S>(_ title: S, isOn: Binding<Bool>) where S : StringProtocol

Creates a toggle that generates its label from a string. This initializer creates a ``Text`` view on your behalf. See `Text` for more information about localizing strings. - Parameters: - title: A string that describes the purpose of the toggle. - isOn: A binding to a property that indicates whether the toggle is on or off.

init · iOS 16.0+

init

TypeScript
static initOnIncrementOnDecrementOnEditingChanged(titleResource: _Foundation_LocalizedStringResource, onIncrement?: ((() => void)) | null, onDecrement?: ((() => void)) | null, onEditingChanged?: ((arg0: boolean) => void)): Stepper<_SwiftUICore_Text>
Swift declaration
@export(implementation) nonisolated init(_ titleResource: LocalizedStringResource, onIncrement: (() -> Void)?, onDecrement: (() -> Void)?, onEditingChanged: @escaping (Bool) -> Void = { _ in })

Creates a stepper that uses a title key and executes the closures you provide when the user clicks or taps the stepper's increment and decrement buttons. Use this initializer to create a stepper with a custom title that executes closures you provide when either of the stepper's increment or decrement buttons are pressed. This version of ``Stepper`` doesn't take a binding to a value, nor does it allow you to specify a range of acceptable values, or a step value -- it simply calls the closures you provide when the control's buttons are pressed. The example below uses an array that holds a number of ``Color`` values, a local state variable, `value`, to set the control's background color, and title label. When the user clicks or taps on the stepper's increment or decrement buttons SwiftUI executes the relevant closure that updates `value`, wrapping the `value` to prevent overflow. SwiftUI then re-renders the view, updating the text and background color to match the current index: struct StepperView: View { @State private var value = 0 let colors: [Color] = [.orange, .red, .gray, .blue, .green, .purple, .pink] func incrementStep() { value += 1 if value >= colors.count { value = 0 } } func decrementStep() { value -= 1 if value < 0 { value = colors.count - 1 } } var body: some View { Stepper("Value: \(value) Color: \(colors[value].description)", onIncrement: incrementStep, onDecrement: decrementStep) .padding(5) .background(colors[value]) } } ![A view displaying a stepper that uses a title resource for the stepper's localized title and that changes the background color of its view when incremented or decremented selecting a color from a predefined array using the stepper value as the index.](SwiftUI-Stepper-increment-decrement-closures.png) - Parameters: - titleResource: Text resource for the stepper's localized title describing the purpose of the stepper. - onIncrement: The closure to execute when the user clicks or taps the control's plus button. - onDecrement: The closure to execute when the user clicks or taps the control's minus button. - onEditingChanged: A closure that's called when editing begins and ends. For example, on iOS, the user may touch and hold the increment or decrement buttons on a `Stepper` which causes the execution of the `onEditingChanged` closure at the start and end of the gesture.

init · iOS 13.0+

init

TypeScript
static initOnIncrementOnDecrementOnEditingChanged14501(titleKey: _SwiftUICore_LocalizedStringKey, onIncrement?: ((() => void)) | null, onDecrement?: ((() => void)) | null, onEditingChanged?: ((arg0: boolean) => void)): Stepper<_SwiftUICore_Text>
Swift declaration
nonisolated init(_ titleKey: LocalizedStringKey, onIncrement: (() -> Void)?, onDecrement: (() -> Void)?, onEditingChanged: @escaping (Bool) -> Void = { _ in })

Creates a stepper that uses a title key and executes the closures you provide when the user clicks or taps the stepper's increment and decrement buttons. Use this initializer to create a stepper with a custom title that executes closures you provide when either of the stepper's increment or decrement buttons are pressed. This version of ``Stepper`` doesn't take a binding to a value, nor does it allow you to specify a range of acceptable values, or a step value -- it simply calls the closures you provide when the control's buttons are pressed. The example below uses an array that holds a number of ``Color`` values, a local state variable, `value`, to set the control's background color, and title label. When the user clicks or taps on the stepper's increment or decrement buttons SwiftUI executes the relevant closure that updates `value`, wrapping the `value` to prevent overflow. SwiftUI then re-renders the view, updating the text and background color to match the current index: struct StepperView: View { @State private var value = 0 let colors: [Color] = [.orange, .red, .gray, .blue, .green, .purple, .pink] func incrementStep() { value += 1 if value >= colors.count { value = 0 } } func decrementStep() { value -= 1 if value < 0 { value = colors.count - 1 } } var body: some View { Stepper("Value: \(value) Color: \(colors[value].description)", onIncrement: incrementStep, onDecrement: decrementStep) .padding(5) .background(colors[value]) } } ![A view displaying a stepper that uses a title key for the stepper's localized title and that changes the background color of its view when incremented or decremented selecting a color from a predefined array using the stepper value as the index.](SwiftUI-Stepper-increment-decrement-closures.png) - Parameters: - titleKey: The key for the stepper's localized title describing the purpose of the stepper. - onIncrement: The closure to execute when the user clicks or taps the control's plus button. - onDecrement: The closure to execute when the user clicks or taps the control's minus button. - onEditingChanged: A closure that's called when editing begins and ends. For example, on iOS, the user may touch and hold the increment or decrement buttons on a `Stepper` which causes the execution of the `onEditingChanged` closure at the start and end of the gesture.

init · iOS 13.0+

init

TypeScript
static initOnIncrementOnDecrementOnEditingChanged65471(title: string, onIncrement?: ((() => void)) | null, onDecrement?: ((() => void)) | null, onEditingChanged?: ((arg0: boolean) => void)): Stepper<_SwiftUICore_Text>
Swift declaration
nonisolated init<S>(_ title: S, onIncrement: (() -> Void)?, onDecrement: (() -> Void)?, onEditingChanged: @escaping (Bool) -> Void = { _ in }) where S : StringProtocol

Creates a stepper using a title string and that executes closures you provide when the user clicks or taps the stepper's increment or decrement buttons. Use `Stepper(_:onIncrement:onDecrement:onEditingChanged:)` to create a control with a custom title that executes closures you provide when the user clicks or taps on the stepper's increment or decrement buttons. The example below uses an array that holds a number of ``Color`` values, a local state variable, `value`, to set the control's background color, and title label. When the user clicks or taps on the stepper's increment or decrement buttons SwiftUI executes the relevant closure that updates `value`, wrapping the `value` to prevent overflow. SwiftUI then re-renders the view, updating the text and background color to match the current index: struct StepperView: View { @State private var value = 0 let title: String let colors: [Color] = [.orange, .red, .gray, .blue, .green, .purple, .pink] func incrementStep() { value += 1 if value >= colors.count { value = 0 } } func decrementStep() { value -= 1 if value < 0 { value = colors.count - 1 } } var body: some View { Stepper(title, onIncrement: incrementStep, onDecrement: decrementStep) .padding(5) .background(colors[value]) } } ![A view displaying a stepper that uses a string for the stepper's title and that changes the background color of its view when incremented or decremented selecting a color from a predefined array using the stepper's value as the index.](SwiftUI-Stepper-increment-decrement-closures.png) - Parameters: - title: A string describing the purpose of the stepper. - onIncrement: The closure to execute when the user clicks or taps the control's plus button. - onDecrement: The closure to execute when the user clicks or taps the control's minus button. - onEditingChanged: A closure that's called when editing begins and ends. For example, on iOS, the user may touch and hold the increment or decrement buttons on a `Stepper` which causes the execution of the `onEditingChanged` closure at the start and end of the gesture.

init · iOS 14.0+

init

TypeScript
static init(configuration: GroupBoxStyleConfiguration): GroupBox<GroupBoxStyleConfiguration_Label, GroupBoxStyleConfiguration_Content>
Swift declaration
nonisolated init(_ configuration: GroupBoxStyleConfiguration)

Creates a group box based on a style configuration. Use this initializer within the ``GroupBoxStyle/makeBody(configuration:)`` method of a ``GroupBoxStyle`` instance to create a styled group box, with customizations, while preserving its existing style. The following example adds a pink border around the group box, without overriding its current style: struct PinkBorderGroupBoxStyle: GroupBoxStyle { func makeBody(configuration: Configuration) -> some View { GroupBox(configuration) .border(Color.pink) } } - Parameter configuration: The properties of the group box instance being created.

init · iOS 16.0+

init

TypeScript
static initItemSubjectMessagePreview(item: string, subject: (_SwiftUICore_Text) | null, message: (_SwiftUICore_Text) | null, preview: SharePreview<string, string>): ShareLink<SDKHandle, string, string, DefaultShareLinkLabel>
Swift declaration
nonisolated init<I>(item: I, subject: Text? = nil, message: Text? = nil, preview: SharePreview<PreviewImage, PreviewIcon>) where Data == CollectionOfOne<I>, I : Transferable

Creates an instance that presents the share interface. Use this initializer when you want the system-standard appearance for `ShareLink`. - Parameters: - item: The item to share. - subject: A title for the item to show when sharing to activities that support a subject field. - message: A description of the item to show when sharing to activities that support a message field. Activities may support attributed text or HTML strings. - preview: A representation of the item to render in a preview.

init · iOS 16.0+

init

TypeScript
static initItemSubjectMessagePreview59523(title: string, item: string, subject: (_SwiftUICore_Text) | null, message: (_SwiftUICore_Text) | null, preview: SharePreview<string, string>): ShareLink<SDKHandle, string, string, DefaultShareLinkLabel>
Swift declaration
nonisolated init<S, I>(_ title: S, item: I, subject: Text? = nil, message: Text? = nil, preview: SharePreview<PreviewImage, PreviewIcon>) where Data == CollectionOfOne<I>, S : StringProtocol, I : Transferable

Creates an instance, with a custom label, that presents the share interface. - Parameters: - title: The title of the share action. - item: The item to share. - subject: A title for the item to show when sharing to activities that support a subject field. - message: A description of the item to show when sharing to activities that support a message field. Activities may support attributed text or HTML strings. - preview: A representation of the item to render in a preview.

init · iOS 16.0+

init

TypeScript
static initItemSubjectMessagePreview55389(titleResource: _Foundation_LocalizedStringResource, item: string, subject: (_SwiftUICore_Text) | null, message: (_SwiftUICore_Text) | null, preview: SharePreview<string, string>): ShareLink<SDKHandle, string, string, DefaultShareLinkLabel>
Swift declaration
@export(implementation) nonisolated init<I>(_ titleResource: LocalizedStringResource, item: I, subject: Text? = nil, message: Text? = nil, preview: SharePreview<PreviewImage, PreviewIcon>) where Data == CollectionOfOne<I>, I : Transferable

Creates an instance, with a custom label, that presents the share interface. - Parameters: - titleResource: A resource for the title of the share action. - item: The item to share. - subject: A title for the item to show when sharing to activities that support a subject field. - message: A description of the item to show when sharing to activities that support a message field. Activities may support attributed text or HTML strings. - preview: A representation of the item to render in a preview.

init · iOS 16.0+

init

TypeScript
static initItemSubjectMessagePreview47140(titleKey: _SwiftUICore_LocalizedStringKey, item: string, subject: (_SwiftUICore_Text) | null, message: (_SwiftUICore_Text) | null, preview: SharePreview<string, string>): ShareLink<SDKHandle, string, string, DefaultShareLinkLabel>
Swift declaration
nonisolated init<I>(_ titleKey: LocalizedStringKey, item: I, subject: Text? = nil, message: Text? = nil, preview: SharePreview<PreviewImage, PreviewIcon>) where Data == CollectionOfOne<I>, I : Transferable

Creates an instance, with a custom label, that presents the share interface. - Parameters: - titleKey: A key identifying the title of the share action. - item: The item to share. - subject: A title for the item to show when sharing to activities that support a subject field. - message: A description of the item to show when sharing to activities that support a message field. Activities may support attributed text or HTML strings. - preview: A representation of the item to render in a preview.

init · iOS 16.0+

init

TypeScript
static initItemSubjectMessagePreview63925(title: _SwiftUICore_Text, item: string, subject: (_SwiftUICore_Text) | null, message: (_SwiftUICore_Text) | null, preview: SharePreview<string, string>): ShareLink<SDKHandle, string, string, DefaultShareLinkLabel>
Swift declaration
nonisolated init<I>(_ title: Text, item: I, subject: Text? = nil, message: Text? = nil, preview: SharePreview<PreviewImage, PreviewIcon>) where Data == CollectionOfOne<I>, I : Transferable

Creates an instance, with a custom label, that presents the share interface. - Parameters: - title: The title of the share action. - item: The item to share. - subject: A title for the item to show when sharing to activities that support a subject field. - message: A description of the item to show when sharing to activities that support a message field. Activities may support attributed text or HTML strings. - preview: A representation of the item to render in a preview.

init · iOS 16.0+

init

TypeScript
static initItemsSubjectMessage(items: Array<string>, subject?: (_SwiftUICore_Text) | null, message?: (_SwiftUICore_Text) | null): ShareLink<Array<string>, never, never, DefaultShareLinkLabel>
Swift declaration
nonisolated init(items: Data, subject: Text? = nil, message: Text? = nil)

Creates an instance that presents the share interface. Use this initializer when you want the system-standard appearance for `ShareLink`. - Parameters: - items: The items to share. - subject: A title for the items to show when sharing to activities that support a subject field. - message: A description of the items to show when sharing to activities that support a message field. Activities may support attributed text or HTML strings.

init · iOS 16.0+

init

TypeScript
static initItemsSubjectMessage61034(titleKey: _SwiftUICore_LocalizedStringKey, items: Array<string>, subject?: (_SwiftUICore_Text) | null, message?: (_SwiftUICore_Text) | null): ShareLink<Array<string>, never, never, DefaultShareLinkLabel>
Swift declaration
nonisolated init(_ titleKey: LocalizedStringKey, items: Data, subject: Text? = nil, message: Text? = nil)

Creates an instance, with a custom label, that presents the share interface. - Parameters: - titleKey: A key identifying the title of the share action. - items: The items to share. - subject: A title for the items to show when sharing to activities that support a subject field. - message: A description of the items to show when sharing to activities that support a message field. Activities may support attributed text or HTML strings.

init · iOS 16.0+

init

TypeScript
static initItemsSubjectMessage1013(title: _SwiftUICore_Text, items: Array<string>, subject?: (_SwiftUICore_Text) | null, message?: (_SwiftUICore_Text) | null): ShareLink<Array<string>, never, never, DefaultShareLinkLabel>
Swift declaration
nonisolated init(_ title: Text, items: Data, subject: Text? = nil, message: Text? = nil)

Creates an instance, with a custom label, that presents the share interface. - Parameters: - title: The title of the share action. - items: The items to share. - subject: A title for the items to show when sharing to activities that support a subject field. - message: A description of the items to show when sharing to activities that support a message field. Activities may support attributed text or HTML strings.

init · iOS 16.0+

init

TypeScript
static initItemsSubjectMessage95416(titleResource: _Foundation_LocalizedStringResource, items: Array<string>, subject?: (_SwiftUICore_Text) | null, message?: (_SwiftUICore_Text) | null): ShareLink<Array<string>, never, never, DefaultShareLinkLabel>
Swift declaration
@export(implementation) nonisolated init(_ titleResource: LocalizedStringResource, items: Data, subject: Text? = nil, message: Text? = nil)

Creates an instance, with a custom label, that presents the share interface. - Parameters: - titleResource: A resource for the title of the share action. - items: The items to share. - subject: A title for the items to show when sharing to activities that support a subject field. - message: A description of the items to show when sharing to activities that support a message field. Activities may support attributed text or HTML strings.

init · iOS 16.0+

init

TypeScript
static initItemsSubjectMessage8002(title: string, items: Array<string>, subject?: (_SwiftUICore_Text) | null, message?: (_SwiftUICore_Text) | null): ShareLink<Array<string>, never, never, DefaultShareLinkLabel>
Swift declaration
nonisolated init<S>(_ title: S, items: Data, subject: Text? = nil, message: Text? = nil) where S : StringProtocol

Creates an instance, with a custom label, that presents the share interface. - Parameters: - title: The title of the share action. - items: The item to share. - subject: A title for the items to show when sharing to activities that support a subject field. - message: A description of the items to show when sharing to activities that support a message field. Activities may support attributed text or HTML strings.

init · iOS 16.0+

init

TypeScript
static initItemsSubjectMessage66560(items: Array<string>, subject?: (_SwiftUICore_Text) | null, message?: (_SwiftUICore_Text) | null): ShareLink<Array<string>, never, never, DefaultShareLinkLabel>
Swift declaration
nonisolated init(items: Data, subject: Text? = nil, message: Text? = nil)

Creates an instance that presents the share interface. Use this initializer when you want the system-standard appearance for `ShareLink`. - Parameters: - items: The items to share. - subject: A title for the items to show when sharing to activities that support a subject field. - message: A description of the items to show when sharing to activities that support a message field. Activities may support attributed text or HTML strings.

init · iOS 16.0+

init

TypeScript
static initItemsSubjectMessage98901(titleResource: _Foundation_LocalizedStringResource, items: Array<string>, subject?: (_SwiftUICore_Text) | null, message?: (_SwiftUICore_Text) | null): ShareLink<Array<string>, never, never, DefaultShareLinkLabel>
Swift declaration
@export(implementation) nonisolated init(_ titleResource: LocalizedStringResource, items: Data, subject: Text? = nil, message: Text? = nil)

Creates an instance, with a custom label, that presents the share interface. - Parameters: - titleResource: A resource for the title of the share action. - items: The items to share. - subject: A title for the items to show when sharing to activities that support a subject field. - message: A description of the items to show when sharing to activities that support a message field. Activities may support attributed text or HTML strings.

init · iOS 16.0+

init

TypeScript
static initItemsSubjectMessage83489(titleKey: _SwiftUICore_LocalizedStringKey, items: Array<string>, subject?: (_SwiftUICore_Text) | null, message?: (_SwiftUICore_Text) | null): ShareLink<Array<string>, never, never, DefaultShareLinkLabel>
Swift declaration
nonisolated init(_ titleKey: LocalizedStringKey, items: Data, subject: Text? = nil, message: Text? = nil)

Creates an instance, with a custom label, that presents the share interface. - Parameters: - titleKey: A key identifying the title of the share action. - items: The items to share. - subject: A title for the items to show when sharing to activities that support a subject field. - message: A description of the items to show when sharing to activities that support a message field. Activities may support attributed text or HTML strings.

init · iOS 16.0+

init

TypeScript
static initItemsSubjectMessage14241(title: _SwiftUICore_Text, items: Array<string>, subject?: (_SwiftUICore_Text) | null, message?: (_SwiftUICore_Text) | null): ShareLink<Array<string>, never, never, DefaultShareLinkLabel>
Swift declaration
nonisolated init(_ title: Text, items: Data, subject: Text? = nil, message: Text? = nil)

Creates an instance, with a custom label, that presents the share interface. - Parameters: - title: The title of the share action. - items: The items to share. - subject: A title for the items to show when sharing to activities that support a subject field. - message: A description of the items to show when sharing to activities that support a message field. Activities may support attributed text or HTML strings.

init · iOS 16.0+

init

TypeScript
static initItemsSubjectMessage47445(title: string, items: Array<string>, subject?: (_SwiftUICore_Text) | null, message?: (_SwiftUICore_Text) | null): ShareLink<Array<string>, never, never, DefaultShareLinkLabel>
Swift declaration
nonisolated init<S>(_ title: S, items: Data, subject: Text? = nil, message: Text? = nil) where S : StringProtocol

Creates an instance, with a custom label, that presents the share interface. - Parameters: - title: The title of the share action. - items: The item to share. - subject: A title for the items to show when sharing to activities that support a subject field. - message: A description of the items to show when sharing to activities that support a message field. Activities may support attributed text or HTML strings.

init · iOS 16.0+

init

TypeScript
static initItemSubjectMessage(item: string, subject?: (_SwiftUICore_Text) | null, message?: (_SwiftUICore_Text) | null): ShareLink<SDKHandle, never, never, DefaultShareLinkLabel>
Swift declaration
nonisolated init(item: URL, subject: Text? = nil, message: Text? = nil) where Data == CollectionOfOne<URL>

Creates an instance that presents the share interface. Use this initializer when you want the system-standard appearance for `ShareLink`. - Parameters: - item: The item to share. - subject: A title for the item to show when sharing to activities that support a subject field. - message: A description of the item to show when sharing to activities that support a message field. Activities may support attributed text or HTML strings.

init · iOS 16.0+

init

TypeScript
static initItemSubjectMessage67790(item: string, subject?: (_SwiftUICore_Text) | null, message?: (_SwiftUICore_Text) | null): ShareLink<SDKHandle, never, never, DefaultShareLinkLabel>
Swift declaration
nonisolated init(item: String, subject: Text? = nil, message: Text? = nil) where Data == CollectionOfOne<String>

Creates an instance that presents the share interface. Use this initializer when you want the system-standard appearance for `ShareLink`. - Parameters: - item: The item to share. - subject: A title for the item to show when sharing to activities that support a subject field. - message: A description of the item to show when sharing to activities that support a message field. Activities may support attributed text or HTML strings.

init · iOS 16.0+

init

TypeScript
static initItemSubjectMessage41860(titleKey: _SwiftUICore_LocalizedStringKey, item: string, subject?: (_SwiftUICore_Text) | null, message?: (_SwiftUICore_Text) | null): ShareLink<SDKHandle, never, never, DefaultShareLinkLabel>
Swift declaration
nonisolated init(_ titleKey: LocalizedStringKey, item: URL, subject: Text? = nil, message: Text? = nil) where Data == CollectionOfOne<URL>

Creates an instance, with a custom label, that presents the share interface. - Parameters: - titleKey: A key identifying the title of the share action. - item: The item to share. - subject: A title for the item to show when sharing to activities that support a subject field. - message: A description of the item to show when sharing to activities that support a message field. Activities may support attributed text or HTML strings.

init · iOS 16.0+

init

TypeScript
static initItemSubjectMessage60070(title: _SwiftUICore_Text, item: string, subject?: (_SwiftUICore_Text) | null, message?: (_SwiftUICore_Text) | null): ShareLink<SDKHandle, never, never, DefaultShareLinkLabel>
Swift declaration
nonisolated init(_ title: Text, item: URL, subject: Text? = nil, message: Text? = nil) where Data == CollectionOfOne<URL>

Creates an instance, with a custom label, that presents the share interface. - Parameters: - title: The title of the share action. - item: The item to share. - subject: A title for the item to show when sharing to activities that support a subject field. - message: A description of the item to show when sharing to activities that support a message field. Activities may support attributed text or HTML strings.

init · iOS 16.0+

init

TypeScript
static initItemSubjectMessage88991(titleResource: _Foundation_LocalizedStringResource, item: string, subject?: (_SwiftUICore_Text) | null, message?: (_SwiftUICore_Text) | null): ShareLink<SDKHandle, never, never, DefaultShareLinkLabel>
Swift declaration
@export(implementation) nonisolated init(_ titleResource: LocalizedStringResource, item: URL, subject: Text? = nil, message: Text? = nil) where Data == CollectionOfOne<URL>

Creates an instance, with a custom label, that presents the share interface. - Parameters: - titleResource: A resource for the title of the share action. - item: The item to share. - subject: A title for the item to show when sharing to activities that support a subject field. - message: A description of the item to show when sharing to activities that support a message field. Activities may support attributed text or HTML strings.

init · iOS 16.0+

init

TypeScript
static initItemSubjectMessage85657(title: string, item: string, subject?: (_SwiftUICore_Text) | null, message?: (_SwiftUICore_Text) | null): ShareLink<SDKHandle, never, never, DefaultShareLinkLabel>
Swift declaration
nonisolated init<S>(_ title: S, item: URL, subject: Text? = nil, message: Text? = nil) where Data == CollectionOfOne<URL>, S : StringProtocol

Creates an instance, with a custom label, that presents the share interface. - Parameters: - title: The title of the share action. - item: The item to share. - subject: A title for the item to show when sharing to activities that support a subject field. - message: A description of the item to show when sharing to activities that support a message field. Activities may support attributed text or HTML strings.

init · iOS 16.0+

init

TypeScript
static initItemSubjectMessage63559(titleResource: _Foundation_LocalizedStringResource, item: string, subject?: (_SwiftUICore_Text) | null, message?: (_SwiftUICore_Text) | null): ShareLink<SDKHandle, never, never, DefaultShareLinkLabel>
Swift declaration
@export(implementation) nonisolated init(_ titleResource: LocalizedStringResource, item: String, subject: Text? = nil, message: Text? = nil) where Data == CollectionOfOne<String>

Creates an instance, with a custom label, that presents the share interface. - Parameters: - titleResource: A resource for the title of the share action. - item: The item to share. - subject: A title for the item to show when sharing to activities that support a subject field. - message: A description of the item to show when sharing to activities that support a message field. Activities may support attributed text or HTML strings.

init · iOS 16.0+

init

TypeScript
static initItemSubjectMessage66349(titleKey: _SwiftUICore_LocalizedStringKey, item: string, subject?: (_SwiftUICore_Text) | null, message?: (_SwiftUICore_Text) | null): ShareLink<SDKHandle, never, never, DefaultShareLinkLabel>
Swift declaration
nonisolated init(_ titleKey: LocalizedStringKey, item: String, subject: Text? = nil, message: Text? = nil) where Data == CollectionOfOne<String>

Creates an instance, with a custom label, that presents the share interface. - Parameters: - titleKey: A key identifying the title of the share action. - item: The item to share. - subject: A title for the item to show when sharing to activities that support a subject field. - message: A description of the item to show when sharing to activities that support a message field. Activities may support attributed text or HTML strings.

init · iOS 16.0+

init

TypeScript
static initItemSubjectMessage12188(title: _SwiftUICore_Text, item: string, subject?: (_SwiftUICore_Text) | null, message?: (_SwiftUICore_Text) | null): ShareLink<SDKHandle, never, never, DefaultShareLinkLabel>
Swift declaration
nonisolated init(_ title: Text, item: String, subject: Text? = nil, message: Text? = nil) where Data == CollectionOfOne<String>

Creates an instance, with a custom label, that presents the share interface. - Parameters: - title: The title of the share action. - item: The item to share. - subject: A title for the item to show when sharing to activities that support a subject field. - message: A description of the item to show when sharing to activities that support a message field. Activities may support attributed text or HTML strings.

init · iOS 16.0+

init

TypeScript
static initItemSubjectMessage10880(title: string, item: string, subject?: (_SwiftUICore_Text) | null, message?: (_SwiftUICore_Text) | null): ShareLink<SDKHandle, never, never, DefaultShareLinkLabel>
Swift declaration
nonisolated init<S>(_ title: S, item: String, subject: Text? = nil, message: Text? = nil) where Data == CollectionOfOne<String>, S : StringProtocol

Creates an instance, with a custom label, that presents the share interface. - Parameters: - title: The title of the share action. - item: The item to share. - subject: A title for the item to show when sharing to activities that support a subject field. - message: A description of the item to show when sharing to activities that support a message field. Activities may support attributed text or HTML strings.

init · iOS 13.0+ · Deprecated in iOS 100000.0

init

TypeScript
static initTextOnEditingChangedOnCommit(titleKey: _SwiftUICore_LocalizedStringKey, text: _SwiftUICore_Binding<string>, onEditingChanged: ((arg0: boolean) => void), onCommit: (() => void)): TextField<_SwiftUICore_Text>
Swift declaration
nonisolated init(_ titleKey: LocalizedStringKey, text: Binding<String>, onEditingChanged: @escaping (Bool) -> Void, onCommit: @escaping () -> Void)

Creates a text field with a text label generated from a localized title string. - Parameters: - titleKey: The key for the localized title of the text field, describing its purpose. - text: The text to display and edit. - onEditingChanged: The action to perform when the user begins editing `text` and after the user finishes editing `text`. The closure receives a Boolean value that indicates the editing status: `true` when the user begins editing, `false` when they finish. - onCommit: An action to perform when the user performs an action (for example, when the user presses the Return key) while the text field has focus.

init · iOS 13.0+ · Deprecated in iOS 100000.0

init

TypeScript
static initTextOnEditingChangedOnCommit40469(title: string, text: _SwiftUICore_Binding<string>, onEditingChanged: ((arg0: boolean) => void), onCommit: (() => void)): TextField<_SwiftUICore_Text>
Swift declaration
nonisolated init<S>(_ title: S, text: Binding<String>, onEditingChanged: @escaping (Bool) -> Void, onCommit: @escaping () -> Void) where S : StringProtocol

Creates a text field with a text label generated from a title string. - Parameters: - title: The title of the text view, describing its purpose. - text: The text to display and edit. - onEditingChanged: The action to perform when the user begins editing `text` and after the user finishes editing `text`. The closure receives a Boolean value that indicates the editing status: `true` when the user begins editing, `false` when they finish. - onCommit: An action to perform when the user performs an action (for example, when the user presses the Return key) while the text field has focus.

init · iOS 13.0+ · Deprecated in iOS 100000.0

init

TypeScript
static initTextOnEditingChanged(titleKey: _SwiftUICore_LocalizedStringKey, text: _SwiftUICore_Binding<string>, onEditingChanged: ((arg0: boolean) => void)): TextField<_SwiftUICore_Text>
Swift declaration
@export(implementation) nonisolated init(_ titleKey: LocalizedStringKey, text: Binding<String>, onEditingChanged: @escaping (Bool) -> Void)

Creates a text field with a text label generated from a localized title string. - Parameters: - titleKey: The key for the localized title of the text field, describing its purpose. - text: The text to display and edit. - onEditingChanged: The action to perform when the user begins editing `text` and after the user finishes editing `text`. The closure receives a Boolean value that indicates the editing status: `true` when the user begins editing, `false` when they finish.

init · iOS 13.0+ · Deprecated in iOS 100000.0

init

TypeScript
static initTextOnEditingChanged42059(title: string, text: _SwiftUICore_Binding<string>, onEditingChanged: ((arg0: boolean) => void)): TextField<_SwiftUICore_Text>
Swift declaration
@export(implementation) nonisolated init<S>(_ title: S, text: Binding<String>, onEditingChanged: @escaping (Bool) -> Void) where S : StringProtocol

Creates a text field with a text label generated from a title string. - Parameters: - title: The title of the text view, describing its purpose. - text: The text to display and edit. - onEditingChanged: The action to perform when the user begins editing `text` and after the user finishes editing `text`. The closure receives a Boolean value that indicates the editing status: `true` when the user begins editing, `false` when they finish.

init · iOS 16.0+

init

TypeScript
static initTextAxis(titleResource: _Foundation_LocalizedStringResource, text: _SwiftUICore_Binding<string>, axis: _SwiftUICore_Axis): TextField<_SwiftUICore_Text>
Swift declaration
@export(implementation) nonisolated init(_ titleResource: LocalizedStringResource, text: Binding<String>, axis: Axis)

Creates a text field with a preferred axis and a text label generated from a localized title string resource. Specify a preferred axis in which the text field should scroll its content when it does not fit in the available space. Depending on the style of the field, this axis may not be respected. Use the ``View/onSubmit(of:_:)`` modifier to invoke an action whenever the user submits this text field. - Parameters: - titleResource: The localized title of the text field, describing its purpose. - text: The text to display and edit. - axis: The axis in which to scroll text when it doesn't fit in the available space.

init · iOS 16.0+

init

TypeScript
static initTextAxis95543(titleKey: _SwiftUICore_LocalizedStringKey, text: _SwiftUICore_Binding<string>, axis: _SwiftUICore_Axis): TextField<_SwiftUICore_Text>
Swift declaration
nonisolated init(_ titleKey: LocalizedStringKey, text: Binding<String>, axis: Axis)

Creates a text field with a preferred axis and a text label generated from a localized title string. Specify a preferred axis in which the text field should scroll its content when it does not fit in the available space. Depending on the style of the field, this axis may not be respected. Use the ``View/onSubmit(of:_:)`` modifier to invoke an action whenever the user submits this text field. - Parameters: - titleKey: The key for the localized title of the text field, describing its purpose. - text: The text to display and edit. - axis: The axis in which to scroll text when it doesn't fit in the available space.

init · iOS 16.0+

init

TypeScript
static initTextAxis17837(title: string, text: _SwiftUICore_Binding<string>, axis: _SwiftUICore_Axis): TextField<_SwiftUICore_Text>
Swift declaration
nonisolated init<S>(_ title: S, text: Binding<String>, axis: Axis) where S : StringProtocol

Creates a text field with a preferred axis and a text label generated from a title string. Specify a preferred axis in which the text field should scroll its content when it does not fit in the available space. Depending on the style of the field, this axis may not be respected. Use the ``View/onSubmit(of:_:)`` modifier to invoke an action whenever the user submits this text field. - Parameters: - title: The title of the text view, describing its purpose. - text: The text to display and edit. - axis: The axis in which to scroll text when it doesn't fit in the available space.

init · iOS 16.0+

init

TypeScript
static initTextPromptAxis(titleResource: _Foundation_LocalizedStringResource, text: _SwiftUICore_Binding<string>, prompt: (_SwiftUICore_Text) | null, axis: _SwiftUICore_Axis): TextField<_SwiftUICore_Text>
Swift declaration
@export(implementation) nonisolated init(_ titleResource: LocalizedStringResource, text: Binding<String>, prompt: Text?, axis: Axis)

Creates a text field with a preferred axis and a text label generated from a localized title string resource. Specify a preferred axis in which the text field should scroll its content when it does not fit in the available space. Depending on the style of the field, this axis may not be respected. Use the ``View/onSubmit(of:_:)`` modifier to invoke an action whenever the user submits this text field. - Parameters: - titleResource: The localized title of the text field, describing its purpose. - text: The text to display and edit. - prompt: A `Text` representing the prompt of the text field which provides users with guidance on what to type into the text field. - axis: The axis in which to scroll text when it doesn't fit in the available space.

init · iOS 16.0+

init

TypeScript
static initTextPromptAxis55789(titleKey: _SwiftUICore_LocalizedStringKey, text: _SwiftUICore_Binding<string>, prompt: (_SwiftUICore_Text) | null, axis: _SwiftUICore_Axis): TextField<_SwiftUICore_Text>
Swift declaration
nonisolated init(_ titleKey: LocalizedStringKey, text: Binding<String>, prompt: Text?, axis: Axis)

Creates a text field with a preferred axis and a text label generated from a localized title string. Specify a preferred axis in which the text field should scroll its content when it does not fit in the available space. Depending on the style of the field, this axis may not be respected. Use the ``View/onSubmit(of:_:)`` modifier to invoke an action whenever the user submits this text field. - Parameters: - titleKey: The key for the localized title of the text field, describing its purpose. - text: The text to display and edit. - prompt: A `Text` representing the prompt of the text field which provides users with guidance on what to type into the text field. - axis: The axis in which to scroll text when it doesn't fit in the available space.

init · iOS 16.0+

init

TypeScript
static initTextPromptAxis86183(title: string, text: _SwiftUICore_Binding<string>, prompt: (_SwiftUICore_Text) | null, axis: _SwiftUICore_Axis): TextField<_SwiftUICore_Text>
Swift declaration
nonisolated init<S>(_ title: S, text: Binding<String>, prompt: Text?, axis: Axis) where S : StringProtocol

Creates a text field with a text label generated from a title string. Specify a preferred axis in which the text field should scroll its content when it does not fit in the available space. Depending on the style of the field, this axis may not be respected. Use the ``View/onSubmit(of:_:)`` modifier to invoke an action whenever the user submits this text field. - Parameters: - title: The title of the text view, describing its purpose. - text: The text to display and edit. - prompt: A `Text` representing the prompt of the text field which provides users with guidance on what to type into the text field. - axis: The axis in which to scroll text when it doesn't fit in the available space.

init · iOS 16.0+

init

TypeScript
static initTextPrompt(titleResource: _Foundation_LocalizedStringResource, text: _SwiftUICore_Binding<string>, prompt?: (_SwiftUICore_Text) | null): TextField<_SwiftUICore_Text>
Swift declaration
@export(implementation) nonisolated init(_ titleResource: LocalizedStringResource, text: Binding<String>, prompt: Text?)

Creates a text field with a text label generated from a localized title string resource. Use the ``View/onSubmit(of:_:)`` modifier to invoke an action whenever the user submits this text field. - Parameters: - titleResource: The localized title of the text field, describing its purpose. - text: The text to display and edit. - prompt: A `Text` representing the prompt of the text field which provides users with guidance on what to type into the text field.

init · iOS 15.0+

init

TypeScript
static initTextPrompt18728(titleKey: _SwiftUICore_LocalizedStringKey, text: _SwiftUICore_Binding<string>, prompt?: (_SwiftUICore_Text) | null): TextField<_SwiftUICore_Text>
Swift declaration
nonisolated init(_ titleKey: LocalizedStringKey, text: Binding<String>, prompt: Text?)

Creates a text field with a text label generated from a localized title string. Use the ``View/onSubmit(of:_:)`` modifier to invoke an action whenever the user submits this text field. - Parameters: - titleKey: The key for the localized title of the text field, describing its purpose. - text: The text to display and edit. - prompt: A `Text` representing the prompt of the text field which provides users with guidance on what to type into the text field.

init · iOS 15.0+

init

TypeScript
static initTextPrompt212(title: string, text: _SwiftUICore_Binding<string>, prompt?: (_SwiftUICore_Text) | null): TextField<_SwiftUICore_Text>
Swift declaration
nonisolated init<S>(_ title: S, text: Binding<String>, prompt: Text?) where S : StringProtocol

Creates a text field with a text label generated from a title string. Use the ``View/onSubmit(of:_:)`` modifier to invoke an action whenever the user submits this text field. - Parameters: - title: The title of the text view, describing its purpose. - text: The text to display and edit. - prompt: A `Text` representing the prompt of the text field which provides users with guidance on what to type into the text field.

init · iOS 13.0+ · Deprecated in iOS 100000.0

init

TypeScript
static initTextOnCommit(titleKey: _SwiftUICore_LocalizedStringKey, text: _SwiftUICore_Binding<string>, onCommit: (() => void)): TextField<_SwiftUICore_Text>
Swift declaration
@export(implementation) nonisolated init(_ titleKey: LocalizedStringKey, text: Binding<String>, onCommit: @escaping () -> Void)

Creates a text field with a text label generated from a localized title string. - Parameters: - titleKey: The key for the localized title of the text field, describing its purpose. - text: The text to display and edit. - onCommit: An action to perform when the user performs an action (for example, when the user presses the Return key) while the text field has focus.

init · iOS 13.0+ · Deprecated in iOS 100000.0

init

TypeScript
static initTextOnCommit94581(title: string, text: _SwiftUICore_Binding<string>, onCommit: (() => void)): TextField<_SwiftUICore_Text>
Swift declaration
@export(implementation) nonisolated init<S>(_ title: S, text: Binding<String>, onCommit: @escaping () -> Void) where S : StringProtocol

Creates a text field with a text label generated from a title string. - Parameters: - title: The title of the text view, describing its purpose. - text: The text to display and edit. - onCommit: An action to perform when the user performs an action (for example, when the user presses the Return key) while the text field has focus.

init · iOS 18.0+

init

TypeScript
static initTextSelectionPromptAxis(titleResource: _Foundation_LocalizedStringResource, text: _SwiftUICore_Binding<string>, selection: _SwiftUICore_Binding<(TextSelection) | null>, prompt?: (_SwiftUICore_Text) | null, axis?: (_SwiftUICore_Axis) | null): TextField<_SwiftUICore_Text>
Swift declaration
@export(implementation) nonisolated init(_ titleResource: LocalizedStringResource, text: Binding<String>, selection: Binding<TextSelection?>, prompt: Text? = nil, axis: Axis? = nil)

Creates a text field with a binding to the current selection and a text label generated from a localized title string resource. The following example shows a text field with a binding to the current selection: @State private var message: String = "" @State private var selection: TextSelection? = nil var body: some View { TextField( "Message", text: $message, selection: $selection ) } Use the ``View/onSubmit(of:_:)`` modifier to invoke an action whenever the user submits this text field. - Parameters: - titleResource: The localized title of the text field, describing its purpose. - text: The text to display and edit. - selection: A ``Binding`` to the variable containing the selection. - prompt: A `Text` representing the prompt of the text field which provides users with guidance on what to type into the text field. Defaults to `nil`. - axis: The axis in which to scroll text when it doesn't fit in the available space. Defaults to `nil`.

init · iOS 18.0+

init

TypeScript
static initTextSelectionPromptAxis91809(titleKey: _SwiftUICore_LocalizedStringKey, text: _SwiftUICore_Binding<string>, selection: _SwiftUICore_Binding<(TextSelection) | null>, prompt?: (_SwiftUICore_Text) | null, axis?: (_SwiftUICore_Axis) | null): TextField<_SwiftUICore_Text>
Swift declaration
nonisolated init(_ titleKey: LocalizedStringKey, text: Binding<String>, selection: Binding<TextSelection?>, prompt: Text? = nil, axis: Axis? = nil)

Creates a text field with a binding to the current selection and a text label generated from a localized title string. The following example shows a text field with a binding to the current selection: @State private var message: String = "" @State private var selection: TextSelection? = nil var body: some View { TextField( "Message", text: $message, selection: $selection ) } Use the ``View/onSubmit(of:_:)`` modifier to invoke an action whenever the user submits this text field. - Parameters: - titleKey: The key for the localized title of the text field, describing its purpose. - text: The text to display and edit. - selection: A ``Binding`` to the variable containing the selection. - prompt: A `Text` representing the prompt of the text field which provides users with guidance on what to type into the text field. Defaults to `nil`. - axis: The axis in which to scroll text when it doesn't fit in the available space. Defaults to `nil`.

init · iOS 18.0+

init

TypeScript
static initTextSelectionPromptAxis72533(title: string, text: _SwiftUICore_Binding<string>, selection: _SwiftUICore_Binding<(TextSelection) | null>, prompt?: (_SwiftUICore_Text) | null, axis?: (_SwiftUICore_Axis) | null): TextField<_SwiftUICore_Text>
Swift declaration
nonisolated init<S>(_ title: S, text: Binding<String>, selection: Binding<TextSelection?>, prompt: Text? = nil, axis: Axis? = nil) where S : StringProtocol

Creates a text field with a binding to the current selection and a text label generated from a title string. The following example shows a text field with a binding to the current selection: @State private var message: String = "" @State private var selection: TextSelection? = nil var body: some View { TextField( "Message", text: $message, selection: $selection ) } Use the ``View/onSubmit(of:_:)`` modifier to invoke an action whenever the user submits this text field. - Parameters: - title: The title of the text view, describing its purpose. - selection: A ``Binding`` to the variable containing the selection. - text: The text to display and edit. - prompt: A `Text` representing the prompt of the text field which provides users with guidance on what to type into the text field. Defaults to `nil`. - axis: The axis in which to scroll text when it doesn't fit in the available space. Defaults to `nil`

init · iOS 26.0+

init

TypeScript
static initText(titleResource: _Foundation_LocalizedStringResource, text: _SwiftUICore_Binding<string>): TextField<_SwiftUICore_Text>
Swift declaration
nonisolated init(_ titleResource: LocalizedStringResource, text: Binding<String>)

Creates a text field with a text label generated from a localized title string resource. - Parameters: - titleResource: The localized title of the text field, describing its purpose. - text: The text to display and edit.

init · iOS 13.0+

init

TypeScript
static initText72718(titleKey: _SwiftUICore_LocalizedStringKey, text: _SwiftUICore_Binding<string>): TextField<_SwiftUICore_Text>
Swift declaration
@export(implementation) nonisolated init(_ titleKey: LocalizedStringKey, text: Binding<String>)

Creates a text field with a text label generated from a localized title string. - Parameters: - titleKey: The key for the localized title of the text field, describing its purpose. - text: The text to display and edit.

init · iOS 13.0+

init

TypeScript
static initText47582(title: string, text: _SwiftUICore_Binding<string>): TextField<_SwiftUICore_Text>
Swift declaration
@export(implementation) nonisolated init<S>(_ title: S, text: Binding<String>) where S : StringProtocol

Creates a text field with a text label generated from a title string. - Parameters: - title: The title of the text view, describing its purpose. - text: The text to display and edit.

init · iOS 13.0+ · Deprecated in iOS 100000.0

init

TypeScript
static initValueFormatterOnEditingChangedOnCommit(titleKey: _SwiftUICore_LocalizedStringKey, value: _SwiftUICore_Binding<unknown>, formatter: _Foundation_Formatter, onEditingChanged: ((arg0: boolean) => void), onCommit: (() => void)): TextField<_SwiftUICore_Text>
Swift declaration
nonisolated init<V>(_ titleKey: LocalizedStringKey, value: Binding<V>, formatter: Formatter, onEditingChanged: @escaping (Bool) -> Void, onCommit: @escaping () -> Void)

Create an instance which binds over an arbitrary type, `V`. - Parameters: - titleKey: The key for the localized title of the text field, describing its purpose. - value: The underlying value to be edited. - formatter: A formatter to use when converting between the string the user edits and the underlying value of type `V`. In the event that `formatter` is unable to perform the conversion, `binding.value` isn't modified. - onEditingChanged: The action to perform when the user begins editing `text` and after the user finishes editing `text`. The closure receives a Boolean value that indicates the editing status: `true` when the user begins editing, `false` when they finish. - onCommit: An action to perform when the user performs an action (for example, when the user presses the Return key) while the text field has focus.

init · iOS 13.0+ · Deprecated in iOS 100000.0

init

TypeScript
static initValueFormatterOnEditingChangedOnCommit83406(title: string, value: _SwiftUICore_Binding<unknown>, formatter: _Foundation_Formatter, onEditingChanged: ((arg0: boolean) => void), onCommit: (() => void)): TextField<_SwiftUICore_Text>
Swift declaration
nonisolated init<S, V>(_ title: S, value: Binding<V>, formatter: Formatter, onEditingChanged: @escaping (Bool) -> Void, onCommit: @escaping () -> Void) where S : StringProtocol

Create an instance which binds over an arbitrary type, `V`. - Parameters: - title: The title of the text field, describing its purpose. - value: The underlying value to be edited. - formatter: A formatter to use when converting between the string the user edits and the underlying value of type `V`. In the event that `formatter` is unable to perform the conversion, `binding.value` isn't modified. - onEditingChanged: The action to perform when the user begins editing `text` and after the user finishes editing `text`. The closure receives a Boolean value that indicates the editing status: `true` when the user begins editing, `false` when they finish. - onCommit: An action to perform when the user performs an action (for example, when the user presses the Return key) while the text field has focus.

init · iOS 13.0+ · Deprecated in iOS 100000.0

init

TypeScript
static initValueFormatterOnEditingChanged(titleKey: _SwiftUICore_LocalizedStringKey, value: _SwiftUICore_Binding<unknown>, formatter: _Foundation_Formatter, onEditingChanged: ((arg0: boolean) => void)): TextField<_SwiftUICore_Text>
Swift declaration
@export(implementation) nonisolated init<V>(_ titleKey: LocalizedStringKey, value: Binding<V>, formatter: Formatter, onEditingChanged: @escaping (Bool) -> Void)

Create an instance which binds over an arbitrary type, `V`. - Parameters: - titleKey: The key for the localized title of the text field, describing its purpose. - value: The underlying value to be edited. - formatter: A formatter to use when converting between the string the user edits and the underlying value of type `V`. In the event that `formatter` is unable to perform the conversion, `binding.value` isn't modified. - onEditingChanged: The action to perform when the user begins editing `text` and after the user finishes editing `text`. The closure receives a Boolean value that indicates the editing status: `true` when the user begins editing, `false` when they finish.

init · iOS 13.0+ · Deprecated in iOS 100000.0

init

TypeScript
static initValueFormatterOnEditingChanged87895(title: string, value: _SwiftUICore_Binding<unknown>, formatter: _Foundation_Formatter, onEditingChanged: ((arg0: boolean) => void)): TextField<_SwiftUICore_Text>
Swift declaration
@export(implementation) nonisolated init<S, V>(_ title: S, value: Binding<V>, formatter: Formatter, onEditingChanged: @escaping (Bool) -> Void) where S : StringProtocol

Create an instance which binds over an arbitrary type, `V`. - Parameters: - title: The title of the text field, describing its purpose. - value: The underlying value to be edited. - formatter: A formatter to use when converting between the string the user edits and the underlying value of type `V`. In the event that `formatter` is unable to perform the conversion, `binding.value` isn't modified. - onEditingChanged: The action to perform when the user begins editing `text` and after the user finishes editing `text`. The closure receives a Boolean value that indicates the editing status: `true` when the user begins editing, `false` when they finish.

init · iOS 16.0+

init

TypeScript
static initValueFormatterPrompt(titleResource: _Foundation_LocalizedStringResource, value: _SwiftUICore_Binding<unknown>, formatter: _Foundation_Formatter, prompt?: (_SwiftUICore_Text) | null): TextField<_SwiftUICore_Text>
Swift declaration
@export(implementation) nonisolated init<V>(_ titleResource: LocalizedStringResource, value: Binding<V>, formatter: Formatter, prompt: Text?)

Creates a text field that applies a formatter to a bound value, with a label generated from a localized title string resource. Use this initializer to create a text field that binds to a bound value, using a <doc://com.apple.documentation/documentation/Foundation/Formatter> to convert to and from this type. Changes to the bound value update the string displayed by the text field. Editing the text field updates the bound value, as long as the formatter can parse the text. If the format style can't parse the input, the bound value remains unchanged. Use the ``View/onSubmit(of:_:)`` modifier to invoke an action whenever the user submits this text field. The following example uses a <doc://com.apple.documentation/documentation/Swift/Double> as the bound value, and a <doc://com.apple.documentation/documentation/Foundation/NumberFormatter> instance to convert to and from a string representation. The formatter uses the <doc://com.apple.documentation/documentation/Foundation/NumberFormatter/Style/decimal> style, to allow entering a fractional part. As the user types, the bound value updates, which in turn updates three ``Text`` views that use different format styles. If the user enters text that doesn't represent a valid `Double`, the bound value doesn't update. @State private var myDouble: Double = 0.673 @State private var numberFormatter: NumberFormatter = { var nf = NumberFormatter() nf.numberStyle = .decimal return nf }() var body: some View { VStack { TextField( "Double", value: $myDouble, formatter: numberFormatter ) Text(myDouble, format: .number) Text(myDouble, format: .number.precision(.significantDigits(5))) Text(myDouble, format: .number.notation(.scientific)) } } - Parameters: - titleResource: The localized title of the text field, describing its purpose. - value: The underlying value to edit. - formatter: A formatter to use when converting between the string the user edits and the underlying value of type `V`. If `formatter` can't perform the conversion, the text field doesn't modify `binding.value`. - prompt: A `Text` which provides users with guidance on what to enter into the text field.

init · iOS 15.0+

init

TypeScript
static initValueFormatterPrompt91560(titleKey: _SwiftUICore_LocalizedStringKey, value: _SwiftUICore_Binding<unknown>, formatter: _Foundation_Formatter, prompt?: (_SwiftUICore_Text) | null): TextField<_SwiftUICore_Text>
Swift declaration
nonisolated init<V>(_ titleKey: LocalizedStringKey, value: Binding<V>, formatter: Formatter, prompt: Text?)

Creates a text field that applies a formatter to a bound value, with a label generated from a localized title string. Use this initializer to create a text field that binds to a bound value, using a <doc://com.apple.documentation/documentation/Foundation/Formatter> to convert to and from this type. Changes to the bound value update the string displayed by the text field. Editing the text field updates the bound value, as long as the formatter can parse the text. If the format style can't parse the input, the bound value remains unchanged. Use the ``View/onSubmit(of:_:)`` modifier to invoke an action whenever the user submits this text field. The following example uses a <doc://com.apple.documentation/documentation/Swift/Double> as the bound value, and a <doc://com.apple.documentation/documentation/Foundation/NumberFormatter> instance to convert to and from a string representation. The formatter uses the <doc://com.apple.documentation/documentation/Foundation/NumberFormatter/Style/decimal> style, to allow entering a fractional part. As the user types, the bound value updates, which in turn updates three ``Text`` views that use different format styles. If the user enters text that doesn't represent a valid `Double`, the bound value doesn't update. @State private var myDouble: Double = 0.673 @State private var numberFormatter: NumberFormatter = { var nf = NumberFormatter() nf.numberStyle = .decimal return nf }() var body: some View { VStack { TextField( "Double", value: $myDouble, formatter: numberFormatter ) Text(myDouble, format: .number) Text(myDouble, format: .number.precision(.significantDigits(5))) Text(myDouble, format: .number.notation(.scientific)) } } - Parameters: - titleKey: The key for the localized title of the text field, describing its purpose. - value: The underlying value to edit. - formatter: A formatter to use when converting between the string the user edits and the underlying value of type `V`. If `formatter` can't perform the conversion, the text field doesn't modify `binding.value`. - prompt: A `Text` which provides users with guidance on what to enter into the text field.

init · iOS 15.0+

init

TypeScript
static initValueFormatterPrompt28586(title: string, value: _SwiftUICore_Binding<unknown>, formatter: _Foundation_Formatter, prompt?: (_SwiftUICore_Text) | null): TextField<_SwiftUICore_Text>
Swift declaration
nonisolated init<S, V>(_ title: S, value: Binding<V>, formatter: Formatter, prompt: Text?) where S : StringProtocol

Creates a text field that applies a formatter to a bound value, with a label generated from a title string. Use this initializer to create a text field that binds to a bound value, using a <doc://com.apple.documentation/documentation/Foundation/Formatter> to convert to and from this type. Changes to the bound value update the string displayed by the text field. Editing the text field updates the bound value, as long as the formatter can parse the text. If the format style can't parse the input, the bound value remains unchanged. Use the ``View/onSubmit(of:_:)`` modifier to invoke an action whenever the user submits this text field. The following example uses a <doc://com.apple.documentation/documentation/Swift/Double> as the bound value, and a <doc://com.apple.documentation/documentation/Foundation/NumberFormatter> instance to convert to and from a string representation. The formatter uses the <doc://com.apple.documentation/documentation/Foundation/NumberFormatter/Style/decimal> style, to allow entering a fractional part. As the user types, the bound value updates, which in turn updates three ``Text`` views that use different format styles. If the user enters text that doesn't represent a valid `Double`, the bound value doesn't update. @State private var label = "Double" @State private var myDouble: Double = 0.673 @State private var numberFormatter: NumberFormatter = { var nf = NumberFormatter() nf.numberStyle = .decimal return nf }() var body: some View { VStack { TextField( label, value: $myDouble, formatter: numberFormatter ) Text(myDouble, format: .number) Text(myDouble, format: .number.precision(.significantDigits(5))) Text(myDouble, format: .number.notation(.scientific)) } } - Parameters: - title: The title of the text field, describing its purpose. - value: The underlying value to edit. - formatter: A formatter to use when converting between the string the user edits and the underlying value of type `V`. If `formatter` can't perform the conversion, the text field doesn't modify `binding.value`. - prompt: A `Text` which provides users with guidance on what to enter into the text field.

init · iOS 13.0+ · Deprecated in iOS 100000.0

init

TypeScript
static initValueFormatterOnCommit(titleKey: _SwiftUICore_LocalizedStringKey, value: _SwiftUICore_Binding<unknown>, formatter: _Foundation_Formatter, onCommit: (() => void)): TextField<_SwiftUICore_Text>
Swift declaration
@export(implementation) nonisolated init<V>(_ titleKey: LocalizedStringKey, value: Binding<V>, formatter: Formatter, onCommit: @escaping () -> Void)

Create an instance which binds over an arbitrary type, `V`. - Parameters: - titleKey: The key for the localized title of the text field, describing its purpose. - value: The underlying value to be edited. - formatter: A formatter to use when converting between the string the user edits and the underlying value of type `V`. In the event that `formatter` is unable to perform the conversion, `binding.value` isn't modified. - onCommit: An action to perform when the user performs an action (for example, when the user presses the Return key) while the text field has focus.

init · iOS 13.0+ · Deprecated in iOS 100000.0

init

TypeScript
static initValueFormatterOnCommit42295(title: string, value: _SwiftUICore_Binding<unknown>, formatter: _Foundation_Formatter, onCommit: (() => void)): TextField<_SwiftUICore_Text>
Swift declaration
@export(implementation) nonisolated init<S, V>(_ title: S, value: Binding<V>, formatter: Formatter, onCommit: @escaping () -> Void) where S : StringProtocol

Create an instance which binds over an arbitrary type, `V`. - Parameters: - title: The title of the text field, describing its purpose. - value: The underlying value to be edited. - formatter: A formatter to use when converting between the string the user edits and the underlying value of type `V`. In the event that `formatter` is unable to perform the conversion, `binding.value` isn't modified. - onCommit: An action to perform when the user performs an action (for example, when the user presses the Return key) while the text field has focus.

init · iOS 16.0+

init

TypeScript
static initValueFormatter(titleResource: _Foundation_LocalizedStringResource, value: _SwiftUICore_Binding<unknown>, formatter: _Foundation_Formatter): TextField<_SwiftUICore_Text>
Swift declaration
@export(implementation) nonisolated init<V>(_ titleResource: LocalizedStringResource, value: Binding<V>, formatter: Formatter)

Create an instance which binds over an arbitrary type, `V`. Use this initializer to create a text field that binds to a bound optional value, using a <doc://com.apple.documentation/documentation/Foundation/Formatter> to convert to and from this type. Changes to the bound value update the string displayed by the text field. Editing the text field updates the bound value, as long as the formatter can parse the text. If the format style can't parse the input, the bound value remains unchanged. Use the ``View/onSubmit(of:_:)`` modifier to invoke an action whenever the user submits this text field. The following example uses a <doc://com.apple.documentation/documentation/Swift/Double> as the bound value, and a <doc://com.apple.documentation/documentation/Foundation/NumberFormatter> instance to convert to and from a string representation. The formatter uses the <doc://com.apple.documentation/documentation/Foundation/NumberFormatter/Style/decimal> style, to allow entering a fractional part. As the user types, the bound value updates, which in turn updates three ``Text`` views that use different format styles. If the user enters text that doesn't represent a valid `Double`, the bound value doesn't update. @State private var myDouble: Double = 0.673 @State private var numberFormatter: NumberFormatter = { var nf = NumberFormatter() nf.numberStyle = .decimal return nf }() var body: some View { VStack { TextField( value: $myDouble, formatter: numberFormatter ) { Text("Double") } Text(myDouble, format: .number) Text(myDouble, format: .number.precision(.significantDigits(5))) Text(myDouble, format: .number.notation(.scientific)) } } - Parameters: - titleResource: The localized title of the text field, describing its purpose. - value: The underlying value to edit. - formatter: A formatter to use when converting between the string the user edits and the underlying value of type `V`. If `formatter` can't perform the conversion, the text field doesn't modify `binding.value`.

init · iOS 13.0+

init

TypeScript
static initValueFormatter40230(titleKey: _SwiftUICore_LocalizedStringKey, value: _SwiftUICore_Binding<unknown>, formatter: _Foundation_Formatter): TextField<_SwiftUICore_Text>
Swift declaration
@export(implementation) nonisolated init<V>(_ titleKey: LocalizedStringKey, value: Binding<V>, formatter: Formatter)

Create an instance which binds over an arbitrary type, `V`. Use this initializer to create a text field that binds to a bound optional value, using a <doc://com.apple.documentation/documentation/Foundation/Formatter> to convert to and from this type. Changes to the bound value update the string displayed by the text field. Editing the text field updates the bound value, as long as the formatter can parse the text. If the format style can't parse the input, the bound value remains unchanged. Use the ``View/onSubmit(of:_:)`` modifier to invoke an action whenever the user submits this text field. The following example uses a <doc://com.apple.documentation/documentation/Swift/Double> as the bound value, and a <doc://com.apple.documentation/documentation/Foundation/NumberFormatter> instance to convert to and from a string representation. The formatter uses the <doc://com.apple.documentation/documentation/Foundation/NumberFormatter/Style/decimal> style, to allow entering a fractional part. As the user types, the bound value updates, which in turn updates three ``Text`` views that use different format styles. If the user enters text that doesn't represent a valid `Double`, the bound value doesn't update. @State private var myDouble: Double = 0.673 @State private var numberFormatter: NumberFormatter = { var nf = NumberFormatter() nf.numberStyle = .decimal return nf }() var body: some View { VStack { TextField( value: $myDouble, formatter: numberFormatter ) { Text("Double") } Text(myDouble, format: .number) Text(myDouble, format: .number.precision(.significantDigits(5))) Text(myDouble, format: .number.notation(.scientific)) } } - Parameters: - titleKey: The key for the localized title of the text field, describing its purpose. - value: The underlying value to edit. - formatter: A formatter to use when converting between the string the user edits and the underlying value of type `V`. If `formatter` can't perform the conversion, the text field doesn't modify `binding.value`.

init · iOS 13.0+

init

TypeScript
static initValueFormatter80476(title: string, value: _SwiftUICore_Binding<unknown>, formatter: _Foundation_Formatter): TextField<_SwiftUICore_Text>
Swift declaration
@export(implementation) nonisolated init<S, V>(_ title: S, value: Binding<V>, formatter: Formatter) where S : StringProtocol

Create an instance which binds over an arbitrary type, `V`. Use this initializer to create a text field that binds to a bound optional value, using a <doc://com.apple.documentation/documentation/Foundation/Formatter> to convert to and from this type. Changes to the bound value update the string displayed by the text field. Editing the text field updates the bound value, as long as the formatter can parse the text. If the format style can't parse the input, the bound value remains unchanged. Use the ``View/onSubmit(of:_:)`` modifier to invoke an action whenever the user submits this text field. The following example uses a <doc://com.apple.documentation/documentation/Swift/Double> as the bound value, and a <doc://com.apple.documentation/documentation/Foundation/NumberFormatter> instance to convert to and from a string representation. The formatter uses the <doc://com.apple.documentation/documentation/Foundation/NumberFormatter/Style/decimal> style, to allow entering a fractional part. As the user types, the bound value updates, which in turn updates three ``Text`` views that use different format styles. If the user enters text that doesn't represent a valid `Double`, the bound value doesn't update. @State private var myDouble: Double = 0.673 @State private var numberFormatter: NumberFormatter = { var nf = NumberFormatter() nf.numberStyle = .decimal return nf }() var body: some View { VStack { TextField( value: $myDouble, formatter: numberFormatter ) { Text("Double") } Text(myDouble, format: .number) Text(myDouble, format: .number.precision(.significantDigits(5))) Text(myDouble, format: .number.notation(.scientific)) } } - Parameters: - title: The title of the text view, describing its purpose. - value: The underlying value to edit. - formatter: A formatter to use when converting between the string the user edits and the underlying value of type `V`. If `formatter` can't perform the conversion, the text field doesn't modify `binding.value`.

method · iOS 14.0+

typedPayload

TypeScript
typedPayload(type: "Bool" | "Int" | "UInt" | "Double" | "Float" | "String" | "CGFloat" | "Date" | "URL" | "Data" | "UUID"): unknown
Swift declaration
func typedPayload<T>(_ type: T.Type) throws -> T where T : Decodable, T : Encodable

Given a Codable Swift type, return an instance decoded from the NSUserActivity's userInfo dictionary - Parameter type: the instance type to be decoded from userInfo - Returns: the type safe instance or raises if it can't be decoded

method · iOS 14.0+

setTypedPayload

TypeScript
setTypedPayload(payload: number): void
Swift declaration
func setTypedPayload<T>(_ payload: T) throws where T : Decodable, T : Encodable

Given an instance of a Codable Swift type, encode it into the NSUserActivity's userInfo dictionary - Parameter payload: the instance to be converted to userInfo

init · iOS 15.0+

init

TypeScript
init(lineStyle: _SwiftUICore_Text_LineStyle): _UIKit_NSUnderlineStyle
Swift declaration
init(_ lineStyle: Text.LineStyle)

Creates a ``NSUnderlineStyle`` from ``Text.LineStyle``. - Parameter lineStyle: A value of ``Text.LineStyle`` to wrap with ``NSUnderlineStyle``. - Returns: A new ``NSUnderlineStyle``.

init · iOS 14.0+

init

TypeScript
init(legibilityWeight?: (_SwiftUICore_LegibilityWeight) | null): _UIKit_UILegibilityWeight
Swift declaration
init(_ legibilityWeight: LegibilityWeight?)

Creates a legibility weight from its LegibilityWeight equivalent.

init · iOS 14.0+

init

TypeScript
init(colorScheme?: (_SwiftUICore_ColorScheme) | null): _UIKit_UIUserInterfaceStyle
Swift declaration
init(_ colorScheme: ColorScheme?)

Creates a user interface style from its ColorScheme equivalent.

init · iOS 15.0+

init

TypeScript
init(dynamicTypeSize?: (_SwiftUICore_DynamicTypeSize) | null): _UIKit_UIContentSizeCategory
Swift declaration
init(_ dynamicTypeSize: DynamicTypeSize?)
init · iOS 14.0+

init

TypeScript
init4490(sizeCategory?: (_SwiftUICore_ContentSizeCategory) | null): _UIKit_UIContentSizeCategory
Swift declaration
init(_ sizeCategory: ContentSizeCategory?)

Create a size category from its `ContentSizeCategory` equivalent.

init · iOS 14.0+

init

TypeScript
static init(edgeInsets: _SwiftUICore_EdgeInsets): { top: number; leading: number; bottom: number; trailing: number }
Swift declaration
init(_ edgeInsets: EdgeInsets)

Create edge insets from the equivalent EdgeInsets.

init · iOS 14.0+

init

TypeScript
init(colorSchemeContrast?: (_SwiftUICore_ColorSchemeContrast) | null): _UIKit_UIAccessibilityContrast
Swift declaration
init(_ colorSchemeContrast: ColorSchemeContrast?)

Create a contrast from its ColorSchemeContrast equivalent.

init · iOS 14.0+

init

TypeScript
init(sizeClass?: (_SwiftUICore_UserInterfaceSizeClass) | null): _UIKit_UIUserInterfaceSizeClass
Swift declaration
init(_ sizeClass: UserInterfaceSizeClass?)

Creates a UIKit size class from the specified SwiftUI size class.

init · iOS 14.0+

init

TypeScript
init(layoutDirection: _SwiftUICore_LayoutDirection): _UIKit_UITraitEnvironmentLayoutDirection
Swift declaration
init(_ layoutDirection: LayoutDirection)

Create a direction from its LayoutDirection equivalent.

static · iOS 18.0+

animate

TypeScript
static animate(animation: _SwiftUICore_Animation, changes: (() => void), completion?: ((() => void)) | null): Promise<void>
Swift declaration
@MainActor @preconcurrency static func animate(_ animation: Animation, changes: () -> Void, completion: (() -> Void)? = nil)

Animate changes to one or more views using the specified SwiftUI animation. Animations performed using this method can be smoothly retargeted while preserving velocity, just like animations in SwiftUI views. ``` Task { // Begin animation UIView.animate(.spring(duration: 1.0)) { myView.center = CGPoint(x: 200, y: 200) } try await Task.sleep(for: .seconds(0.5)) // Retarget running animations UIView.animate(.spring) { myView.center = CGPoint(x: 100, y: 400) } } ``` - Note: When a SwiftUI animation is used for UIView animations, the animations are run in-process, and are not backed by `CAAnimation`s. - Parameters: - animation: The animation to use for the changes. - changes: A closure containing the changes to animate. - completion: A closure to execute after the animation completes.

init · iOS 14.0+

init

TypeScript
static init(color: _SwiftUICore_Color): _UIKit_UIColor
Swift declaration
convenience init(_ color: Color)

Skipped declarations

2,059 declarations were excluded from these bindings. Each reason comes from the generator or the iOS SDK compiler.

TabContent.accessibilityValue(_:isEnabled:)

This protocol needs associated types that cannot yet cross the bridge.

TabContent.accessibilityValue(_:isEnabled:)

This protocol needs associated types that cannot yet cross the bridge.

TabContent.accessibilityValue(_:isEnabled:)

This protocol needs associated types that cannot yet cross the bridge.

TabContent.accessibilityValue(_:isEnabled:)

This protocol needs associated types that cannot yet cross the bridge.

TextField.init(_:value:format:prompt:)

This declaration needs Swift generic type arguments. (no canonical witness for F.FormatInput)

TextField.init(_:value:format:prompt:)

This declaration needs Swift generic type arguments. (no canonical witness for F.FormatInput)

TextField.init(_:value:format:prompt:)

This declaration needs Swift generic type arguments. (no canonical witness for F.FormatInput)

TextField.init(_:value:format:prompt:)

This declaration needs Swift generic type arguments. (no canonical witness for F.FormatInput)

TextField.init(_:value:format:prompt:)

This declaration needs Swift generic type arguments. (no canonical witness for F.FormatInput)

TextField.init(_:value:format:prompt:)

This declaration needs Swift generic type arguments. (no canonical witness for F.FormatInput)

TextField.init(value:format:prompt:label:)

This declaration needs Swift generic type arguments. (no canonical witness for F.FormatInput)

TextField.init(value:format:prompt:label:)

This declaration needs Swift generic type arguments. (no canonical witness for F.FormatInput)

TextField.init(value:formatter:prompt:label:)

callback cannot propagate synchronous failure

Scene.restorationBehavior(_:)

This protocol needs associated types that cannot yet cross the bridge.

Scene.windowResizability(_:)

This protocol needs associated types that cannot yet cross the bridge.

TableColumnBuilder.buildIf(_:)

This declaration needs Swift generic type arguments. (no canonical witness for C)

TableColumnBuilder.buildIf(_:)

This declaration needs Swift generic type arguments. (no canonical witness for C)

TableColumnBuilder.buildEither(first:)

This declaration needs Swift generic type arguments. (no canonical witness for T)

TableColumnBuilder.buildEither(first:)

This declaration needs Swift generic type arguments. (no canonical witness for T)

TableColumnBuilder.buildEither(second:)

This declaration needs Swift generic type arguments. (no canonical witness for F)

TableColumnBuilder.buildEither(second:)

This declaration needs Swift generic type arguments. (no canonical witness for F)

TableColumnBuilder.buildLimitedAvailability(_:)

This protocol needs associated types that cannot yet cross the bridge.

TableColumnBuilder.buildLimitedAvailability(_:)

This protocol needs associated types that cannot yet cross the bridge.

TabContent.accessibilityLabel(_:isEnabled:)

This protocol needs associated types that cannot yet cross the bridge.

TabContent.accessibilityLabel(_:isEnabled:)

This protocol needs associated types that cannot yet cross the bridge.

TabContent.accessibilityLabel(_:isEnabled:)

This protocol needs associated types that cannot yet cross the bridge.

TabContent.accessibilityLabel(_:isEnabled:)

This protocol needs associated types that cannot yet cross the bridge.

NavigationViewStyle.columns

Static protocol requirements cannot be called through an instance.

PrimitiveButtonStyle.automatic

Static protocol requirements cannot be called through an instance.

DefaultButtonStyle.makeBody(configuration:)

This protocol needs associated types that cannot yet cross the bridge.