Appearance
- backgroundSets the view's background to a style.
- badgeGenerates a badge for the view from a localized string resource.
- badgeProminenceSpecifies the prominence of badges created by this view.
- borderAdds a border to this view with the specified style and width.
- buttonSizingThe preferred sizing behavior of buttons in the view hierarchy.
- containerBackgroundSets the container background of the enclosing container using a view.
- headerProminenceSets the header prominence for this view.
- hiddenHides this view unconditionally.
- imageScaleScales images within the view according to one of the relative sizes available including small, medium, and large images sizes.
- labelIconToTitleSpacingSet the spacing between the icon and title in labels.
- labelReservedIconWidthSet the width reserved for icons in labels.
- labelsHiddenHides the labels of any controls contained within this view.
- labelsVisibilityControls the visibility of labels of any controls contained within this view.
- opacitySets the transparency of this view.
- overlayLayers the specified style in front of this view.
- overlayArrangementEdgeThe horizontal edge a view in an overlay arrangement occupies when the arrangement transitions to a horizontal layout.
- preferredColorSchemeSets the preferred color scheme for this presentation.
- privacySensitiveMarks the view as containing sensitive, private user data.
- redactedAdds a reason to apply a redaction to this view hierarchy.
- scaledToFillScales this view to fill its parent.
- scaledToFitScales this view to fit its parent.
- scrollContentBackgroundSpecifies the visibility of the background for scrollable views within this view.
- shadowAdds a shadow to this view.
- sliderThumbVisibilitySets the thumb visibility for Sliders within this view.
- tintSets the tint color within this view.
- unredactedRemoves any reason to apply a redaction to this view hierarchy.
- zIndexControls the display order of overlapping views.
Text and symbols
- allowsTighteningSets whether text in this view can compress the space between characters when necessary to fit text in a line.
- autocorrectionDisabledSets whether to disable autocorrection for this view.
- baselineOffsetSets the vertical offset for the text relative to its baseline in this view.
- boldApplies a bold font weight to the text in this view.
- findDisabledPrevents find and replace operations in a text editor.
- findNavigatorProgrammatically presents the find and replace interface for text editor views.
- fontSets the default font for text in this view.
- fontDesignSets the font design of the text in this view.
- fontWeightSets the font weight of the text in this view.
- fontWidthSets the font width of the text in this view.
- interactionActivityTrackingTagSets a tag that you use for tracking interactivity.
- italicApplies italics to the text in this view.
- kerningSets the spacing, or kerning, between characters for the text in this view.
- keyboardTypeSets the keyboard type for this view.
- lineHeightA modifier for the default line height in the view hierarchy.
- lineLimitSets to a partial range the number of lines that text can occupy in this view.
- lineSpacingSets the amount of space between lines of text in this view.
- minimumScaleFactorSets the minimum amount that text in this view scales down to fit in the available space.
- monospacedModifies the fonts of all child views to use the fixed-width variant of the current font, if possible.
- monospacedDigitModifies the fonts of all child views to use fixed-width digits, if possible, while leaving other characters proportionally spaced.
- multilineTextAlignmentSets the alignment of a text view that contains multiple lines of text.
- replaceDisabledPrevents replace operations in a text editor.
- strikethroughApplies a strikethrough to the text in this view.
- submitLabelSets the submit label for this view.
- submitScopePrevents submission triggers originating from this view to invoke a submission action configured by a submission modifier higher up in the view hierarchy.
- symbolColorRenderingModeSets the color rendering mode for symbol images.
- symbolEffectsRemovedReturns a new view with its inherited symbol image effects either removed or left unchanged.
- symbolRenderingModeSets the rendering mode for symbol images within this view.
- symbolVariableValueModeSets the variable value mode mode for symbol images within this view.
- symbolVariantMakes symbols within the view show a particular variant.
- textCaseSets a transform for the case of the text contained in this view when displayed.
- textContentTypeSets the text content type for this view, which the system uses to offer suggestions while the user enters text on an iOS or tvOS device.
- textInputAutocapitalizationSets how often the shift key in the keyboard is automatically enabled.
- textInputFormattingControlVisibilitySpecifies which system text formatting controls are available for people to format text.
- textScaleApplies a text scale to text in the view.
- textSelectionControls whether people can select text within this view.
- textSelectionAffinitySets the direction of a selection or cursor relative to a text character.
- trackingSets the tracking for the text in this view.
- truncationModeSets the truncation mode for lines of text that are too long to fit in the available space.
- typesettingLanguageSpecifies the language for typesetting.
- underlineApplies an underline to the text in this view.
- writingDirectionA modifier for the default text writing direction strategy in the view hierarchy.
- writingToolsAffordanceVisibilitySpecifies whether the system should show the Writing Tools affordance for text input views affected by the environment.
- writingToolsBehaviorSpecifies the Writing Tools behavior for text and text input in the environment.
Layout
- alignmentGuideSets the view's vertical alignment.
- aspectRatioConstrains this view's dimensions to the specified aspect ratio.
- containerCornerOffsetAdjusts the view's layout to avoid the container view's corner insets for the specified edges.
- containerRelativeFramePositions this view within an invisible frame with a size relative to the nearest container.
- controlSizeSets the size for controls within this view.
- defaultScrollAnchorAssociates an anchor to control which part of the scroll view's content should be rendered by default.
- dynamicTypeSizeSets the Dynamic Type size within the view to the given value.
- fixedSizeFixes this view at its ideal size.
- flipsForRightToLeftLayoutDirectionSets whether this view mirrors its contents horizontally when the layout direction is right-to-left.
- framePositions this view within an invisible frame.
- geometryGroupIsolates the geometry (e.g. position and size) of the view from its parent view.
- gridCellAnchorSpecifies a custom alignment anchor for a view that acts as a grid cell.
- gridCellColumnsTells a view that acts as a cell in a grid to span the specified number of columns.
- gridCellUnsizedAxesAsks grid layouts not to offer the view extra size in the specified axes.
- gridColumnAlignmentOverrides the default horizontal alignment of the grid column that the view appears in.
- ignoresSafeAreaExpands the safe area of a view.
- layoutDirectionBehaviorSets the behavior of this view for different layout directions.
- layoutPrioritySets the priority by which a parent layout should apportion space to this child.
- layoutValueAssociates a value with a custom layout property.
- offsetOffset this view by the horizontal and vertical amount specified in the offset parameter.
- paddingAdds an equal padding amount to specific edges of this view.
- positionPositions the center of this view at the specified point in its parent's coordinate space.
- reorderContainerDefines a container of reorderable views, with a type you specify to identify sections.
- safeAreaBarShows the specified content as a custom bar above or below the modified view.
- safeAreaInsetShows the specified content above or below the modified view.
- safeAreaPaddingAdds the provided insets into the safe area of this view.
- scenePaddingAdds padding to the specified edges of this view using an amount that's appropriate for the current scene.
- scrollBounceBehaviorConfigures the bounce behavior of scrollable views along the specified axis.
- scrollIndicatorsSets the visibility of scroll indicators within this view.
- scrollIndicatorsFlashFlashes the scroll indicators of a scrollable view when it appears.
- scrollPositionAssociates a binding to a scroll position with a scroll view within this view.
- scrollTargetBehaviorSets the scroll behavior of views scrollable in the provided axes.
- scrollTargetLayoutConfigures the outermost layout as a scroll target layout.
Styles
- arrangementViewStyleSets the style for arrangement views within this view.
- backgroundStyleSets the specified style to render backgrounds within the view.
- buttonStyleSets the style for buttons within this view to a button style with a custom appearance and custom interaction behavior.
- controlGroupStyleSets the style for control groups within this view.
- datePickerStyleSets the style for date pickers within this view.
- disclosureGroupStyleSets the style for disclosure groups within this view.
- foregroundStyleSets the primary, secondary, and tertiary levels of the foreground style.
- formStyleSets the style for forms in a view hierarchy.
- gaugeStyleSets the style for gauges within this view.
- groupBoxStyleSets the style for group boxes within this view.
- indexViewStyleSets the style for the index view within the current environment.
- labeledContentStyleSets a style for labeled content.
- labelStyleSets the style for labels within this view.
- listStyleSets the style for lists within this view.
- menuStyleSets the style for menus within this view.
- navigationSplitViewStyleSets the style for navigation split views within this view.
- pickerStyleSets the style for pickers within this view.
- progressViewStyleSets the style for progress views in this view.
- scrollEdgeEffectStyleConfigures the scroll edge effect style for scroll views within this hierarchy.
- tableStyleSets the style for tables within this view.
- tabViewStyleSets the style for the tab view within the current environment.
- textEditorStyleSets the style for text editors within this view.
- textFieldStyleSets the style for text fields within this view.
- toggleStyleSets the style for toggles in a view hierarchy.
Visual effects
- allowedDynamicRangeReturns a new view configured with the specified allowed dynamic range.
- backgroundExtensionEffectAdds the background extension effect to the view. The view will be duplicated into mirrored copies which will be placed around the view on any edge with available safe area. Additionally, a blur effect will be applied on top to blur out the copies.
- blurApplies a Gaussian blur to this view.
- brightnessBrightens this view by the specified amount.
- clippedClips this view to its bounding rectangular frame.
- colorEffectReturns a new view that applies shader to self as a filter effect on the color of each pixel.
- colorInvertInverts the colors in this view.
- colorMultiplyAdds a color multiplication effect to this view.
- compositingGroupWraps this view in a compositing group.
- contrastSets the contrast and separation between similar colors in this view.
- distortionEffectReturns a new view that applies shader to self as a geometric distortion effect on the location of each pixel.
- drawingGroupComposites this view's contents into an offscreen image before final display.
- glassEffectApplies a glass effect to this view.
- glassEffectIDAssociates an identity value to glass effects defined within this view.
- glassEffectUnionAssociates any glass effects defined within this view to a union with the provided id.
- grayscaleAdds a grayscale effect to this view.
- hueRotationApplies a hue rotation effect to this view.
- layerEffectReturns a new view that applies shader to self as a filter on the raster layer created from self.
- luminanceToAlphaAdds a luminance to alpha effect to this view.
- maskMasks this view using the alpha channel of the given view.
- projectionEffectApplies a projection transformation to this view's rendered output.
- rotation3DEffectRenders a view's content as if it's rotated in three dimensions around the specified axis.
- rotationEffectRotates a view's rendered output in two dimensions around the specified point.
- saturationAdjusts the color saturation of this view.
- scaleEffectScales this view's rendered output by the given amount in both the horizontal and vertical directions, relative to an anchor point.
- scrollEdgeEffectHiddenHides any scroll edge effects for scroll views within this hierarchy.
- transformEffectApplies an affine transformation to this view's rendered output.
- visualEffectApplies effects to this view, while providing access to layout information through a geometry proxy.
Animation
- animationApplies the given animation to all animatable values within the body closure.
- contentTransitionModifies the view to use a given transition as its method of animating changes to the contents of its views.
- glassEffectTransitionAssociates a glass effect transition with any glass effects defined within this view.
- keyframeAnimatorLoops the given keyframes continuously, updating the view using the modifiers you apply in body.
- matchedGeometryEffectDefines a group of views with synchronized geometry using an identifier and namespace that you provide.
- matchedTransitionSourceIdentifies this view as the source of a navigation transition, such as a zoom transition.
- phaseAnimatorAnimates effects that you apply to a view over a sequence of phases that change continuously.
- scrollTransitionApplies the given transition, animating between the phases of the transition as this view appears and disappears within the visible region of the containing scroll view.
- springLoadingBehaviorSets the spring loading behavior this view.
- transitionAssociates a transition with the view.
Events and lifecycle
- onAppearAdds an action to perform before this view appears.
- onChangeAdds a modifier for this view that fires an action when a specific value changes.
- onContinueUserActivityRegisters a handler to invoke in response to a user activity that your app receives.
- onContinuousHoverAdds an action to perform when the pointer enters, moves within, and exits the view's bounds.
- onDisappearAdds an action to perform after this view disappears.
- onDragActivates this view as the source of a drag and drop operation.
- onDragSessionUpdatedSpecifies an action to perform on each update of an ongoing dragging operation activated by draggable(:) or anther drag modifiers.
- onDropDefines the destination of a drag and drop operation that handles the dropped content with a closure that you specify.
- onDropSessionUpdatedSpecifies an action to perform on each update of an ongoing drop operation activated by dropDestination(:) or other drop modifiers.
- onGeometryChangeAdds an action to be performed when a value, created from a geometry proxy, changes.
- onHingeChangeAdds an action to perform when the hinge context of the view hierarchy changes.
- onHoverAdds an action to perform when the user moves the pointer over or away from the view's frame.
- onInteractiveResizeChangeAdds an action to perform when the enclosing window is being interactively resized.
- onKeyPressPerforms an action if the user presses a key on a hardware keyboard while the view has focus.
- onLongPressGestureAdds an action to perform when this view recognizes a long press gesture.
- onOpenURLRegisters a handler to invoke in response to a URL that your app receives.
- onPencilDoubleTapAdds an action to perform after the user double-taps their Apple Pencil.
- onPencilSqueezeAdds an action to perform when the user squeezes their Apple Pencil.
- onPreferenceChangeAdds an action to perform when the specified preference key's value changes.
- onReceiveAdds an action to perform when this view detects data emitted by the given publisher.
- onScrollGeometryChangeAdds an action to be performed when a value, created from a scroll geometry, changes.
- onScrollPhaseChangeAdds an action to perform when the scroll phase of the first scroll view in the hierarchy changes.
- onScrollTargetVisibilityChangeAdds an action to be called with information about what views would be considered visible.
- onScrollVisibilityChangeAdds an action to be called when the view crosses the threshold to be considered on/off screen.
- onSubmitAdds an action to perform when the user submits a value to this view.
- onTapGestureAdds an action to perform when this view recognizes a tap gesture, and provides the action with the location of the interaction.
- taskAdds a task to perform before this view appears or when a specified value changes.
Gestures and input
- defaultHoverEffectSets the default hover effect to use for views within this view.
- defersSystemGesturesSets the screen edge from which you want your gesture to take precedence over the system gesture.
- dragConfigurationConfigures a drag session.
- dragContainerA container with draggable views. The drag payload is identifiable. To form the payload, use the identifier of the dragged view inside the container.
- dragContainerSelectionProvides multiple item selection support for drag containers.
- gestureAttaches a gesture to the view with a lower precedence than gestures defined by the view.
- handGestureShortcutAssigns a hand gesture shortcut to the modified control.
- highPriorityGestureAttaches a gesture to the view with a higher precedence than gestures defined by the view.
- hoverEffectApplies a hover effect to this view.
- hoverEffectDisabledAdds a condition that controls whether this view can display hover effects.
- presentationDragIndicatorSets the visibility of the drag indicator on top of a sheet.
- simultaneousGestureAttaches a gesture to the view to process simultaneously with gestures defined by the view.
Input and interaction
- allowsHitTestingConfigures whether this view participates in hit test operations.
- allowsWindowActivationEventsConfigures whether gestures in this view hierarchy can handle events that activate the containing window.
- buttonRepeatBehaviorSets whether buttons in this view should repeatedly trigger their actions on prolonged interactions.
- disabledAdds a condition that controls whether someone can interact with this view.
- handlesExternalEventsSpecifies the external events that the view's scene handles if the scene is already open.
- helpAdds help text to a view using a localized string resource that you provide.
- invalidatableContentMark the receiver as their content might be invalidated.
- keyboardShortcutAssigns a keyboard shortcut to the modified control.
- scrollClipDisabledSets whether a scroll view clips its content to its bounds.
- scrollDisabledDisables or enables scrolling in scrollable views.
- scrollDismissesKeyboardConfigures the behavior in which scrollable content interacts with the software keyboard.
- sensoryFeedbackPlays the specified feedback when the provided trigger value changes.
- userActivityAdvertises a user activity type.
Focus
- defaultFocusDefines a region of the window in which default focus is evaluated by assigning a value to a given focus state binding.
- focusableSpecifies if the view is focusable.
- focusedModifies this view by binding its focus state to the given Boolean state value.
- focusEffectDisabledAdds a condition that controls whether this view can display focus effects, such as a default focus ring or hover effect.
- searchFocusedModifies this view by binding the focus state of the search field associated with the nearest searchable modifier to the given Boolean value.
Lists and tables
- deleteDisabledAdds a condition for whether the view's view hierarchy is deletable.
- listItemTintSets the tint effect for content in a list.
- listRowBackgroundPlaces a custom background view behind a list row item.
- listRowInsetsSets the insets of rows in a list on the specified edges.
- listRowSeparatorSets the display mode for the separator associated with this specific row.
- listRowSeparatorTintSets the tint color associated with a row.
- listRowSpacingSets the vertical spacing between two adjacent rows in a List.
- listSectionIndexVisibilityChanges the visibility of the list section index.
- listSectionMarginsSet the section margins for the specific edges.
- listSectionSeparatorSets whether to hide the separator associated with a list section.
- listSectionSeparatorTintSets the tint color associated with a section.
- listSectionSpacingSets the spacing between adjacent sections in a List to a custom value.
- moveDisabledAdds a condition for whether the view's view hierarchy is movable.
- paletteSelectionEffectSpecifies the selection effect to apply to a palette item.
- refreshableAdds an asynchronous handler that can update the data the view displays when a person initiates a request, such as by pulling to refresh.
- sectionActionsAdds custom actions to a section.
- sectionIndexLabelSets the label that is used in a section index to point to this section, typically only a single character long.
- selectionDisabledAdds a condition that controls whether users can select this view.
- swipeActionsAdds custom swipe actions to a row in a list.
- swipeActionsContainerCoordinates swipe action dismissal and mutual exclusion across rows in a container.
- tableColumnHeadersControls the visibility of a Table's column header views.
Navigation
- assistiveAccessNavigationIconConfigures the view's icon for purposes of navigation.
- asyncImageURLSessionA modifier that adds a URL session for asynchronous images contained in the view to use when fetching image data.
- contentToolbarPopulates the toolbar of the specified content view type with the views you provide.
- defaultAdaptableTabBarPlacementSpecifies the default placement for the tabs in a tab view using the adaptable sidebar style.
- defaultTabBarPlacementSpecifies the preferred placement for the tabs of a TabView in the TabViewStyle.sidebarAdaptable style on platforms where the tab bar cannot adapt between different representations, and only one representation can be shown.
- navigationBarBackButtonHiddenHides the navigation bar back button for the view.
- navigationBarTitleDisplayModeConfigures the title display mode for this view.
- navigationDestinationAssociates a destination view with a presented data type for use within a navigation stack.
- navigationDocumentConfigures the view's document for purposes of navigation.
- navigationLinkIndicatorVisibilityConfigures whether navigation links show a disclosure indicator.
- navigationSplitViewColumnWidthSets a fixed, preferred width for the column containing this view.
- navigationSubtitleConfigures the view's subtitle for purposes of navigation, using a localized string resource.
- navigationTitleConfigures the view's title for purposes of navigation, using a localized string resource.
- navigationTransitionSets the navigation transition style for this view.
- searchableMarks this view as searchable, which configures the display of a search field.
- searchCompletionAssociates a search token with the value of this view when used as a search suggestion.
- searchDictationBehaviorConfigures the dictation behavior for any search fields configured by the searchable modifier.
- searchPresentationToolbarBehaviorConfigures the search toolbar presentation behavior for any searchable modifiers within this view.
- searchScopesConfigures the search scopes for this view with the specified activation strategy.
- searchSuggestionsConfigures the search suggestions for this view.
- searchToolbarBehaviorConfigures the behavior for search in the toolbar.
- splitArrangementFixedLayoutSizeSets the preferred size constraint for an arrangement view in a split style to the ideal size of the view within its container. The arrangement view will prefer this size, but may resize to a smaller size depending on the priority of the view.
- splitArrangementLayoutRatioSets the preferred size ratio for an arrangement view in a split style. Use this modifier when you want to customize the size of the view compared to its other views in the split layout.
- splitArrangementLayoutSizeSets the size constraints for an arrangement view in a split style.
- tabBarMinimizeBehaviorSets the behavior for tab bar minimization.
- tabViewBottomAccessoryPlaces a view as the bottom accessory of the tab view.
- tabViewCustomizationSpecifies the customizations to apply to the sidebar representation of the tab view.
- tabViewSearchActivationConfigures the activation and deactivation behavior of search in the search tab.
- tabViewSidebarBottomBarAdds a custom bottom bar to the sidebar of a tab view.
- tabViewSidebarFooterAdds a custom footer to the sidebar of a tab view.
- tabViewSidebarHeaderAdds a custom header to the sidebar of a tab view.
- toolbarPopulates the toolbar or navigation bar with the specified items.
- toolbarBackgroundSpecifies the preferred shape style of the background of a bar managed by SwiftUI.
- toolbarBackgroundVisibilitySpecifies the preferred visibility of backgrounds on a bar managed by SwiftUI.
- toolbarColorSchemeSpecifies the preferred color scheme of a bar managed by SwiftUI.
- toolbarMinimizationBehaviorSets the minimize behavior for the specified bars.
- toolbarMinimizationRestorationSets the restoration behavior for the specified bars during minimization.
- toolbarMinimizationSafeAreaAdjustmentSets the safe area adjustment for the specified bars during minimization.
- toolbarOverflowMenuConfigures the overflow menu of a toolbar.
- toolbarRoleConfigures the semantic role for the content populating the toolbar.
- toolbarTitleAlignmentSets the preferred alignment of the navigation bar's title.
- toolbarTitleDisplayModeConfigures the toolbar title display mode for this view.
- toolbarTitleMenuConfigure the title menu of a toolbar.
- toolbarVerticalBehaviorSets the behavior for the vertical bar.
- toolbarVerticalCompressionBehaviorSets how bars should compress when different types of toolbars are hosted together and space is constrained.
- toolbarVisibilitySpecifies the visibility of a bar managed by SwiftUI.
- windowToolbarFullScreenVisibilityConfigures the visibility of the window toolbar when the window enters full screen mode.
Presentation
- alertPresents an alert when a given condition is true, using a localized string resource for the title.
- confirmationDialogPresents a confirmation dialog when a given condition is true, using a localized string resource for the title.
- contextMenuAdds an item-based context menu to a view.
- dialogIconConfigures the icon used by dialogs within this view.
- dialogSuppressionToggleEnables user suppression of dialogs and alerts presented within self, with a custom suppression message on macOS. Unused on other platforms.
- dismissalConfirmationDialogPresents a confirmation dialog upon an attempt to dismiss the window for this view.
- documentBrowserContextMenuAdds to a DocumentLaunchView actions that accept a list of selected files as their parameter.
- fileDialogBrowserOptionsOn macOS, configures the fileExporter, fileImporter, or fileMover to provide a refined URL search experience: include or exclude hidden files, allow searching by tag, etc.
- fileDialogConfirmationLabelOn macOS, configures the fileExporter, fileImporter, or fileMover with a custom confirmation button label.
- fileDialogCustomizationIDOn macOS, configures the fileExporter, fileImporter, or fileMover to persist and restore the file dialog configuration.
- fileDialogDefaultDirectoryConfigures the fileExporter, fileImporter, or fileMover to open with the specified default directory.
- fileDialogImportsUnresolvedAliasesOn macOS, configures the fileExporter, fileImporter, or fileMover behavior when a user chooses an alias.
- fileDialogMessageOn macOS, configures the fileExporter, fileImporter, or fileMover with a custom message that is presented to the user, similar to a title.
- fullScreenCoverPresents a modal view that covers as much of the screen as possible when binding to a Boolean value you provide is true.
- inspectorInserts an inspector at the applied position in the view hierarchy.
- inspectorColumnWidthSets a fixed, preferred width for the inspector containing this view when presented as a trailing column.
- interactiveDismissDisabledConditionally prevents interactive dismissal of presentations like popovers, sheets, and inspectors.
- menuActionDismissBehaviorTells a menu whether to dismiss after performing an action.
- menuIndicatorSets the menu indicator visibility for controls within this view.
- menuOrderSets the preferred order of items for menus presented from this view.
- popoverPresents a popover when a given condition is true.
- presentationBackgroundSets the presentation background of the enclosing sheet using a shape style.
- presentationBackgroundInteractionControls whether people can interact with the view behind a presentation.
- presentationCompactAdaptationSpecifies how to adapt a presentation to compact size classes.
- presentationContentInteractionConfigures the behavior of swipe gestures on a presentation.
- presentationCornerRadiusRequests that the presentation have a specific corner radius.
- presentationDetentsSets the available detents for the enclosing sheet.
- presentationPlacementSets the placement of a presentation within the presenting view.
- presentationSizingSets the sizing of the containing presentation.
- sheetPresents a sheet when a binding to a Boolean value that you provide is true.
Drag and drop
- copyableSpecifies a list of items to copy in response to the system's Copy command.
- cuttableSpecifies an action that moves items to the Clipboard in response to the system's Cut command.
- documentLaunchSubtitleSets the subtitle displayed beneath the title on the document launch card, using a localized string resource.
- documentLaunchTitleSets the title displayed on the document launch card, using a localized string resource.
- draggableActivates this view as the source of a drag and drop operation.
- dropConfigurationConfigures a drop session.
- dropDestinationDefines the destination of a drag and drop operation that provides a drop operation proposal and handles the dropped content with a closure that you specify.
- fileExporterPresents a system dialog allowing the user to export a Transferable item to a file on disk.
- fileExporterFilenameLabelOn macOS, configures the fileExporter with a label for the file name field.
- fileImporterPresents a system dialog for allowing the user to import multiple files.
- fileMoverPresents a system dialog for allowing the user to move an existing file to a new location.
- itemProviderProvides a closure that vends the drag representation to be used for a particular data element.
- pasteDestinationSpecifies an action that adds validated items to a view in response to the system's Paste command.
Drawing and shapes
- blendModeSets the blend mode for compositing this view with overlapping views.
- buttonBorderShapeSets the border shape for buttons in this view.
- clipShapeSets a clipping shape for this view.
- containerShapeSets the container shape to use for any container relative shape within this view.
- contentShapeSets the content shape for this view.
- coordinateSpaceAssigns a name to the view's coordinate space, so other code can operate on dimensions like points and sizes relative to the named space.
- materialActiveAppearanceSets an explicit active appearance for materials in this view.
- textInputBorderShapeSets the border shape for text input controls in the view hierarchy.
Accessibility
- accessibilityActionAdds an accessibility action to the view. Actions allow assistive technologies, such as the VoiceOver, to interact with the view by invoking the action.
- accessibilityActionsAdds multiple accessibility actions to the view.
- accessibilityActivationPointThe activation point for an element is the location assistive technologies use to initiate gestures.
- accessibilityAddTraitsAdds the given traits to the view.
- accessibilityAdjustableActionAdds an accessibility adjustable action to the view. Actions allow assistive technologies, such as the VoiceOver, to interact with the view by invoking the action.
- accessibilityChildrenReplaces the existing accessibility element's children with one or more new synthetic accessibility elements.
- accessibilityCustomContentAdd additional accessibility information to the view.
- accessibilityDefaultFocusDefines a region in which default accessibility focus is evaluated by assigning a value to a given accessibility focus state binding.
- accessibilityDirectTouchExplicitly 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.
- accessibilityDragPointThe point an assistive technology should use to begin a drag interaction.
- accessibilityDropPointThe point an assistive technology should use to end a drag interaction.
- accessibilityElementCreates a new accessibility element, or modifies the AccessibilityChildBehavior of the existing accessibility element.
- accessibilityFocusedModifies this view by binding its accessibility element's focus state to the given boolean state value.
- accessibilityHeadingSets the accessibility level of this heading.
- accessibilityHiddenSpecifies whether to hide this view from system accessibility features.
- accessibilityHintCommunicates to the user what happens after performing the view's action.
- accessibilityIdentifierUses the string you specify to identify the view.
- accessibilityIgnoresInvertColorsSets whether this view should ignore the system Smart Invert setting.
- accessibilityInputLabelsSets alternate input labels with which users identify a view.
- accessibilityLabelAdds a label to the view that describes its contents.
- accessibilityLabeledPairPairs an accessibility element representing a label with the element for the matching content.
- accessibilityLinkedGroupLinks multiple accessibility elements so that the user can quickly navigate from one element to another, even when the elements are not near each other in the accessibility hierarchy.
- accessibilityRemoveTraitsRemoves the given traits from this view.
- accessibilityRepresentationReplaces one or more accessibility elements for this view with new accessibility elements.
- accessibilityRespondsToUserInteractionExplicitly 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.
- accessibilityRotorCreate an Accessibility Rotor with the specified user-visible label and entries.
- accessibilityRotorEntryDefines an explicit identifier tying an Accessibility element for this view to an entry in an Accessibility Rotor.
- accessibilityScrollActionAdds an accessibility scroll action to the view. Actions allow assistive technologies, such as the VoiceOver, to interact with the view by invoking the action.
- accessibilityScrollStatusChanges the announcement provided by accessibility technologies when a user scrolls a scroll view within this view.
- accessibilityShowsLargeContentViewerAdds a custom large content view to be shown by the large content viewer.
- accessibilitySortPrioritySets the sort priority order for this view's accessibility element, relative to other elements at the same level.
- accessibilityTextContentTypeSets an accessibility text content type.
- accessibilityValueAdds a textual description of the value that the view contains.
- accessibilityZoomActionAdds an accessibility zoom action to the view. Actions allow assistive technologies, such as VoiceOver, to interact with the view by invoking the action.
- speechAdjustedPitchRaises or lowers the pitch of spoken text.
- speechAlwaysIncludesPunctuationSets whether VoiceOver should always speak all punctuation in the text view.
- speechAnnouncementsQueuedControls whether to queue pending announcements behind existing speech rather than interrupting speech in progress.
- speechSpellsOutCharactersSets whether VoiceOver should speak the contents of the text view character by character.
State and environment
- defaultAppStorageThe default store used by AppStorage contained within the view.
- environmentSets the environment value of the specified key path to the given value.
- transactionApplies the given transaction mutation function to all animations used within the view.
- transformEnvironmentTransforms the environment value of the specified key path with the given function.
Preferences
- backgroundPreferenceValueReads the specified preference value from the view, using it to produce a second view that is applied as the background of the original view.
- overlayPreferenceValueReads the specified preference value from the view, using it to produce a second view that is applied as an overlay to the original view.
- preferenceSets a value for the given preference.
- transformPreferenceApplies a transformation to a preference value.
Other modifiers
- contentMarginsConfigures the content margin for a provided placement.
- idBinds a view's identity to the given proxy value.
- modifierApplies a modifier to a view and returns a new view.
- persistentSystemOverlaysSets the preferred visibility of the non-transient system views overlaying the app.
- renameActionSets the rename action in the environment to update focus state.
- tagSets the unique tag value of this view.
- typeSelectEquivalentSets an explicit type select equivalent text in a collection, such as a list or table.
Color modifiers
DynamicViewContent modifiers
- dropDestinationSets the insert action for the dynamic view.
- onDeleteSets the deletion action for the dynamic view. You must delete the corresponding item within action, as it will be called after the row has already been removed from the List.
- onMoveSets the move action for the dynamic view.
- reorderableEnables reordering of views from this content inside the scope of a reorderable container modifier.
Image modifiers
- allowedDynamicRangeReturns a new image configured with the specified allowed dynamic range.
- antialiasedSpecifies whether SwiftUI applies antialiasing when rendering the image. allow antialiasing. Pass true to allow antialising, false otherwise.
- interpolationSpecifies the current level of quality for rendering an image that requires interpolation.
- renderingModeIndicates whether SwiftUI renders an image as-is, or by using a different mode.
- resizableSets the mode by which SwiftUI resizes an image to fit its space.
- symbolColorRenderingModeSets the color rendering mode of the image.
- symbolRenderingModeSets the rendering mode for symbol images within this view.
- symbolVariableValueModeSets the variable value mode mode for symbol images within this view.
InsettableShape modifiers
Shape modifiers
- fillFills this shape with a color or gradient.
- intersectionReturns a new shape with filled regions common to both shapes.
- lineIntersectionReturns a new shape with a line from this shape that overlaps the filled regions of the given shape.
- lineSubtractionReturns a new shape with a line from this shape that does not overlap the filled region of the given shape.
- offsetChanges the relative position of this shape using the specified size.
- pathDescribes this shape as a path within a rectangular frame of reference.
- rotationRotates this shape around an anchor point at the angle you specify.
- scaleScales this shape without changing its bounding frame.
- sizeReturns a new version of self representing the same shape, but that will ask it to create its path from a rect of size. This does not affect the layout properties of any views created from the shape (e.g. by filling it).
- strokeTraces the outline of this shape with a color or gradient.
- subtractingReturns a new shape with filled regions from this shape that are not in the given shape.
- symmetricDifferenceReturns a new shape with filled regions either from this shape or the given shape, but not in both.
- transformApplies an affine transform to this shape.
- trimTrims this shape by a fractional amount based on its representation as a path.
- unionReturns a new shape with filled regions in either this shape or the given shape.
ShapeView modifiers
Text modifiers
- accessibilityHeadingSets the accessibility level of this heading.
- accessibilityLabelAdds a label to the view that describes its contents.
- accessibilityTextContentTypeSets an accessibility text content type.
- baselineOffsetSets the vertical offset for the text relative to its baseline.
- boldApplies a bold font weight to the text.
- fontSets the default font for text in the view.
- fontDesignSets the font design of the text.
- fontWeightSets the font weight of the text.
- fontWidthSets the font width of the text.
- foregroundStyleSets the style of the text displayed by this view.
- italicApplies italics to the text.
- kerningSets the spacing, or kerning, between characters.
- monospacedModifies the font of the text to use the fixed-width variant of the current font, if possible.
- monospacedDigitModifies the text view's font to use fixed-width digits, while leaving other characters proportionally spaced.
- speechAdjustedPitchRaises or lowers the pitch of spoken text.
- speechAlwaysIncludesPunctuationSets whether VoiceOver should always speak all punctuation in the text view.
- speechAnnouncementsQueuedControls whether to queue pending announcements behind existing speech rather than interrupting speech in progress.
- speechSpellsOutCharactersSets whether VoiceOver should speak the contents of the text view character by character.
- strikethroughApplies a strikethrough to the text.
- textScaleApplies a text scale to the text.
- textVariantControls the way text size variants are chosen.
- trackingSets the tracking for the text.
- typesettingLanguageSpecifies the language for typesetting.
- underlineApplies an underline to the text.