SwiftUICore provides the core declarative UI primitives that underlie SwiftUI: views, the environment, layout, and accessibility descriptors. You use it to drive layout and animation through protocols such as Animatable, AlignmentID, and DynamicProperty, and types like AnimationContext, CubicKeyframe, and CoordinateSpace, while reading display traits through enums like ColorScheme, ColorSchemeContrast, DynamicTypeSize, and ControlSize. It also supplies accessibility descriptors and traits, including AccessibilityTraits, AccessibilityTextContentType, and AXChartDescriptorRepresentable, across iOS, macOS, tvOS, watchOS, and visionOS.
Dynamic Properties and Data Flow 7
Protocols and storage that drive view updates and propagate data through the view hierarchy.
- PrDynamicPropertyiOS 13.0+An interface for a stored variable that updates an external property of a
- PrDynamicViewContentiOS 13.0+A type of view that generates views from an underlying collection of data.
- ClAnyLocationiOS 13.0+The base type of type-erased locations with value-type Value.
- ClAnyLocationBaseiOS 13.0+The base type of all type-erased locations.
- StForEachiOS 13.0+A structure that computes views on demand from an underlying collection of
- StForEachSectionCollectioniOS 18.0+A collection which allows a view to be treated as a collection of its
- StForEachSubviewCollectioniOS 18.0+A collection which allows a view to be treated as a collection of its
Environment 8
Types for defining, storing, and reading environment values shared across views.
- PrEnvironmentKeyiOS 13.0+A key for accessing values in the environment.
- PrEnvironmentalModifieriOS 13.0+A modifier that must resolve to a concrete modifier in an environment before
- StEnvironmentValuesiOS 13.0+A collection of environment values propagated through a view hierarchy.
- PrContainerValueKeyiOS 18.0+A key for accessing container values.
- StContainerValuesiOS 18.0+A collection of container values associated with a given view.
- PrPreferenceKeyiOS 13.0+A named value produced by a view.
- StPreferredColorSchemeKeyiOS 13.0+A key for specifying the preferred color scheme.
- PrTransactionKeyiOS 17.0+A key for accessing values in a transaction.
Layout 19
Protocols and structures that measure subviews and arrange them within a coordinate space.
- PrAlignmentIDiOS 13.0+A type that you use to create custom alignment guides.
- PrDepthAlignmentIDA protocol for defining a custom depth alignment guide in three-dimensional layout.
- StDepthAlignmentKeyA single sort key type for alignment guides in Z. You don't use this
- PrLayoutValueKeyiOS 16.0+A key for accessing a layout value of a layout container's subviews.
- StLayoutPropertiesiOS 16.0+Layout-specific properties of a layout container.
- StLayoutSubviewiOS 16.0+A proxy that represents one subview of a layout.
- StLayoutSubviewsiOS 16.0+A collection of proxy values that represent the subviews of a layout view.
- StViewDimensionsiOS 13.0+A view's size and alignment guides in its own coordinate space.
- StViewDimensions3DA view's 3D size and alignment guides in its own coordinate space.
- StViewSpacingiOS 16.0+A collection of the geometric spacing preferences of a view.
- StGeometryProxyiOS 13.0+A proxy for access to the size and coordinate space (for anchor resolution)
- StGeometryProxy3DA proxy for access to the size and coordinate space of the container view.
- PrCoordinateSpaceProtocoliOS 17.0+A frame of reference within the layout system.
- EnCoordinateSpaceiOS 13.0+A resolved coordinate space created by the coordinate space protocol.
- StGlobalCoordinateSpaceiOS 17.0+The global coordinate space at the root of the view hierarchy.
- StLocalCoordinateSpaceiOS 17.0+The local coordinate space of the current view.
- StNamedCoordinateSpaceiOS 17.0+A named coordinate space.
- EnLayoutDirectioniOS 13.0+A direction in which SwiftUI can lay out content.
- EnLayoutDirectionBehavioriOS 17.0+A description of what should happen when the layout direction changes.
Subviews and Sections 4
Collections that expose a view's child subviews and sections for traversal.
- StSubviewsCollectioniOS 18.0+An opaque collection representing the subviews of view.
- StSubviewsCollectionSliceiOS 18.0+A slice of a SubviewsCollection.
- StSectionCollectioniOS 18.0+An opaque collection representing the sections of view.
- StSectionConfigurationiOS 18.0+Specifies the contents of a section.
Animation 8
Protocols and contexts that make values interpolatable and drive custom animations.
- PrAnimatableiOS 13.0+A type that describes how to animate a property of a view.
- PrVectorArithmeticiOS 13.0+A type that can serve as the animatable data of an animatable type.
- PrAnimationStateKeyiOS 17.0+A key for accessing animation state values.
- StAnimationContextiOS 17.0+Contextual values that a custom animation can use to manage state and
- StAnimationStateiOS 17.0+A container that stores the state for a custom animation.
- StAnimationCompletionCriteriaiOS 17.0+The criteria that determines when an animation is considered finished.
- StSpringiOS 17.0+A representation of a spring's motion.
- StUnitCurveiOS 17.0+A function defined by a two-dimensional curve that maps an input
Keyframes 8
Building blocks for declaring keyframe-based animation timelines and tracks.
- PrKeyframesiOS 17.0+A type that defines changes to a value over time.
- PrKeyframeTrackContentiOS 17.0+A group of keyframes that define an interpolation curve of an animatable
- StKeyframeTimelineiOS 17.0+A description of how a value changes over time, modeled using keyframes.
- StKeyframeTrackiOS 17.0+A sequence of keyframes animating a single property of a root type.
- StCubicKeyframeiOS 17.0+A keyframe that uses a cubic curve to smoothly interpolate between values.
- StLinearKeyframeiOS 17.0+A keyframe that uses simple linear interpolation.
- StMoveKeyframeiOS 17.0+A keyframe that immediately moves to the given value without interpolating.
- StSpringKeyframeiOS 17.0+A keyframe that uses a spring function to interpolate to the given value.
Timelines 6
Schedules and data sources that drive content updates over time.
- PrTimelineScheduleiOS 15.0+A type that provides a sequence of dates for use as a schedule.
- EnTimelineScheduleModeiOS 15.0+A mode of operation for timeline schedule updates.
- StEveryMinuteTimelineScheduleiOS 15.0+A schedule for updating a timeline view at the start of every minute.
- StExplicitTimelineScheduleiOS 15.0+A schedule for updating a timeline view at explicit points in time.
- StPeriodicTimelineScheduleiOS 15.0+A schedule for updating a timeline view at regular intervals.
- StTimeDataSourceiOS 18.0+A source of time related data.
Shapes 6
Protocols and shapes for defining insettable and rounded rectangular geometry.
- PrInsettableShapeiOS 13.0+A shape type that is able to inset itself to produce another shape.
- PrRoundedRectangularShapeiOS 26.0+A protocol of ``InsettableShape`` that describes a rounded rectangular
- StRoundedRectangularShapeCornersiOS 26.0+A type describing the corner styles of a ``RoundedRectangularShape``.
- StConcentricRectangleiOS 26.0+A shape whose corners you configure, individually or uniformly, to be
- EnRoundedCornerStyleiOS 13.0+Defines the shape of a rounded rectangle's corners.
- EnShapeRoleiOS 15.0+Ways of styling a shape.
Shape Styles and Materials 8
Fills, materials, and shadow styles used to render shapes and backgrounds.
- PrShapeStyleiOS 13.0+A color or pattern to use when rendering a shape.
- StMaterialiOS 15.0+A background material type.
- StMaterialActiveAppearanceiOS 18.0+The behavior for how materials appear active and inactive.
- StSeparatorShapeStyleiOS 17.0+A style appropriate for foreground separator or border lines.
- StTintShapeStyleiOS 15.0+A style that reflects the current tint color.
- StShadowStyleiOS 16.0+A style to use when rendering shadows.
- StBackgroundProminenceiOS 17.0+The prominence of backgrounds underneath other views.
- EnProminenceiOS 15.0+A type indicating the prominence of a view hierarchy.
Rendering and Visual Effects 10
Renderers, shaders, and effects that produce or transform a view's visual output.
- ClImageRendereriOS 16.0+An object that creates images from SwiftUI views.
- PrTextRendereriOS 17.0+A value that can replace the default text view rendering behavior.
- StTextProxyiOS 18.0+A proxy for a text view that custom text renderers use.
- StShaderA reference to a function in a Metal shader library, along with its
- PrVisualEffectiOS 17.0+Visual Effects change the visual appearance of a view without changing its
- StEmptyVisualEffectiOS 17.0+The base visual effect that you apply additional effect to.
- EnBlendModeiOS 13.0+Modes for compositing a view with overlapping content.
- EnColorRenderingModeiOS 13.0+The set of possible working color spaces for color-compositing operations.
- StContentTransitioniOS 16.0+A kind of transition that applies to the content within a single view,
- StTransitionPropertiesiOS 17.0+The properties a `Transition` can have.
Hover Effects 4
Protocols and effects that customize how views respond to pointer hover.
- PrCustomHoverEffectA type that represents how a view should change when a pointer hovers
- PrHoverEffectContentA type that describes the effects of a view for a particular hover
- StEmptyHoverEffectA base hover effect used to build additional effects.
- StEmptyHoverEffectContentAn empty base effect that you use to build other effects.
Symbol Rendering 4
Modes and variants that control how SF Symbols are rendered and styled.
- StSymbolColorRenderingModeiOS 26.0+A method of filling a layer in a symbol image.
- StSymbolRenderingModeiOS 15.0+A symbol rendering mode.
- StSymbolVariableValueModeiOS 26.0+A method of rendering the variable value of a symbol image.
- StSymbolVariantsiOS 15.0+A variant of a symbol.
Text and Attributed Content 12
Protocols and types governing text attributes, formatting, selectability, and typesetting.
- PrTextAttributeiOS 17.0+A value that you can attach to text views and that text renderers can query.
- PrAttributedTextFormattingDefinitioniOS 26.0+A protocol for defining how text can be styled in a view.
- PrAttributedTextValueConstraintiOS 26.0+A protocol for defining a constraint on the value of a certain attribute.
- EnAttributedTextFormattingiOS 26.0+A namespace for types related to attributed text formatting definitions.
- PrTextSelectabilityA type that describes the ability to select text.
- StDisabledTextSelectabilityA selectability type that disables text selection by the person using your app.
- StEnabledTextSelectabilityA selectability type that enables text selection by the person using your app.
- PrTextVariantPreferenceiOS 18.0+A protocol for controlling the size variant of text views.
- StFixedTextVariantiOS 18.0+The default text variant preference that chooses the largest available
- StSizeDependentTextVariantiOS 18.0+The size dependent variant preference allows the text to take the available
- StTypesettingLanguageiOS 17.0+Defines how typesetting language is determined for text.
- EnSystemFormatStyleiOS 18.0+A collection of format styles for displaying live-updating time
Scrolling 5
Types that describe scroll geometry, position, and content-offset behavior.
- StScrollGeometryiOS 18.0+A type that defines the geometry of a scroll view.
- StScrollPositioniOS 18.0+A type that defines the semantic position of where a scroll view is
- StScrollTargetiOS 17.0+A type defining the target in which a scroll view should try and scroll to.
- StScrollContentOffsetAdjustmentBehavioriOS 18.0+A type that defines the different kinds of content offset adjusting
- StPinnedScrollableViewsiOS 14.0+A set of view types that may be pinned to the bounds of a scroll view.
Interaction Traits 4
Option sets that classify content shapes and gesture input kinds for interaction.
- StContentShapeKindsiOS 15.0+A kind for the content shape of a view.
- StGestureInputKindsAn option set that specifies which input kinds a gesture should recognize.
- StButtonSizingiOS 26.0+The sizing behavior of `Button`s and other button-like controls.
- EnControlSizeiOS 15.0+The size classes, like regular or small, that you can apply to controls
Accessibility 5
Descriptors, traits, and keys that expose views to assistive technologies.
- PrAXChartDescriptorRepresentableiOS 15.0+A type to generate an `AXChartDescriptor` object that you use to provide
- StAccessibilityCustomContentKeyiOS 15.0+Key used to specify the identifier and label associated with
- StAccessibilityTextContentTypeiOS 15.0+Textual context that assistive technologies can use to improve the
- StAccessibilityTraitsiOS 13.0+A set of accessibility traits that describe how an element behaves.
- StRedactionReasonsiOS 14.0+The reasons to apply a redaction to data displayed on screen.
Display Traits and Appearance 7
Enumerations that report the display environment such as color scheme, contrast, and type size.
- EnColorSchemeiOS 13.0+The possible color schemes, corresponding to the light and dark appearances.
- EnColorSchemeContrastiOS 13.0+The contrast between the app's foreground and background colors.
- EnContentSizeCategoryAn enumeration of the user's preferred content size categories.
- EnDynamicTypeSizeiOS 15.0+A Dynamic Type size, which specifies how large scalable content should be.
- EnLegibilityWeightiOS 13.0+The Accessibility Bold Text user setting options.
- EnUserInterfaceSizeClassiOS 13.0+A set of values that indicate the visual size available to the view.
- EnWorldRecenterPhaseA type that represents information associated with a phase of a
Structures 122
- StAlignmentiOS 13.0+An alignment in both axes.
- StAlignment3DAn alignment in all three axes.
- StAlignmentKeyiOS 13.0+A single sort key type for alignment guides in both axes.
- StAnchoriOS 13.0+An opaque value derived from an anchor source and a particular view.
- StAngleiOS 13.0+A geometric angle whose value you access in either radians or degrees.
- StAngularGradientiOS 13.0+An angular gradient.
- StAnimatablePairiOS 13.0+A pair of animatable values, which is itself animatable.
- StAnimatableValuesiOS 26.0+
- StAnimationiOS 13.0+The way a view changes over time to create a smooth visual transition from
- StAnyGestureiOS 13.0+A type-erased gesture.
- StAnyGradientiOS 16.0+A color gradient.
- StAnyLayoutiOS 16.0+A type-erased instance of the layout protocol.
- StAnyShapeiOS 16.0+A type-erased shape value.
- StAnyShapeStyleiOS 15.0+A type-erased ShapeStyle value.
- StAnyTransitioniOS 13.0+A type-erased transition.
- StAnyViewiOS 13.0+A type-erased view.
Show 106 more
- StAsymmetricTransitioniOS 17.0+A composite `Transition` that uses a different transition for
- StBackgroundStyleiOS 14.0+The background style in the current context.
- StBindableiOS 17.0+A property wrapper type that supports creating bindings to the mutable
- StBindingiOS 13.0+A property wrapper type that can read and write a value owned by a source of
- StBlurReplaceTransitioniOS 17.0+A transition that animates the insertion or removal of a view by
- StCanvasiOS 15.0+A view type that supports immediate mode drawing.
- StCapsuleiOS 13.0+A capsule shape aligned inside the frame of the view containing it.
- StCircleiOS 13.0+A circle centered on the frame of the view containing it.
- StColoriOS 13.0+A representation of a color that adapts to a given context.
- StColorMatrixiOS 15.0+A matrix to use in an RGBA color transformation.
- StContainerRelativeShapeiOS 14.0+A shape that is replaced by an inset version of the current
- StDebugReplaceableViewiOS 26.0+Erases view opaque result types in debug builds.
- StDepthAlignmentAn alignment position along the depth axis.
- StEdgeInsetsiOS 13.0+The inset distances for the sides of a rectangle.
- StEdgeInsets3DThe inset distances for the faces of a 3D volume.
- StEllipseiOS 13.0+An ellipse aligned inside the frame of the view containing it.
- StEllipticalGradientiOS 15.0+A radial gradient that draws an ellipse.
- StEmptyAnimatableDataiOS 13.0+An empty type for animatable data.
- StEmptyModifieriOS 13.0+An empty, or identity, modifier, used during development to switch
- StEmptyViewiOS 13.0+A view that doesn't contain any content.
- StEnvironmentiOS 13.0+A property wrapper that reads a value from a view's environment.
- StEnvironmentObjectiOS 13.0+A property wrapper type for an observable object that a parent or ancestor
- StEventModifiersiOS 13.0+A set of key modifiers that you can add to a gesture.
- StExclusiveGestureiOS 13.0+A gesture that consists of two gestures where only one of them can succeed.
- StFillShapeViewiOS 17.0+A shape provider that fills its shape.
- StFillStyleiOS 13.0+A style for rasterizing vector shapes.
- StFontiOS 13.0+An environment-dependent font.
- StForegroundStyleiOS 13.0+The foreground style in the current context.
- StGeometryReaderiOS 13.0+A container view that defines its content as a function of its own size and
- StGeometryReader3DA container view that defines its content as a function of its own
- StGestureMaskiOS 13.0+Options that control how adding a gesture to a view affects other gestures
- StGradientiOS 13.0+A color gradient represented as an array of color stops, each having a
- StGraphicsContextiOS 15.0+An immediate mode drawing destination, and its current state.
- StGroupiOS 13.0+A type that collects multiple instances of a content type --- like views,
- StGroupElementsOfContentiOS 18.0+Transforms the subviews of a given view into a resulting content view.
- StGroupSectionsOfContentiOS 18.0+Transforms the sections of a given view into a resulting content view.
- StHStackiOS 13.0+A view that arranges its subviews in a horizontal line.
- StHStackLayoutiOS 16.0+A horizontal container that you can use in conditional layouts.
- StHierarchicalShapeStyleiOS 15.0+A shape style that maps to one of the numbered content styles.
- StHierarchicalShapeStyleModifieriOS 17.0+Styles that you can apply to hierarchical shapes.
- StHorizontalAlignmentiOS 13.0+An alignment position along the horizontal axis.
- StIdentityTransitioniOS 17.0+A transition that returns the input view, unmodified, as the output
- StImageiOS 13.0+A view that displays an image.
- StImagePaintiOS 13.0+A shape style that fills a shape by repeating a region of an image.
- StKeyframeAnimatoriOS 17.0+A container that animates its content with keyframes.
- StKeyframeTrackContentBuilderiOS 17.0+The builder that creates keyframe track content from the keyframes
- StKeyframesBuilderiOS 17.0+A builder that combines keyframe content values into a single value.
- StLayoutRotationUnaryLayout
- StLazyHStackiOS 14.0+A view that arranges its children in a line that grows horizontally,
- StLazyStateiOS 17.0+A property wrapper type that can read and write a value managed by SwiftUI.
- StLazyVStackiOS 14.0+A view that arranges its children in a line that grows vertically,
- StLinearGradientiOS 13.0+A linear gradient.
- StLocalizedStringKeyiOS 13.0+The key used to look up an entry in a strings file or strings dictionary
- StMatchedGeometryPropertiesiOS 14.0+A set of view properties that may be synchronized between views
- StMeshGradientiOS 18.0+A two-dimensional gradient defined by a 2D grid of positioned
- StModifiedContentiOS 13.0+A value with a modifier applied to it.
- StMoveTransitioniOS 17.0+Returns a transition that moves the view away, towards the specified
- StNamespaceiOS 14.0+A dynamic property type that allows access to a namespace defined
- StObservedObjectiOS 13.0+A property wrapper type that subscribes to an observable object and
- StOffsetShapeiOS 13.0+A shape with a translation offset transform applied to it.
- StOffsetTransitioniOS 17.0+Returns a transition that offset the view by the specified amount.
- StOpacityTransitioniOS 17.0+A transition from transparent to opaque on insertion, and from opaque to
- StOpenURLActioniOS 14.0+An action that opens a URL.
- StPathiOS 13.0+The outline of a 2D shape.
- StPhaseAnimatoriOS 17.0+A container that animates its content by automatically cycling through
- StPlaceholderContentViewiOS 17.0+A placeholder used to construct an inline modifier, transition, or other
- StProjectionTransformiOS 13.0+
- StProposedViewSizeiOS 16.0+A proposal for the size of a view.
- StPushTransitioniOS 17.0+A transition that when added to a view will animate the view's insertion by
- StRadialGradientiOS 13.0+A radial gradient.
- StRectangleiOS 13.0+A rectangular shape aligned inside the frame of the view containing it.
- StRectangleCornerInsetsiOS 26.0+The inset sizes for the corners of a rectangle.
- StRectangleCornerRadiiiOS 16.0+Describes the corner radius values of a rounded rectangle with
- StRotatedShapeiOS 13.0+A shape with a rotation transform applied to it.
- StRoundedRectangleiOS 13.0+A rectangular shape with rounded corners, aligned inside the frame of the
- StSafeAreaRegionsiOS 14.0+A set of symbolic safe area regions.
- StScaleTransitioniOS 17.0+Returns a transition that scales the view.
- StScaledMetriciOS 14.0+A dynamic property that scales a numeric value.
- StScaledShapeiOS 13.0+A shape with a scale transform applied to it.
- StShaderFunctionA reference to a function in a Metal shader library.
- StShaderLibraryA Metal shader library.
- StSimultaneousGestureiOS 13.0+A gesture containing two gestures that can happen at the same time with
- StSlideTransitioniOS 17.0+A transition that inserts by moving in from the leading edge, and
- StSpaceriOS 13.0+A flexible space that expands along the major axis of its containing stack
- StSpatialContainerA layout container that aligns overlapping content in 3D space.
- StStateiOS 13.0+A property wrapper type that can read and write a value managed by SwiftUI.
- StStateObjectiOS 14.0+A property wrapper type that instantiates an observable object.
- StStrokeBorderShapeViewiOS 17.0+A shape provider that strokes the border of its shape.
- StStrokeShapeViewiOS 17.0+A shape provider that strokes its shape.
- StStrokeStyleiOS 13.0+The characteristics of a stroke that traces a path.
- StSubviewiOS 18.0+An opaque value representing a subview of another view.
- StTapGestureiOS 13.0+A gesture that recognizes one or more taps.
- StTextiOS 13.0+A view that displays one or more lines of read-only text.
- StTransactioniOS 13.0+The context of the current state-processing update.
- StTransformedShapeiOS 13.0+A shape with an affine transform applied to it.
- StTupleContentiOS 26.0+Content created from a tuple of content to be treated as siblings.
- StTupleViewiOS 13.0+A View created from a swift tuple of View values.
- StUnevenRoundedRectangleiOS 16.0+A rectangular shape with rounded corners with different values, aligned
- StUnitPointiOS 13.0+A normalized 2D point in a view's coordinate space.
- StUnitPoint3DA normalized 3D point in a view's coordinate space.
- StVStackiOS 13.0+A view that arranges its subviews in a vertical line.
- StVStackLayoutiOS 16.0+A vertical container that you can use in conditional layouts.
- StVerticalAlignmentiOS 13.0+An alignment position along the vertical axis.
- StViewBuilderiOS 13.0+A custom parameter attribute that constructs views from closures.
- StZStackiOS 13.0+A view that overlays its subviews, aligning them in both axes.
- StZStackLayoutiOS 16.0+An overlaying container that you can use in conditional layouts.
Enumerations 14
- EnAccessibilityHeadingLeveliOS 15.0+The hierarchy of a heading in relation to other headings.
- EnAxisiOS 13.0+The horizontal or vertical dimension in a 2D coordinate system.
- EnChiralityThe chirality, or handedness, of a pose.
- EnContentModeiOS 13.0+Constants that define how a view's content fills the available space.
- EnEdgeiOS 13.0+An enumeration to indicate one edge of a rectangle.
- EnEdge3DAn edge or face of a 3D volume.
- EnHorizontalDirectioniOS 18.0+A direction on the horizontal axis.
- EnHorizontalEdgeiOS 15.0+An edge on the horizontal axis.
- EnScrollPhaseiOS 18.0+A type that describes the state of a scroll gesture of a
- EnTextAlignmentiOS 13.0+An alignment position for text along the horizontal axis.
- EnTransitionPhaseiOS 17.0+An indication of which the current stage of a transition.
- EnVerticalDirectioniOS 18.0+A direction on the vertical axis.
- EnVerticalEdgeiOS 15.0+An edge on the vertical axis.
- EnVisibilityiOS 15.0+The visibility of a UI element, chosen automatically based on
Protocols 9
- PrCustomAnimationiOS 17.0+A type that defines how an animatable value changes over time.
- PrGeometryEffectiOS 13.0+An effect that changes the visual appearance of a view, largely without
- PrGestureiOS 13.0+An instance that matches a sequence of events to a gesture, and returns a
- PrLayoutiOS 16.0+A type that defines the geometry of a collection of views.
- PrShapeiOS 13.0+A 2D shape that you can use when drawing a view.
- PrShapeViewiOS 17.0+A view that provides a shape that you can use for drawing operations.
- PrTransitioniOS 17.0+A description of view changes to apply when a view is added to and removed
- PrViewiOS 13.0+A type that represents part of your app's user interface and provides
- PrViewModifieriOS 13.0+A modifier that you apply to a view or another view modifier, producing a
Type Aliases 2
- TyContentBuilderA custom parameter attribute that constructs views and other content types
- TyEmptyContentContent which contains nothing.