magnitudeSquared
TypeScriptget magnitudeSquared(): numberSwift declarationvar magnitudeSquared: Double { get }Returns the dot-product of this vector arithmetic instance with itself.
Explore SwiftUICore types and the APIs available through One's generated iOS bindings.
755 types
1,910 callable entries
648 skipped
75% entry coverage
Generated from iOS SDK 27.1. Availability is shown on each declaration; permissions and entitlements still apply.
AccessibilityActionCategory
struct · iOS 18.0+
AccessibilityActionKind
struct · iOS 13.0+
AccessibilityAdjustmentDirection
enum · iOS 13.0+
AccessibilityCustomContentKey
struct · iOS 15.0+
AccessibilityDirectTouchOptions
struct · iOS 17.0+
AccessibilityDirectTouchOptions.ArrayLiteralElement
typealias · iOS 17.0+
AccessibilityDirectTouchOptions.Element
typealias · iOS 17.0+
AccessibilityDirectTouchOptions.RawValue
typealias · iOS 17.0+
AccessibilityHeadingLevel
enum · iOS 15.0+
AccessibilityHeadingLevel.RawValue
typealias · iOS 15.0+
AccessibilityTechnologies
struct · iOS 15.0+
AccessibilityTechnologies.ArrayLiteralElement
typealias · iOS 15.0+
AccessibilityTechnologies.Element
typealias · iOS 15.0+
AccessibilityTextContentType
struct · iOS 15.0+
AccessibilityTraits
struct · iOS 13.0+
AccessibilityTraits.ArrayLiteralElement
typealias · iOS 13.0+
AccessibilityTraits.Element
typealias · iOS 13.0+
AccessibilityZoomGestureAction
struct · iOS 16.0+
AccessibilityZoomGestureAction.Direction
enum · iOS 16.0+
Alignment
struct · iOS 13.0+
AlignmentID
protocol · iOS 13.0+
Anchor
struct · iOS 13.0+
Anchor.Source
struct · iOS 13.0+
Angle
struct · iOS 13.0+
Angle.AnimatableData
typealias · iOS 13.0+
AngularGradient
struct · iOS 13.0+
AngularGradient.Body
typealias · iOS 13.0+
AngularGradient.Resolved
typealias · iOS 17.0+
Animatable
protocol · iOS 13.0+
AnimatablePair
struct · iOS 13.0+
AnimatableValues
struct · iOS 26.0+
Animation
struct · iOS 13.0+
AnimationCompletionCriteria
struct · iOS 17.0+
AnimationContext
struct · iOS 17.0+
AnimationState
struct · iOS 17.0+
AnimationStateKey
protocol · iOS 17.0+
AnyGesture
struct · iOS 13.0+
AnyGesture.Body
typealias · iOS 13.0+
AnyGradient
struct · iOS 16.0+
AnyGradient.Resolved
typealias · iOS 17.0+
AnyLayout
struct · iOS 16.0+
AnyLayout.AnimatableData
typealias · iOS 16.0+
AnyLayout.Cache
struct · iOS 16.0+
AnyShape
struct · iOS 16.0+
AnyShape.AnimatableData
typealias · iOS 16.0+
AnyShape.Body
typealias · iOS 16.0+
AnyShapeStyle
struct · iOS 15.0+
AnyShapeStyle.Resolved
typealias · iOS 17.0+
AnyTransition
struct · iOS 13.0+
AnyView
struct · iOS 13.0+
AnyView.Body
typealias · iOS 13.0+
ArrangementView
struct · iOS 27.1+
ArrangementView.Body
typealias · iOS 27.1+
ArrangementViewStyle
protocol · iOS 27.1+
ArrangementViewStyle.Configuration
typealias · iOS 27.1+
ArrangementViewStyleConfiguration
struct · iOS 27.1+
ArrangementViewStyleConfiguration.Primary
struct · iOS 27.1+
ArrangementViewStyleConfiguration.Primary.Body
typealias · iOS 27.1+
ArrangementViewStyleConfiguration.Secondary
struct · iOS 27.1+
ArrangementViewStyleConfiguration.Secondary.Body
typealias · iOS 27.1+
AsymmetricTransition
struct · iOS 17.0+
AsymmetricTransition.Body
typealias · iOS 17.0+
AttributedTextFormatting
enum · iOS 26.0+
AttributedTextFormatting.AnyDefinition
struct · iOS 26.0+
AttributedTextFormatting.AnyDefinition.Body
typealias · iOS 26.0+
AttributedTextFormatting.AnyDefinition.ValueConstraint
typealias · iOS 26.0+
AttributedTextFormatting.AttributeContainerProxy
struct · iOS 26.0+
AttributedTextFormatting.AttributeContainerProxy.Scoped
struct · iOS 26.0+
AttributedTextFormatting.DefinitionBuilder
struct · iOS 26.0+
AttributedTextFormatting.EmptyDefinition
struct · iOS 26.0+
AttributedTextFormatting.EmptyDefinition.Body
typealias · iOS 26.0+
AttributedTextFormatting.EmptyDefinition.ValueConstraint
typealias · iOS 26.0+
AttributedTextFormatting.TupleDefinition
struct · iOS 26.0+
AttributedTextFormatting.TupleDefinition.Body
typealias · iOS 26.0+
AttributedTextFormatting.TupleDefinition.ValueConstraint
typealias · iOS 26.0+
AttributedTextFormatting.ValueConstraint
struct · iOS 26.0+
AttributedTextFormatting.ValueConstraint.Attributes
typealias · iOS 26.0+
AttributedTextFormatting.ValueConstraint.Body
typealias · iOS 26.0+
AttributedTextFormatting.ValueConstraint.ValueConstraint
typealias · iOS 26.0+
AttributedTextFormattingDefinition
protocol · iOS 26.0+
AttributedTextFormattingDefinition.ValueConstraint
typealias · iOS 26.0+
AttributedTextValueConstraint
protocol · iOS 26.0+
AttributedTextValueConstraint.Attributes
typealias · iOS 26.0+
AttributeScopes.SwiftUIAttributes
struct · iOS 15.0+
AttributeScopes.SwiftUIAttributes.AdaptiveImageGlyphAttribute
enum · iOS 18.0+
AttributeScopes.SwiftUIAttributes.AdaptiveImageGlyphAttribute.Value
typealias · iOS 18.0+
AttributeScopes.SwiftUIAttributes.BackgroundColorAttribute
enum · iOS 15.0+
AttributeScopes.SwiftUIAttributes.BackgroundColorAttribute.Value
typealias · iOS 15.0+
AttributeScopes.SwiftUIAttributes.BaselineOffsetAttribute
enum · iOS 15.0+
AttributeScopes.SwiftUIAttributes.BaselineOffsetAttribute.Value
typealias · iOS 15.0+
AttributeScopes.SwiftUIAttributes.DecodingConfiguration
typealias · iOS 15.0+
AttributeScopes.SwiftUIAttributes.EncodingConfiguration
typealias · iOS 15.0+
AttributeScopes.SwiftUIAttributes.FontAttribute
enum · iOS 15.0+
AttributeScopes.SwiftUIAttributes.FontAttribute.Value
typealias · iOS 15.0+
AttributeScopes.SwiftUIAttributes.ForegroundColorAttribute
enum · iOS 15.0+
AttributeScopes.SwiftUIAttributes.ForegroundColorAttribute.Value
typealias · iOS 15.0+
AttributeScopes.SwiftUIAttributes.KerningAttribute
enum · iOS 15.0+
AttributeScopes.SwiftUIAttributes.KerningAttribute.Value
typealias · iOS 15.0+
AttributeScopes.SwiftUIAttributes.StrikethroughStyleAttribute
enum · iOS 15.0+
AttributeScopes.SwiftUIAttributes.StrikethroughStyleAttribute.Value
typealias · iOS 15.0+
AttributeScopes.SwiftUIAttributes.TrackingAttribute
enum · iOS 15.0+
AttributeScopes.SwiftUIAttributes.TrackingAttribute.Value
typealias · iOS 15.0+
AttributeScopes.SwiftUIAttributes.UnderlineStyleAttribute
enum · iOS 15.0+
AttributeScopes.SwiftUIAttributes.UnderlineStyleAttribute.Value
typealias · iOS 15.0+
AutomaticArrangementViewStyle
struct · iOS 27.1+
AutomaticArrangementViewStyle.Body
typealias · iOS 27.1+
AutomaticHoverEffect
struct · iOS 18.0+
AutomaticHoverEffect.Body
typealias · iOS 18.0+
AXChartDescriptorRepresentable
protocol · iOS 15.0+
Axis
enum · iOS 13.0+
Axis.AllCases
typealias · iOS 13.0+
Axis.RawValue
typealias · iOS 13.0+
Axis.Set
struct · iOS 13.0+
Axis.Set.ArrayLiteralElement
typealias · iOS 13.0+
Axis.Set.Element
typealias · iOS 13.0+
Axis.Set.RawValue
typealias · iOS 13.0+
BackgroundProminence
struct · iOS 17.0+
BackgroundStyle
struct · iOS 14.0+
BackgroundStyle.Resolved
typealias · iOS 17.0+
Bindable
struct · iOS 17.0+
Bindable.ID
typealias · iOS 17.0+
Binding
struct · iOS 13.0+
Binding.Element
typealias · iOS 15.0+
Binding.ID
typealias · iOS 15.0+
Binding.Index
typealias · iOS 15.0+
Binding.Indices
typealias · iOS 15.0+
Binding.Iterator
typealias · iOS 15.0+
Binding.SubSequence
typealias · iOS 15.0+
BlendMode
enum · iOS 13.0+
BlurReplaceTransition
struct · iOS 17.0+
BlurReplaceTransition.Body
typealias · iOS 17.0+
BlurReplaceTransition.Configuration
struct · iOS 17.0+
ButtonSizing
struct · iOS 26.0+
Canvas
struct · iOS 15.0+
Canvas.Body
typealias · iOS 15.0+
Capsule
struct · iOS 13.0+
Capsule.AnimatableData
typealias · iOS 13.0+
Capsule.Body
typealias · iOS 13.0+
Capsule.InsetShape
typealias · iOS 13.0+
CGFloat.AnimatableData
typealias · iOS 17.0+
CGPoint.AnimatableData
typealias · iOS 13.0+
CGRect.AnimatableData
typealias · iOS 13.0+
CGSize.AnimatableData
typealias · iOS 13.0+
Circle
struct · iOS 13.0+
Circle.AnimatableData
typealias · iOS 13.0+
Circle.Body
typealias · iOS 13.0+
Circle.InsetShape
typealias · iOS 13.0+
Color
struct · iOS 13.0+
Color.Body
typealias · iOS 13.0+
Color.Resolved
struct · iOS 17.0+
Color.Resolved.AnimatableData
typealias · iOS 17.0+
Color.Resolved.Resolved
typealias · iOS 17.0+
Color.ResolvedHDR
struct · iOS 26.0+
Color.ResolvedHDR.AnimatableData
typealias · iOS 26.0+
Color.ResolvedHDR.Resolved
typealias · iOS 26.0+
Color.RGBColorSpace
enum · iOS 13.0+
ColorMatrix
struct · iOS 15.0+
ColorRenderingMode
enum · iOS 13.0+
ColorScheme
enum · iOS 13.0+
ColorScheme.AllCases
typealias · iOS 13.0+
ColorSchemeContrast
enum · iOS 13.0+
ColorSchemeContrast.AllCases
typealias · iOS 13.0+
ConcentricRectangle
struct · iOS 26.0+
ConcentricRectangle.AnimatableData
struct · iOS 26.0+
ConcentricRectangle.Body
typealias · iOS 26.0+
ContainerRelativeShape
struct · iOS 14.0+
ContainerRelativeShape.AnimatableData
typealias · iOS 14.0+
ContainerRelativeShape.Body
typealias · iOS 14.0+
ContainerRelativeShape.InsetShape
typealias · iOS 14.0+
ContainerValueKey
protocol · iOS 18.0+
ContainerValues
struct · iOS 18.0+
ContentBuilder
typealias · iOS 13.0+
ContentMarginGuide
struct · iOS 27.1+
ContentMode
enum · iOS 13.0+
ContentMode.AllCases
typealias · iOS 13.0+
ContentShapeKinds
struct · iOS 15.0+
ContentShapeKinds.ArrayLiteralElement
typealias · iOS 15.0+
ContentShapeKinds.Element
typealias · iOS 15.0+
ContentShapeKinds.RawValue
typealias · iOS 15.0+
ContentSizeCategory
enum · iOS 13.0+ · Deprecated in iOS 100000.0
ContentSizeCategory.AllCases
typealias · iOS 13.0+ · Deprecated in iOS 100000.0
ContentTransition
struct · iOS 16.0+
ControlSize
enum · iOS 15.0+
ControlSize.AllCases
typealias · iOS 15.0+
CoordinateSpace
enum · iOS 13.0+
CoordinateSpaceProtocol
protocol · iOS 17.0+
CubicKeyframe
struct · iOS 17.0+
CubicKeyframe.Body
typealias · iOS 17.0+
CustomAnimation
protocol · iOS 17.0+
CustomHoverEffect
protocol · iOS 18.0+
CustomHoverEffect.Content
typealias · iOS 18.0+
DebugReplaceableView
struct · iOS 26.0+
DebugReplaceableView.Body
typealias · iOS 26.0+
DefaultGlassEffectShape
struct · iOS 26.0+
DefaultGlassEffectShape.AnimatableData
typealias · iOS 26.0+
DefaultGlassEffectShape.Body
typealias · iOS 26.0+
DeviceHinge
struct · iOS 27.1+
DeviceHinge.Status
struct · iOS 27.1+
DeviceHingeContext
struct · iOS 27.1+
DisabledTextSelectability
struct · iOS 15.0+
Double.AnimatableData
typealias · iOS 17.0+
DynamicProperty
protocol · iOS 13.0+
DynamicTypeSize
enum · iOS 15.0+
DynamicTypeSize.AllCases
typealias · iOS 15.0+
DynamicViewContent
protocol · iOS 13.0+
Edge
enum · iOS 13.0+
Edge.AllCases
typealias · iOS 13.0+
Edge.Corner
enum · iOS 26.0+
Edge.Corner.AllCases
typealias · iOS 26.0+
Edge.Corner.RawValue
typealias · iOS 26.0+
Edge.Corner.Set
struct · iOS 26.0+
Edge.Corner.Set.ArrayLiteralElement
typealias · iOS 26.0+
Edge.Corner.Set.Element
typealias · iOS 26.0+
Edge.Corner.Set.RawValue
typealias · iOS 26.0+
Edge.Corner.Style
struct · iOS 26.0+
Edge.Corner.Style.AnimatableData
struct · iOS 26.0+
Edge.Corner.Style.FloatLiteralType
typealias · iOS 26.0+
Edge.Corner.Style.IntegerLiteralType
typealias · iOS 26.0+
Edge.RawValue
typealias · iOS 13.0+
Edge.Set
struct · iOS 13.0+
Edge.Set.ArrayLiteralElement
typealias · iOS 13.0+
Edge.Set.Element
typealias · iOS 13.0+
Edge.Set.RawValue
typealias · iOS 13.0+
EdgeInsets
struct · iOS 13.0+
EdgeInsets.AnimatableData
typealias · iOS 13.0+
Ellipse
struct · iOS 13.0+
Ellipse.AnimatableData
typealias · iOS 13.0+
Ellipse.Body
typealias · iOS 13.0+
Ellipse.InsetShape
typealias · iOS 13.0+
EllipticalGradient
struct · iOS 15.0+
EllipticalGradient.Body
typealias · iOS 15.0+
EllipticalGradient.Resolved
typealias · iOS 17.0+
EmptyAnimatableData
struct · iOS 13.0+
EmptyContent
typealias · iOS 13.0+
EmptyHoverEffect
struct · iOS 18.0+
EmptyHoverEffect.Body
typealias · iOS 18.0+
EmptyModifier
struct · iOS 13.0+
EmptyModifier.Body
typealias · iOS 13.0+
EmptyView
struct · iOS 13.0+
EmptyView.Body
typealias · iOS 13.0+
EmptyVisualEffect
struct · iOS 17.0+
EmptyVisualEffect.AnimatableData
typealias · iOS 17.0+
EnabledTextSelectability
struct · iOS 15.0+
Environment
struct · iOS 13.0+
EnvironmentalModifier
protocol · iOS 13.0+
EnvironmentKey
protocol · iOS 13.0+
EnvironmentObject
struct · iOS 13.0+
EnvironmentObject.Wrapper
struct · iOS 13.0+
EnvironmentValues
struct · iOS 13.0+
EventModifiers
struct · iOS 13.0+
EventModifiers.ArrayLiteralElement
typealias · iOS 13.0+
EventModifiers.Element
typealias · iOS 13.0+
EventModifiers.RawValue
typealias · iOS 13.0+
EveryMinuteTimelineSchedule
struct · iOS 15.0+
EveryMinuteTimelineSchedule.Entries
struct · iOS 15.0+
EveryMinuteTimelineSchedule.Entries.Element
typealias · iOS 15.0+
EveryMinuteTimelineSchedule.Entries.Iterator
typealias · iOS 15.0+
ExclusiveGesture
struct · iOS 13.0+
ExclusiveGesture.Body
typealias · iOS 13.0+
ExclusiveGesture.Value
enum · iOS 13.0+
ExplicitTimelineSchedule
struct · iOS 15.0+
FillShapeStyle
struct · iOS 17.0+
FillShapeStyle.Resolved
typealias · iOS 17.0+
FillShapeView
struct · iOS 17.0+
FillShapeView.Body
typealias · iOS 17.0+
FillStyle
struct · iOS 13.0+
FixedTextVariant
struct · iOS 18.0+
Font
struct · iOS 13.0+
Font.Context
struct · iOS 15.0+
Font.Design
enum · iOS 13.0+
Font.Leading
enum · iOS 14.0+
Font.Resolved
struct · iOS 26.0+
Font.TextStyle
enum · iOS 13.0+
Font.TextStyle.AllCases
typealias · iOS 13.0+
Font.Weight
struct · iOS 13.0+
Font.Width
struct · iOS 16.0+
ForEach
struct · iOS 13.0+
ForEach.Body
typealias · iOS 13.0+
ForEachSectionCollection
struct · iOS 18.0+
ForEachSectionCollection.Element
typealias · iOS 18.0+
ForEachSectionCollection.Index
typealias · iOS 18.0+
ForEachSectionCollection.Indices
typealias · iOS 18.0+
ForEachSectionCollection.Iterator
typealias · iOS 18.0+
ForEachSectionCollection.SubSequence
typealias · iOS 18.0+
ForEachSubviewCollection
struct · iOS 18.0+
ForEachSubviewCollection.Element
typealias · iOS 18.0+
ForEachSubviewCollection.Index
typealias · iOS 18.0+
ForEachSubviewCollection.Indices
typealias · iOS 18.0+
ForEachSubviewCollection.Iterator
typealias · iOS 18.0+
ForEachSubviewCollection.SubSequence
typealias · iOS 18.0+
ForegroundStyle
struct · iOS 13.0+
ForegroundStyle.Resolved
typealias · iOS 17.0+
GeometryEffect
protocol · iOS 13.0+
GeometryProxy
struct · iOS 13.0+
GeometryReader
struct · iOS 13.0+
GeometryReader.Body
typealias · iOS 13.0+
Gesture
protocol · iOS 13.0+
GestureInputKinds
struct · iOS 27.0+
GestureInputKinds.ArrayLiteralElement
typealias · iOS 27.0+
GestureInputKinds.Element
typealias · iOS 27.0+
GestureInputKinds.RawValue
typealias · iOS 27.0+
GestureMask
struct · iOS 13.0+
GestureMask.ArrayLiteralElement
typealias · iOS 13.0+
GestureMask.Element
typealias · iOS 13.0+
GestureMask.RawValue
typealias · iOS 13.0+
Glass
struct · iOS 26.0+
GlassEffectContainer
struct · iOS 26.0+
GlassEffectContainer.Body
typealias · iOS 26.0+
GlassEffectTransition
struct · iOS 26.0+
GlobalCoordinateSpace
struct · iOS 17.0+
Gradient
struct · iOS 13.0+
Gradient.ColorSpace
struct · iOS 16.0+
Gradient.Resolved
typealias · iOS 17.0+
Gradient.Stop
struct · iOS 13.0+
GraphicsContext
struct · iOS 15.0+
GraphicsContext.BlendMode
struct · iOS 15.0+
GraphicsContext.BlendMode.RawValue
typealias · iOS 15.0+
GraphicsContext.BlurOptions
struct · iOS 15.0+
GraphicsContext.BlurOptions.ArrayLiteralElement
typealias · iOS 15.0+
GraphicsContext.BlurOptions.Element
typealias · iOS 15.0+
GraphicsContext.BlurOptions.RawValue
typealias · iOS 15.0+
GraphicsContext.ClipOptions
struct · iOS 15.0+
GraphicsContext.ClipOptions.ArrayLiteralElement
typealias · iOS 15.0+
GraphicsContext.ClipOptions.Element
typealias · iOS 15.0+
GraphicsContext.ClipOptions.RawValue
typealias · iOS 15.0+
GraphicsContext.Filter
struct · iOS 15.0+
GraphicsContext.FilterOptions
struct · iOS 15.0+
GraphicsContext.FilterOptions.ArrayLiteralElement
typealias · iOS 15.0+
GraphicsContext.FilterOptions.Element
typealias · iOS 15.0+
GraphicsContext.FilterOptions.RawValue
typealias · iOS 15.0+
GraphicsContext.GradientOptions
struct · iOS 15.0+
GraphicsContext.GradientOptions.ArrayLiteralElement
typealias · iOS 15.0+
GraphicsContext.GradientOptions.Element
typealias · iOS 15.0+
GraphicsContext.GradientOptions.RawValue
typealias · iOS 15.0+
GraphicsContext.ResolvedImage
struct · iOS 15.0+
GraphicsContext.ResolvedSymbol
struct · iOS 15.0+
GraphicsContext.ResolvedText
struct · iOS 15.0+
GraphicsContext.Shading
struct · iOS 15.0+
GraphicsContext.ShadowOptions
struct · iOS 15.0+
GraphicsContext.ShadowOptions.ArrayLiteralElement
typealias · iOS 15.0+
GraphicsContext.ShadowOptions.Element
typealias · iOS 15.0+
GraphicsContext.ShadowOptions.RawValue
typealias · iOS 15.0+
Group
struct · iOS 13.0+
Group.Body
typealias · iOS 13.0+
GroupElementsOfContent
struct · iOS 18.0+
GroupElementsOfContent.Body
typealias · iOS 18.0+
GroupSectionsOfContent
struct · iOS 18.0+
GroupSectionsOfContent.Body
typealias · iOS 18.0+
HierarchicalShapeStyle
struct · iOS 15.0+
HierarchicalShapeStyle.Resolved
typealias · iOS 17.0+
HierarchicalShapeStyleModifier
struct · iOS 17.0+
HierarchicalShapeStyleModifier.Resolved
typealias · iOS 17.0+
HighlightHoverEffect
struct · iOS 18.0+
HighlightHoverEffect.Body
typealias · iOS 18.0+
HorizontalAlignment
struct · iOS 13.0+
HorizontalDirection
enum · iOS 18.0+
HorizontalDirection.AllCases
typealias · iOS 18.0+
HorizontalDirection.RawValue
typealias · iOS 18.0+
HorizontalDirection.Set
struct · iOS 18.0+
HorizontalDirection.Set.ArrayLiteralElement
typealias · iOS 18.0+
HorizontalDirection.Set.Element
typealias · iOS 18.0+
HorizontalDirection.Set.RawValue
typealias · iOS 18.0+
HorizontalEdge
enum · iOS 15.0+
HorizontalEdge.AllCases
typealias · iOS 15.0+
HorizontalEdge.RawValue
typealias · iOS 15.0+
HorizontalEdge.Set
struct · iOS 15.0+
HorizontalEdge.Set.ArrayLiteralElement
typealias · iOS 15.0+
HorizontalEdge.Set.Element
typealias · iOS 15.0+
HorizontalEdge.Set.RawValue
typealias · iOS 15.0+
HoverEffect
struct · iOS 13.4+
HoverEffect.Body
typealias · iOS 18.0+
HStack
struct · iOS 13.0+
HStack.Body
typealias · iOS 13.0+
HStackLayout
struct · iOS 16.0+
HStackLayout.AnimatableData
typealias · iOS 16.0+
HStackLayout.Cache
typealias · iOS 16.0+
IdentityTransition
struct · iOS 17.0+
IdentityTransition.Body
typealias · iOS 17.0+
Image
struct · iOS 13.0+
Image.Body
typealias · iOS 13.0+
Image.DynamicRange
struct · iOS 17.0+
Image.Interpolation
enum · iOS 13.0+
Image.Orientation
enum · iOS 13.0+
Image.Orientation.AllCases
typealias · iOS 13.0+
Image.Orientation.RawValue
typealias · iOS 13.0+
Image.ResizingMode
enum · iOS 13.0+
Image.Scale
enum · iOS 13.0+
Image.TemplateRenderingMode
enum · iOS 13.0+
ImagePaint
struct · iOS 13.0+
ImagePaint.Resolved
typealias · iOS 17.0+
ImageRenderer
class · iOS 16.0+
ImageRenderer.ObjectWillChangePublisher
typealias · iOS 16.0+
InsettableShape
protocol · iOS 13.0+
KeyframeAnimator
struct · iOS 17.0+
KeyframeAnimator.Body
typealias · iOS 17.0+
Keyframes
protocol · iOS 17.0+
KeyframesBuilder
struct · iOS 17.0+
KeyframeTimeline
struct · iOS 17.0+
KeyframeTrack
struct · iOS 17.0+
KeyframeTrack.Body
typealias · iOS 17.0+
KeyframeTrackContent
protocol · iOS 17.0+
KeyframeTrackContentBuilder
struct · iOS 17.0+
KeyframeTrackContentBuilder.Conditional
struct · iOS 17.0+
KeyframeTrackContentBuilder.Conditional.Body
typealias · iOS 17.0+
KeyframeTrackContentBuilder.Conditional.Value
typealias · iOS 17.0+
Layout
protocol · iOS 16.0+
Layout.Subviews
typealias · iOS 16.0+
LayoutDirection
enum · iOS 13.0+
LayoutDirection.AllCases
typealias · iOS 13.0+
LayoutDirectionBehavior
enum · iOS 17.0+
LayoutProperties
struct · iOS 16.0+
LayoutSubview
struct · iOS 16.0+
LayoutSubviews
struct · iOS 16.0+
LayoutSubviews.Element
typealias · iOS 16.0+
LayoutSubviews.Index
typealias · iOS 16.0+
LayoutSubviews.Indices
typealias · iOS 16.0+
LayoutSubviews.Iterator
typealias · iOS 16.0+
LayoutSubviews.SubSequence
typealias · iOS 16.0+
LayoutValueKey
protocol · iOS 16.0+
LazyHStack
struct · iOS 14.0+
LazyHStack.Body
typealias · iOS 14.0+
LazyVStack
struct · iOS 14.0+
LazyVStack.Body
typealias · iOS 14.0+
LegibilityWeight
enum · iOS 13.0+
LiftHoverEffect
struct · iOS 18.0+
LiftHoverEffect.Body
typealias · iOS 18.0+
LinearGradient
struct · iOS 13.0+
LinearGradient.Body
typealias · iOS 13.0+
LinearGradient.Resolved
typealias · iOS 17.0+
LinearKeyframe
struct · iOS 17.0+
LinearKeyframe.Body
typealias · iOS 17.0+
LocalCoordinateSpace
struct · iOS 17.0+
LocalizedStringKey
struct · iOS 13.0+
LocalizedStringKey.ExtendedGraphemeClusterLiteralType
typealias · iOS 13.0+
LocalizedStringKey.StringInterpolation
struct · iOS 13.0+
LocalizedStringKey.StringInterpolation.StringLiteralType
typealias · iOS 13.0+
LocalizedStringKey.StringLiteralType
typealias · iOS 13.0+
LocalizedStringKey.UnicodeScalarLiteralType
typealias · iOS 13.0+
MatchedGeometryProperties
struct · iOS 14.0+
MatchedGeometryProperties.ArrayLiteralElement
typealias · iOS 14.0+
MatchedGeometryProperties.Element
typealias · iOS 14.0+
MatchedGeometryProperties.RawValue
typealias · iOS 14.0+
Material
struct · iOS 15.0+
Material.Resolved
typealias · iOS 17.0+
MaterialActiveAppearance
struct · iOS 18.0+
MeshGradient
struct · iOS 18.0+
MeshGradient.BezierPoint
struct · iOS 18.0+
MeshGradient.Body
typealias · iOS 18.0+
MeshGradient.Colors
enum · iOS 18.0+
MeshGradient.Locations
enum · iOS 18.0+
MeshGradient.Resolved
typealias · iOS 18.0+
ModifiedContent
struct · iOS 13.0+
ModifiedContent.AnimatableData
typealias · iOS 26.0+
ModifiedContent.Body
typealias · iOS 13.0+
ModifiedContent.Data
typealias · iOS 13.0+
MoveKeyframe
struct · iOS 17.0+
MoveKeyframe.Body
typealias · iOS 17.0+
MoveTransition
struct · iOS 17.0+
MoveTransition.Body
typealias · iOS 17.0+
NamedCoordinateSpace
struct · iOS 17.0+
Namespace
struct · iOS 14.0+
Namespace.ID
struct · iOS 14.0+
Never.Body
typealias · iOS 18.0+
Never.Resolved
typealias · iOS 17.0+
Never.Value
typealias · iOS 13.0+
ObservedObject
struct · iOS 13.0+
ObservedObject.Wrapper
struct · iOS 13.0+
OffsetShape
struct · iOS 13.0+
OffsetShape.AnimatableData
typealias · iOS 13.0+
OffsetShape.Body
typealias · iOS 13.0+
OffsetShape.InsetShape
typealias · iOS 13.0+
OffsetTransition
struct · iOS 17.0+
OffsetTransition.Body
typealias · iOS 17.0+
OpacityTransition
struct · iOS 17.0+
OpacityTransition.Body
typealias · iOS 17.0+
OpenURLAction
struct · iOS 14.0+
OpenURLAction.Result
struct · iOS 15.0+
Optional.Body
typealias · iOS 13.0+
Optional.Scope
typealias · iOS 26.0+
Optional.Value
typealias · iOS 13.0+
Optional.ValueConstraint
typealias · iOS 26.0+
OverlayArrangementViewStyle
struct · iOS 27.1+
OverlayArrangementViewStyle.Body
typealias · iOS 27.1+
Path
struct · iOS 13.0+
Path.AnimatableData
typealias · iOS 13.0+
Path.Body
typealias · iOS 13.0+
Path.Element
enum · iOS 13.0+
PeriodicTimelineSchedule
struct · iOS 15.0+
PeriodicTimelineSchedule.Entries
struct · iOS 15.0+
PeriodicTimelineSchedule.Entries.Element
typealias · iOS 15.0+
PeriodicTimelineSchedule.Entries.Iterator
typealias · iOS 15.0+
PhaseAnimator
struct · iOS 17.0+
PhaseAnimator.Body
typealias · iOS 17.0+
PinnedScrollableViews
struct · iOS 14.0+
PinnedScrollableViews.ArrayLiteralElement
typealias · iOS 14.0+
PinnedScrollableViews.Element
typealias · iOS 14.0+
PinnedScrollableViews.RawValue
typealias · iOS 14.0+
PlaceholderContentView
struct · iOS 17.0+
PlaceholderContentView.Body
typealias · iOS 17.0+
PreferenceKey
protocol · iOS 13.0+
PreferredColorSchemeKey
struct · iOS 13.0+
PreferredColorSchemeKey.Value
typealias · iOS 13.0+
ProjectionTransform
struct · iOS 13.0+
Prominence
enum · iOS 15.0+
ProposedViewSize
struct · iOS 16.0+
PushTransition
struct · iOS 17.0+
PushTransition.Body
typealias · iOS 17.0+
RadialGradient
struct · iOS 13.0+
RadialGradient.Body
typealias · iOS 13.0+
RadialGradient.Resolved
typealias · iOS 17.0+
Rectangle
struct · iOS 13.0+
Rectangle.AnimatableData
typealias · iOS 13.0+
Rectangle.Body
typealias · iOS 13.0+
Rectangle.InsetShape
typealias · iOS 13.0+
RectangleCornerInsets
struct · iOS 26.0+
RectangleCornerRadii
struct · iOS 16.0+
RectangleCornerRadii.AnimatableData
typealias · iOS 16.0+
RedactionReasons
struct · iOS 14.0+
RedactionReasons.ArrayLiteralElement
typealias · iOS 14.0+
RedactionReasons.Element
typealias · iOS 14.0+
RedactionReasons.RawValue
typealias · iOS 14.0+
ReservedRegion
struct · iOS 27.1+
ReservedRegion.ID
struct · iOS 27.1+
ReservedRegion.Kind
struct · iOS 27.1+
ReservedRegion.QueryOptions
struct · iOS 27.1+
ReservedRegion.QueryOptions.ArrayLiteralElement
typealias · iOS 27.1+
ReservedRegion.QueryOptions.Element
typealias · iOS 27.1+
ReservedRegion.QueryOptions.RawValue
typealias · iOS 27.1+
RotatedShape
struct · iOS 13.0+
RotatedShape.AnimatableData
typealias · iOS 13.0+
RotatedShape.Body
typealias · iOS 13.0+
RotatedShape.InsetShape
typealias · iOS 13.0+
RoundedCornerStyle
enum · iOS 13.0+
RoundedRectangle
struct · iOS 13.0+
RoundedRectangle.AnimatableData
typealias · iOS 13.0+
RoundedRectangle.Body
typealias · iOS 13.0+
RoundedRectangle.InsetShape
typealias · iOS 13.0+
RoundedRectangularShape
protocol · iOS 26.0+
RoundedRectangularShape.Corners
typealias · iOS 26.0+
RoundedRectangularShapeCorners
struct · iOS 26.0+
RoundedRectangularShapeCorners.AnimatableData
struct · iOS 26.0+
SafeAreaRegions
struct · iOS 14.0+
SafeAreaRegions.ArrayLiteralElement
typealias · iOS 14.0+
SafeAreaRegions.Element
typealias · iOS 14.0+
SafeAreaRegions.RawValue
typealias · iOS 14.0+
ScaledMetric
struct · iOS 14.0+
ScaledShape
struct · iOS 13.0+
ScaledShape.AnimatableData
typealias · iOS 13.0+
ScaledShape.Body
typealias · iOS 13.0+
ScaleTransition
struct · iOS 17.0+
ScaleTransition.Body
typealias · iOS 17.0+
ScrollContentOffsetAdjustmentBehavior
struct · iOS 18.0+
ScrollGeometry
struct · iOS 18.0+
ScrollPhase
enum · iOS 18.0+
ScrollPosition
struct · iOS 18.0+
ScrollTarget
struct · iOS 17.0+
SectionCollection
struct · iOS 18.0+
SectionCollection.Element
typealias · iOS 18.0+
SectionCollection.Index
typealias · iOS 18.0+
SectionCollection.Indices
typealias · iOS 18.0+
SectionCollection.Iterator
typealias · iOS 18.0+
SectionCollection.SubSequence
typealias · iOS 18.0+
SectionConfiguration
struct · iOS 18.0+
SectionConfiguration.ID
struct · iOS 18.0+
SeparatorShapeStyle
struct · iOS 17.0+
SeparatorShapeStyle.Resolved
typealias · iOS 17.0+
Shader
struct · iOS 17.0+
Shader.Argument
struct · iOS 17.0+
Shader.Resolved
typealias · iOS 17.0+
Shader.UsageType
struct · iOS 18.0+
ShaderFunction
struct · iOS 17.0+
ShaderLibrary
struct · iOS 17.0+
ShadowStyle
struct · iOS 16.0+
Shape
protocol · iOS 13.0+
ShapeRole
enum · iOS 15.0+
ShapeStyle
protocol · iOS 13.0+
ShapeView
protocol · iOS 17.0+
SimultaneousGesture
struct · iOS 13.0+
SimultaneousGesture.Body
typealias · iOS 13.0+
SimultaneousGesture.Value
struct · iOS 13.0+
SizeDependentTextVariant
struct · iOS 18.0+
SlideTransition
struct · iOS 17.0+
SlideTransition.Body
typealias · iOS 17.0+
Spacer
struct · iOS 13.0+
Spacer.Body
typealias · iOS 13.0+
SplitArrangementViewStyle
struct · iOS 27.1+
SplitArrangementViewStyle.Body
typealias · iOS 27.1+
Spring
struct · iOS 17.0+
SpringKeyframe
struct · iOS 17.0+
SpringKeyframe.Body
typealias · iOS 17.0+
State
struct · iOS 13.0+
StateObject
struct · iOS 14.0+
StrokeBorderShapeView
struct · iOS 17.0+
StrokeBorderShapeView.Body
typealias · iOS 17.0+
StrokeShapeView
struct · iOS 17.0+
StrokeShapeView.Body
typealias · iOS 17.0+
StrokeStyle
struct · iOS 13.0+
StrokeStyle.AnimatableData
typealias · iOS 13.0+
Subview
struct · iOS 18.0+
Subview.Body
typealias · iOS 18.0+
Subview.ID
struct · iOS 18.0+
SubviewsCollection
struct · iOS 18.0+
SubviewsCollection.Body
typealias · iOS 18.0+
SubviewsCollection.Element
typealias · iOS 18.0+
SubviewsCollection.Index
typealias · iOS 18.0+
SubviewsCollection.Indices
typealias · iOS 18.0+
SubviewsCollection.Iterator
typealias · iOS 18.0+
SubviewsCollection.SubSequence
typealias · iOS 18.0+
SubviewsCollectionSlice
struct · iOS 18.0+
SubviewsCollectionSlice.Body
typealias · iOS 18.0+
SubviewsCollectionSlice.Element
typealias · iOS 18.0+
SubviewsCollectionSlice.Index
typealias · iOS 18.0+
SubviewsCollectionSlice.Indices
typealias · iOS 18.0+
SubviewsCollectionSlice.Iterator
typealias · iOS 18.0+
SubviewsCollectionSlice.SubSequence
typealias · iOS 18.0+
SymbolColorRenderingMode
struct · iOS 26.0+
SymbolEffectTransition
struct · iOS 17.0+
SymbolEffectTransition.Body
typealias · iOS 17.0+
SymbolRenderingMode
struct · iOS 15.0+
SymbolVariableValueMode
struct · iOS 26.0+
SymbolVariants
struct · iOS 15.0+
SystemFormatStyle
enum · iOS 18.0+
SystemFormatStyle.DateOffset
struct · iOS 18.0+
SystemFormatStyle.DateOffset.FormatInput
typealias · iOS 18.0+
SystemFormatStyle.DateOffset.FormatOutput
typealias · iOS 18.0+
SystemFormatStyle.DateReference
struct · iOS 18.0+
SystemFormatStyle.DateReference.FormatInput
typealias · iOS 18.0+
SystemFormatStyle.DateReference.FormatOutput
typealias · iOS 18.0+
SystemFormatStyle.Stopwatch
struct · iOS 18.0+
SystemFormatStyle.Stopwatch.FormatInput
typealias · iOS 18.0+
SystemFormatStyle.Stopwatch.FormatOutput
typealias · iOS 18.0+
SystemFormatStyle.Timer
struct · iOS 18.0+
SystemFormatStyle.Timer.FormatInput
typealias · iOS 18.0+
SystemFormatStyle.Timer.FormatOutput
typealias · iOS 18.0+
TapGesture
struct · iOS 13.0+
TapGesture.Body
typealias · iOS 13.0+
TapGesture.Value
typealias · iOS 13.0+
Text
struct · iOS 13.0+
Text.AlignmentStrategy
struct · iOS 26.0+
Text.Body
typealias · iOS 13.0+
Text.Case
enum · iOS 14.0+
Text.DateStyle
struct · iOS 14.0+
Text.Layout
struct · iOS 17.0+
Text.Layout.CharacterIndex
struct · iOS 17.0+
Text.Layout.CharacterIndex.Stride
typealias · iOS 17.0+
Text.Layout.DrawingOptions
struct · iOS 17.0+
Text.Layout.DrawingOptions.ArrayLiteralElement
typealias · iOS 17.0+
Text.Layout.DrawingOptions.Element
typealias · iOS 17.0+
Text.Layout.DrawingOptions.RawValue
typealias · iOS 17.0+
Text.Layout.Element
typealias · iOS 17.0+
Text.Layout.Index
typealias · iOS 17.0+
Text.Layout.Indices
typealias · iOS 17.0+
Text.Layout.Iterator
typealias · iOS 17.0+
Text.Layout.Line
struct · iOS 17.0+
Text.Layout.Line.Element
typealias · iOS 17.0+
Text.Layout.Line.Index
typealias · iOS 17.0+
Text.Layout.Line.Indices
typealias · iOS 17.0+
Text.Layout.Line.Iterator
typealias · iOS 17.0+
Text.Layout.Line.SubSequence
typealias · iOS 17.0+
Text.Layout.Run
struct · iOS 17.0+
Text.Layout.Run.Element
typealias · iOS 17.0+
Text.Layout.Run.Index
typealias · iOS 17.0+
Text.Layout.Run.Indices
typealias · iOS 17.0+
Text.Layout.Run.Iterator
typealias · iOS 17.0+
Text.Layout.Run.SubSequence
typealias · iOS 17.0+
Text.Layout.RunSlice
struct · iOS 17.0+
Text.Layout.RunSlice.Element
typealias · iOS 17.0+
Text.Layout.RunSlice.Index
typealias · iOS 17.0+
Text.Layout.RunSlice.Indices
typealias · iOS 17.0+
Text.Layout.RunSlice.Iterator
typealias · iOS 17.0+
Text.Layout.RunSlice.SubSequence
typealias · iOS 17.0+
Text.Layout.SubSequence
typealias · iOS 17.0+
Text.Layout.TypographicBounds
struct · iOS 17.0+
Text.LayoutKey
struct · iOS 17.0+
Text.LayoutKey.AnchoredLayout
struct · iOS 17.0+
Text.LayoutKey.Value
typealias · iOS 17.0+
Text.LineStyle
struct · iOS 15.0+
Text.LineStyle.Pattern
struct · iOS 15.0+
Text.Scale
struct · iOS 17.0+
Text.TruncationMode
enum · iOS 13.0+
Text.WritingDirectionStrategy
struct · iOS 26.0+
TextAlignment
enum · iOS 13.0+
TextAlignment.AllCases
typealias · iOS 13.0+
TextAttribute
protocol · iOS 17.0+
TextInputBorderShape
struct · iOS 27.0+
TextInputBorderShape.AnimatableData
typealias · iOS 27.0+
TextInputBorderShape.Body
typealias · iOS 27.0+
TextInputBorderShape.InsetShape
typealias · iOS 27.0+
TextProxy
struct · iOS 18.0+
TextRenderer
protocol · iOS 17.0+
TextSelectability
protocol · iOS 15.0+
TextVariantPreference
protocol · iOS 18.0+
TimeDataSource
struct · iOS 18.0+
TimelineSchedule
protocol · iOS 15.0+
TimelineSchedule.Mode
typealias · iOS 15.0+
TimelineScheduleMode
enum · iOS 15.0+
TintShapeStyle
struct · iOS 15.0+
TintShapeStyle.Resolved
typealias · iOS 17.0+
Transaction
struct · iOS 13.0+
TransactionKey
protocol · iOS 17.0+
TransformedShape
struct · iOS 13.0+
TransformedShape.AnimatableData
typealias · iOS 13.0+
TransformedShape.Body
typealias · iOS 13.0+
Transition
protocol · iOS 17.0+
Transition.Content
typealias · iOS 17.0+
TransitionPhase
enum · iOS 17.0+
TransitionProperties
struct · iOS 17.0+
TupleContent
struct · iOS 26.0+
TupleContent.Body
typealias · iOS 26.0+
TupleView
struct · iOS 13.0+
TupleView.Body
typealias · iOS 13.0+
TypesettingLanguage
struct · iOS 17.0+
UnevenRoundedRectangle
struct · iOS 16.0+
UnevenRoundedRectangle.AnimatableData
typealias · iOS 16.0+
UnevenRoundedRectangle.Body
typealias · iOS 16.0+
UnevenRoundedRectangle.InsetShape
typealias · iOS 16.0+
UnitCurve
struct · iOS 17.0+
UnitPoint
struct · iOS 13.0+
UnitPoint.AnimatableData
typealias · iOS 13.0+
UserInterfaceSizeClass
enum · iOS 13.0+
VectorArithmetic
protocol · iOS 13.0+
VerticalAlignment
struct · iOS 13.0+
VerticalDirection
enum · iOS 18.0+
VerticalDirection.AllCases
typealias · iOS 18.0+
VerticalDirection.RawValue
typealias · iOS 18.0+
VerticalDirection.Set
struct · iOS 18.0+
VerticalDirection.Set.ArrayLiteralElement
typealias · iOS 18.0+
VerticalDirection.Set.Element
typealias · iOS 18.0+
VerticalDirection.Set.RawValue
typealias · iOS 18.0+
VerticalEdge
enum · iOS 15.0+
VerticalEdge.AllCases
typealias · iOS 15.0+
VerticalEdge.RawValue
typealias · iOS 15.0+
VerticalEdge.Set
struct · iOS 15.0+
VerticalEdge.Set.ArrayLiteralElement
typealias · iOS 15.0+
VerticalEdge.Set.Element
typealias · iOS 15.0+
VerticalEdge.Set.RawValue
typealias · iOS 15.0+
View
protocol · iOS 13.0+
ViewBuilder
struct · iOS 13.0+
ViewDimensions
struct · iOS 13.0+
ViewModifier
protocol · iOS 13.0+
ViewModifier.Content
typealias · iOS 13.0+
ViewSpacing
struct · iOS 16.0+
Visibility
enum · iOS 15.0+
Visibility.AllCases
typealias · iOS 15.0+
VisualEffect
protocol · iOS 17.0+
VStack
struct · iOS 13.0+
VStack.Body
typealias · iOS 13.0+
VStackLayout
struct · iOS 16.0+
VStackLayout.AnimatableData
typealias · iOS 16.0+
VStackLayout.Cache
typealias · iOS 16.0+
ZStack
struct · iOS 13.0+
ZStack.Body
typealias · iOS 13.0+
ZStackLayout
struct · iOS 16.0+
ZStackLayout.AnimatableData
typealias · iOS 16.0+
ZStackLayout.Cache
typealias · iOS 16.0+
get magnitudeSquared(): numberSwift declarationvar magnitudeSquared: Double { get }Returns the dot-product of this vector arithmetic instance with itself.
scale(rhs: number): voidSwift declarationmutating func scale(by rhs: Double)Multiplies each component of this value by the given value.
get wrappedValue(): unknownSwift declarationvar wrappedValue: Value { get }The current value of the environment property. The wrapped value property provides primary access to the value's data. However, you don't access `wrappedValue` directly. Instead, you read the property variable created with the ``Environment`` property wrapper: @Environment(\.colorScheme) var colorScheme: ColorScheme var body: some View { if colorScheme == .dark { DarkContent() } else { LightContent() } }
static init(keyPath: SDKHandle): Environment<unknown>Swift declarationinit(_ keyPath: KeyPath<EnvironmentValues, Value>)Creates an environment property to read the specified key path. Don’t call this initializer directly. Instead, declare a property with the ``Environment`` property wrapper, and provide the key path of the environment value that the property should reflect: struct MyView: View { @Environment(\.colorScheme) var colorScheme: ColorScheme // ... } SwiftUI automatically updates any parts of `MyView` that depend on the property when the associated environment value changes. You can't modify the environment value using a property like this. Instead, use the ``View/environment(_:_:)`` view modifier on a view to set a value for a view hierarchy. - Parameter keyPath: A key path to a specific resulting value.
get animatableData(): AnimatablePair<SDKHandle, AnimatablePair<number, number>>Swift declarationnonisolated var animatableData: OffsetShape<Content>.AnimatableData { get set }The data to animate.
set animatableData(value: AnimatablePair<SDKHandle, AnimatablePair<number, number>>)Swift declarationnonisolated var animatableData: OffsetShape<Content>.AnimatableData { get set }The data to animate.
get layoutDirectionBehavior(): LayoutDirectionBehaviorSwift declarationnonisolated var layoutDirectionBehavior: LayoutDirectionBehavior { get }Returns the behavior this shape should use for different layout directions. If the layoutDirectionBehavior for a Shape is one that mirrors, the shape's path will be mirrored horizontally when in the specified layout direction. When mirrored, the individual points of the path will be transformed. Defaults to `.mirrors` when deploying on iOS 17.0, macOS 14.0, tvOS 17.0, watchOS 10.0 and later, and to `.fixed` if not. To mirror a path when deploying to earlier releases, either use `View.flipsForRightToLeftLayoutDirection` for a filled or stroked shape or conditionally mirror the points in the path of the shape.
path(rect: { x: number; y: number; width: number; height: number }): PathSwift declarationnonisolated func path(in rect: CGRect) -> PathDescribes this shape as a path within a rectangular frame of reference. - Parameter rect: The frame of reference for describing this shape. - Returns: A path that describes this shape.
static get role(): ShapeRoleSwift declarationnonisolated static var role: ShapeRole { get }An indication of how to style a shape. SwiftUI looks at a shape's role when deciding how to apply a ``ShapeStyle`` at render time. The ``Shape`` protocol provides a default implementation with a value of ``ShapeRole/fill``. If you create a composite shape, you can provide an override of this property to return another value, if appropriate.
static init(shape: SDKHandle, offset: { width: number; height: number }): OffsetShape<SDKHandle>Swift declarationinit(shape: Content, offset: CGSize)get shape(): SDKHandleSwift declarationvar shape: Contentset shape(value: SDKHandle)Swift declarationvar shape: Contentget offset(): { width: number; height: number }Swift declarationvar offset: CGSizeset offset(value: { width: number; height: number })Swift declarationvar offset: CGSizeget animatableData(): AnimatablePair<SDKHandle, AnimatablePair<AnimatablePair<number, number>, AnimatablePair<number, number>>>Swift declarationnonisolated var animatableData: ScaledShape<Content>.AnimatableData { get set }The data to animate.
set animatableData(value: AnimatablePair<SDKHandle, AnimatablePair<AnimatablePair<number, number>, AnimatablePair<number, number>>>)Swift declarationnonisolated var animatableData: ScaledShape<Content>.AnimatableData { get set }The data to animate.
get layoutDirectionBehavior(): LayoutDirectionBehaviorSwift declarationnonisolated var layoutDirectionBehavior: LayoutDirectionBehavior { get }Returns the behavior this shape should use for different layout directions. If the layoutDirectionBehavior for a Shape is one that mirrors, the shape's path will be mirrored horizontally when in the specified layout direction. When mirrored, the individual points of the path will be transformed. Defaults to `.mirrors` when deploying on iOS 17.0, macOS 14.0, tvOS 17.0, watchOS 10.0 and later, and to `.fixed` if not. To mirror a path when deploying to earlier releases, either use `View.flipsForRightToLeftLayoutDirection` for a filled or stroked shape or conditionally mirror the points in the path of the shape.
path(rect: { x: number; y: number; width: number; height: number }): PathSwift declarationnonisolated func path(in rect: CGRect) -> PathDescribes this shape as a path within a rectangular frame of reference. - Parameter rect: The frame of reference for describing this shape. - Returns: A path that describes this shape.
static get role(): ShapeRoleSwift declarationnonisolated static var role: ShapeRole { get }An indication of how to style a shape. SwiftUI looks at a shape's role when deciding how to apply a ``ShapeStyle`` at render time. The ``Shape`` protocol provides a default implementation with a value of ``ShapeRole/fill``. If you create a composite shape, you can provide an override of this property to return another value, if appropriate.
get scale(): { width: number; height: number }Swift declarationvar scale: CGSizeset scale(value: { width: number; height: number })Swift declarationvar scale: CGSizestatic init(shape: SDKHandle, scale: { width: number; height: number }, anchor?: UnitPoint): ScaledShape<SDKHandle>Swift declarationinit(shape: Content, scale: CGSize, anchor: UnitPoint = .center)get shape(): SDKHandleSwift declarationvar shape: Contentset shape(value: SDKHandle)Swift declarationvar shape: Contentget anchor(): UnitPointSwift declarationvar anchor: UnitPointset anchor(value: UnitPoint)Swift declarationvar anchor: UnitPointstatic init(to: number): MoveKeyframe<number>Swift declarationinit(_ to: Value)Creates a new keyframe using the given value. - Parameters: - to: The value of the keyframe.
get animatableData(): AnimatablePair<SDKHandle, AnimatablePair<number, AnimatablePair<number, number>>>Swift declarationnonisolated var animatableData: RotatedShape<Content>.AnimatableData { get set }The data to animate.
set animatableData(value: AnimatablePair<SDKHandle, AnimatablePair<number, AnimatablePair<number, number>>>)Swift declarationnonisolated var animatableData: RotatedShape<Content>.AnimatableData { get set }The data to animate.
get layoutDirectionBehavior(): LayoutDirectionBehaviorSwift declarationnonisolated var layoutDirectionBehavior: LayoutDirectionBehavior { get }Returns the behavior this shape should use for different layout directions. If the layoutDirectionBehavior for a Shape is one that mirrors, the shape's path will be mirrored horizontally when in the specified layout direction. When mirrored, the individual points of the path will be transformed. Defaults to `.mirrors` when deploying on iOS 17.0, macOS 14.0, tvOS 17.0, watchOS 10.0 and later, and to `.fixed` if not. To mirror a path when deploying to earlier releases, either use `View.flipsForRightToLeftLayoutDirection` for a filled or stroked shape or conditionally mirror the points in the path of the shape.
path(rect: { x: number; y: number; width: number; height: number }): PathSwift declarationnonisolated func path(in rect: CGRect) -> PathDescribes this shape as a path within a rectangular frame of reference. - Parameter rect: The frame of reference for describing this shape. - Returns: A path that describes this shape.
static get role(): ShapeRoleSwift declarationnonisolated static var role: ShapeRole { get }An indication of how to style a shape. SwiftUI looks at a shape's role when deciding how to apply a ``ShapeStyle`` at render time. The ``Shape`` protocol provides a default implementation with a value of ``ShapeRole/fill``. If you create a composite shape, you can provide an override of this property to return another value, if appropriate.
get angle(): AngleSwift declarationvar angle: Angleset angle(value: Angle)Swift declarationvar angle: Anglestatic init(shape: SDKHandle, angle: Angle, anchor?: UnitPoint): RotatedShape<SDKHandle>Swift declarationinit(shape: Content, angle: Angle, anchor: UnitPoint = .center)get shape(): SDKHandleSwift declarationvar shape: Contentset shape(value: SDKHandle)Swift declarationvar shape: Contentget anchor(): UnitPointSwift declarationvar anchor: UnitPointset anchor(value: UnitPoint)Swift declarationvar anchor: UnitPointstatic initWrappedValueRelativeTo(wrappedValue: number, textStyle: Font_TextStyle): ScaledMetric<number>Swift declarationinit(wrappedValue: Value, relativeTo textStyle: Font.TextStyle)Creates the scaled metric with an unscaled value and a text style to scale relative to.
static initWrappedValue(wrappedValue: number): ScaledMetric<number>Swift declarationinit(wrappedValue: Value)Creates the scaled metric with an unscaled value using the default scaling.
get wrappedValue(): numberSwift declarationvar wrappedValue: Value { get }The value scaled based on the current environment.
get body(): neverSwift declarationvar body: Never { get }The content and behavior of the view. When you implement a custom view, you must implement a computed `body` property to provide the content for your view. Return a view that's composed of built-in views that SwiftUI provides, plus other composite views that you've already defined: struct MyView: View { var body: some View { Text("Hello, World!") } } For more information about composing views and a view hierarchy, see <doc:Declaring-a-Custom-View>.
static init(to: number, duration: number, startVelocity?: (number) | null, endVelocity?: (number) | null): CubicKeyframe<number>Swift declarationinit(_ to: Value, duration: TimeInterval, startVelocity: Value? = nil, endVelocity: Value? = nil)Creates a new keyframe using the given value and timestamp. - Parameters: - to: The value of the keyframe. - startVelocity: The velocity of the value at the beginning of the segment, or `nil` to automatically compute the velocity to maintain smooth motion. - endVelocity: The velocity of the value at the end of the segment, or `nil` to automatically compute the velocity to maintain smooth motion. - duration: The duration of the segment defined by this keyframe.
get background(): SDKHandleSwift declaration@export(implementation) nonisolated var background: Background { get set }The background shown beneath this view.
set background(value: SDKHandle)Swift declaration@export(implementation) nonisolated var background: Background { get set }The background shown beneath this view.
static init(shape: SDKHandle, style: SDKHandle, fillStyle: FillStyle, background: SDKHandle): FillShapeView<SDKHandle, SDKHandle, SDKHandle>Swift declaration@export(implementation) nonisolated init(shape: Content, style: Style, fillStyle: FillStyle, background: Background)Create a FillShapeView.
get shape(): SDKHandleSwift declaration@export(implementation) nonisolated var shape: Content { get set }The shape that this type draws and provides for other drawing operations.
set shape(value: SDKHandle)Swift declaration@export(implementation) nonisolated var shape: Content { get set }The shape that this type draws and provides for other drawing operations.
get style(): SDKHandleSwift declaration@export(implementation) nonisolated var style: Style { get set }The style that fills this view's shape.
set style(value: SDKHandle)Swift declaration@export(implementation) nonisolated var style: Style { get set }The style that fills this view's shape.
get fillStyle(): FillStyleSwift declaration@export(implementation) nonisolated var fillStyle: FillStyle { get set }The fill style used when filling this view's shape.
set fillStyle(value: FillStyle)Swift declaration@export(implementation) nonisolated var fillStyle: FillStyle { get set }The fill style used when filling this view's shape.
get cgImage(): Promise<(_CoreGraphics_CGImage) | null>Swift declaration@MainActor final var cgImage: CGImage? { get }The current contents of the view, rasterized as a Core Graphics image. The renderer notifies its `objectWillChange` publisher when the contents of the image may have changed.
get proposedSize(): Promise<ProposedViewSize>Swift declaration@MainActor final var proposedSize: ProposedViewSize { get set }The size proposed to the root view. The default value of this property, ``ProposedViewSize/unspecified``, produces an image that matches the original view size. You can provide a custom ``ProposedViewSize`` to override the view's size in one or both dimensions.
setProposedSize(value: ProposedViewSize): Promise<void>Swift declaration@MainActor final var proposedSize: ProposedViewSize { get set }The size proposed to the root view. The default value of this property, ``ProposedViewSize/unspecified``, produces an image that matches the original view size. You can provide a custom ``ProposedViewSize`` to override the view's size in one or both dimensions.
get objectWillChange(): _Combine_PassthroughSubject<void, never>Swift declarationfinal let objectWillChange: PassthroughSubject<Void, Never>A publisher that informs subscribers of changes to the image. The renderer's <doc://com.apple.documentation/documentation/Combine/ObservableObject/ObjectWillChangePublisher> publishes `Void` elements. Subscribers should interpret any event as indicating that the contents of the image may have changed.
get allowedDynamicRange(): Promise<(Image_DynamicRange) | null>Swift declaration@MainActor final var allowedDynamicRange: Image.DynamicRange? { get set }The allowed dynamic range of the image, or nil to mark that the dynamic range of the image should be unrestricted. This property defaults to `sdr`, i.e. HDR content will be tone mapped to SDR.
setAllowedDynamicRange(value?: (Image_DynamicRange) | null): Promise<void>Swift declaration@MainActor final var allowedDynamicRange: Image.DynamicRange? { get set }The allowed dynamic range of the image, or nil to mark that the dynamic range of the image should be unrestricted. This property defaults to `sdr`, i.e. HDR content will be tone mapped to SDR.
get isObservationEnabled(): booleanSwift declaration@export(implementation) final var isObservationEnabled: Bool { get set }If observers of this observed object should be notified when the produced image changes.
set isObservationEnabled(value: boolean)Swift declaration@export(implementation) final var isObservationEnabled: Bool { get set }If observers of this observed object should be notified when the produced image changes.
get scale(): Promise<number>Swift declaration@MainActor final var scale: CGFloat { get set }The scale at which to render the image. This value is a ratio of view points to image pixels. This relationship means that values greater than `1.0` create an image larger than the original content view, and less than `1.0` creates a smaller image. The following example shows a 100 x 50 rectangle view and an image rendered from it with a `scale` of `2.0`, resulting in an image size of 200 x 100. let rectangle = Rectangle() .frame(width: 100, height: 50) let renderer = ImageRenderer(content: rectangle) renderer.scale = 2.0 if let rendered = renderer.cgImage { print("Scaled image: \(rendered.width) x \(rendered.height)") } // Prints "Scaled image: 200 x 100" The default value of this property is `1.0`.
setScale(value: number): Promise<void>Swift declaration@MainActor final var scale: CGFloat { get set }The scale at which to render the image. This value is a ratio of view points to image pixels. This relationship means that values greater than `1.0` create an image larger than the original content view, and less than `1.0` creates a smaller image. The following example shows a 100 x 50 rectangle view and an image rendered from it with a `scale` of `2.0`, resulting in an image size of 200 x 100. let rectangle = Rectangle() .frame(width: 100, height: 50) let renderer = ImageRenderer(content: rectangle) renderer.scale = 2.0 if let rendered = renderer.cgImage { print("Scaled image: \(rendered.width) x \(rendered.height)") } // Prints "Scaled image: 200 x 100" The default value of this property is `1.0`.
static init(view: SDKHandle): Promise<ImageRenderer<SDKHandle>>Swift declaration@MainActor init(content view: Content)Creates a renderer object with a source content view. - Parameter view: A ``View`` to render.
get content(): Promise<SDKHandle>Swift declaration@MainActor final var content: Content { get set }The root view rendered by this image renderer.
setContent(value: SDKHandle): Promise<void>Swift declaration@MainActor final var content: Content { get set }The root view rendered by this image renderer.
get isOpaque(): Promise<boolean>Swift declaration@MainActor final var isOpaque: Bool { get set }A Boolean value that indicates whether the alpha channel of the image is fully opaque. Setting this value to `true`, meaning the alpha channel is opaque, may improve performance. Don't render non-opaque pixels to a renderer declared as opaque. This property defaults to `false`.
setIsOpaque(value: boolean): Promise<void>Swift declaration@MainActor final var isOpaque: Bool { get set }A Boolean value that indicates whether the alpha channel of the image is fully opaque. Setting this value to `true`, meaning the alpha channel is opaque, may improve performance. Don't render non-opaque pixels to a renderer declared as opaque. This property defaults to `false`.
get colorMode(): Promise<ColorRenderingMode>Swift declaration@MainActor final var colorMode: ColorRenderingMode { get set }The working color space and storage format of the image.
setColorMode(value: ColorRenderingMode): Promise<void>Swift declaration@MainActor final var colorMode: ColorRenderingMode { get set }The working color space and storage format of the image.
withAnimationCompletionCriteriaCompletion(animation: (Animation) | null, completionCriteria: AnimationCompletionCriteria, body: (() => unknown), completion: (() => void)): unknownSwift declarationfunc withAnimation<Result>(_ animation: Animation? = .default, completionCriteria: AnimationCompletionCriteria = .logicallyComplete, _ body: () throws -> Result, completion: @escaping () -> Void) rethrows -> ResultReturns the result of recomputing the view's body with the provided animation, and runs the completion when all animations are complete. This function sets the given ``Animation`` as the ``Transaction/animation`` property of the thread's current ``Transaction`` as well as calling ``Transaction/addAnimationCompletion`` with the specified completion. The completion callback will always be fired exactly one time. If no animations are created by the changes in `body`, then the callback will be called immediately after `body`.
withAnimation(animation: (Animation) | null, body: (() => unknown)): unknownSwift declarationfunc withAnimation<Result>(_ animation: Animation? = .default, _ body: () throws -> Result) rethrows -> ResultReturns the result of recomputing the view's body with the provided animation. This function sets the given ``Animation`` as the ``Transaction/animation`` property of the thread's current ``Transaction``.
get magnitudeSquared(): numberSwift declarationvar magnitudeSquared: Double { get }The dot-product of this animated pair with itself.
static get zero(): AnimatablePair<number, number>Swift declarationstatic var zero: AnimatablePair<First, Second> { get }The zero value. Zero is the identity element for addition. For any value, `x + .zero == x` and `.zero + x == x`.
get first(): numberSwift declarationvar first: FirstThe first value.
set first(value: number)Swift declarationvar first: FirstThe first value.
scale(rhs: number): voidSwift declarationmutating func scale(by rhs: Double)Multiplies each component of this value by the given value.
get second(): numberSwift declarationvar second: SecondThe second value.
set second(value: number)Swift declarationvar second: SecondThe second value.
static init(first: number, second: number): AnimatablePair<number, number>Swift declarationinit(_ first: First, _ second: Second)Creates an animated pair with the provided values.
static init(): AnimationState<number>Swift declarationinit()Create an empty state container. You don't typically create an instance of ``AnimationState`` directly. Instead, the ``AnimationContext`` provides the animation state to an instance of ``CustomAnimation``.
get content(): ((arg0: GeometryProxy) => Promise<SDKHandle>)Swift declarationvar content: (GeometryProxy) -> Contentstatic init(to: number, duration: number, timingCurve?: UnitCurve): LinearKeyframe<number>Swift declarationinit(_ to: Value, duration: TimeInterval, timingCurve: UnitCurve = .linear)Creates a new keyframe using the given value and timestamp. - Parameters: - to: The value of the keyframe. - duration: The duration of the segment defined by this keyframe. - timingCurve: A unit curve that controls the speed of interpolation.
static init(to: number, duration?: (number) | null, spring?: Spring, startVelocity?: (number) | null): SpringKeyframe<number>Swift declarationinit(_ to: Value, duration: TimeInterval? = nil, spring: Spring = Spring(), startVelocity: Value? = nil)Creates a new keyframe using the given value and timestamp. - Parameters: - to: The value of the keyframe. - duration: The duration of the segment defined by this keyframe, or nil to use the settling duration of the spring. - spring: The spring that defines the shape of the segment befire this keyframe - startVelocity: The velocity of the value at the start of the segment, or `nil` to automatically compute the velocity to maintain smooth motion.
static get currentDate(): TimeDataSource<globalThis.Date>Swift declarationstatic var currentDate: TimeDataSource<Date> { get }A time data source that produces `Date.now`.
static durationOffset(date: globalThis.Date): TimeDataSource<SDKHandle>Swift declarationstatic func durationOffset(to date: Date) -> TimeDataSource<Duration>A time data source that produces the offset between `Date.now` and the given `date` as a `Duration`.
static dateRangeStartingAt(date: globalThis.Date): TimeDataSource<SDKHandle>Swift declarationstatic func dateRange(startingAt date: Date) -> TimeDataSource<Range<Date>>A time data source that produces `date..<max(date, Date.now)`.
static dateRangeEndingAt(date: globalThis.Date): TimeDataSource<SDKHandle>Swift declarationstatic func dateRange(endingAt date: Date) -> TimeDataSource<Range<Date>>A time data source that produces `min(date, Date.now)..<date`.
static init(configuration: ArrangementViewStyleConfiguration): ArrangementView<ArrangementViewStyleConfiguration_Primary, ArrangementViewStyleConfiguration_Secondary>Swift declarationnonisolated init(_ configuration: ArrangementViewStyleConfiguration)Creates an arrangement view from a style configuration. Use this initializer to implement a custom ``ArrangementViewStyle`` that composes another arrangement view. Your style can apply its customizations, such as appearance or layout adjustments, while deferring the arrangement of primary and secondary content to the arrangement view: struct CustomArrangementViewStyle: ArrangementViewStyle { func makeBody(configuration: Configuration) -> some View { ArrangementView(configuration) .font(.callout) .tint(customTint) } } - Parameter configuration: The style configuration to use.
static init(content: unknown, modifier: unknown): ModifiedContent<unknown, unknown>Swift declarationnonisolated init(content: Content, modifier: Modifier)A structure that defines the content and modifier needed to produce a new view or view modifier. If `content` is a ``View`` and `modifier` is a ``ViewModifier``, the result is a ``View``. If `content` and `modifier` are both view modifiers, then the result is a new ``ViewModifier`` combining them. - Parameters: - content: The content that the modifier changes. - modifier: The modifier to apply to the content.
get content(): unknownSwift declarationvar content: ContentThe content that the modifier transforms into a new view or new view modifier.
set content(value: unknown)Swift declarationvar content: ContentThe content that the modifier transforms into a new view or new view modifier.
get modifier(): unknownSwift declarationvar modifier: ModifierThe view modifier.
set modifier(value: unknown)Swift declarationvar modifier: ModifierThe view modifier.
get animatableData(): AnimatablePair<number, number>Swift declarationvar animatableData: AnimatablePair<Content.AnimatableData, Modifier.AnimatableData> { get set }The data to animate. SwiftUI reads this property to capture the current vector representation of the animatable state, and writes it back on each animation frame with an interpolated value. The default implementation returns ``EmptyAnimatableData``, meaning nothing is animated. Use the ``Animatable()`` macro to synthesize this property automatically. Implement it by hand only when you need custom interpolation logic such as clamping, normalization, or mapping to a derived value.
set animatableData(value: AnimatablePair<number, number>)Swift declarationvar animatableData: AnimatablePair<Content.AnimatableData, Modifier.AnimatableData> { get set }The data to animate. SwiftUI reads this property to capture the current vector representation of the animatable state, and writes it back on each animation frame with an interpolated value. The default implementation returns ``EmptyAnimatableData``, meaning nothing is animated. Use the ``Animatable()`` macro to synthesize this property automatically. Implement it by hand only when you need custom interpolation logic such as clamping, normalization, or mapping to a derived value.
get background(): SDKHandleSwift declaration@export(implementation) nonisolated var background: Background { get set }The background shown beneath this view.
set background(value: SDKHandle)Swift declaration@export(implementation) nonisolated var background: Background { get set }The background shown beneath this view.
get strokeStyle(): StrokeStyleSwift declaration@export(implementation) nonisolated var strokeStyle: StrokeStyle { get set }The stroke style used when stroking this view's shape.
set strokeStyle(value: StrokeStyle)Swift declaration@export(implementation) nonisolated var strokeStyle: StrokeStyle { get set }The stroke style used when stroking this view's shape.
get isAntialiased(): booleanSwift declaration@export(implementation) nonisolated var isAntialiased: Bool { get set }Whether this shape should be drawn antialiased.
set isAntialiased(value: boolean)Swift declaration@export(implementation) nonisolated var isAntialiased: Bool { get set }Whether this shape should be drawn antialiased.
static init(shape: SDKHandle, style: SDKHandle, strokeStyle: StrokeStyle, isAntialiased: boolean, background: SDKHandle): StrokeShapeView<SDKHandle, SDKHandle, SDKHandle>Swift declaration@export(implementation) nonisolated init(shape: Content, style: Style, strokeStyle: StrokeStyle, isAntialiased: Bool, background: Background)Create a StrokeShapeView.
get shape(): SDKHandleSwift declaration@export(implementation) nonisolated var shape: Content { get set }The shape that this type draws and provides for other drawing operations.
set shape(value: SDKHandle)Swift declaration@export(implementation) nonisolated var shape: Content { get set }The shape that this type draws and provides for other drawing operations.
get style(): SDKHandleSwift declaration@export(implementation) nonisolated var style: Style { get set }The style that strokes this view's shape.
set style(value: SDKHandle)Swift declaration@export(implementation) nonisolated var style: Style { get set }The style that strokes this view's shape.
withTransaction(transaction: Transaction, body: (() => unknown)): unknownSwift declarationfunc withTransaction<Result>(_ transaction: Transaction, _ body: () throws -> Result) rethrows -> ResultExecutes a closure with the specified transaction and returns the result. - Parameters: - transaction: An instance of a transaction, set as the thread's current transaction. - body: A closure to execute. - Returns: The result of executing the closure with the specified transaction.
withTransaction33189(keyPath: SDKHandle, value: unknown, body: (() => unknown)): unknownSwift declaration@export(implementation) func withTransaction<R, V>(_ keyPath: WritableKeyPath<Transaction, V>, _ value: V, _ body: () throws -> R) rethrows -> RExecutes a closure with the specified transaction key path and value and returns the result. - Parameters: - keyPath: A key path that indicates the property of the ``Transaction`` structure to update. - value: The new value to set for the item specified by `keyPath`. - body: A closure to execute. - Returns: The result of executing the closure with the specified transaction value.
get magnitudeSquared(): numberSwift declarationvar magnitudeSquared: Double { get }The dot-product of the tuple of animatable values with itself.
scale(rhs: number): voidSwift declarationmutating func scale(by rhs: Double)Multiplies each component of this value by the given value.
get environment(): EnvironmentValuesSwift declarationvar environment: EnvironmentValues { get }The current environment of the view that created the custom animation. An instance of ``CustomAnimation`` uses this property to read environment values from the view that created the animation. To learn more about environment values including how to define custom environment values, see ``EnvironmentValues``.
get isLogicallyComplete(): booleanSwift declarationvar isLogicallyComplete: BoolSet this to `true` to indicate that an animation is logically complete. This controls when AnimationCompletionCriteria.logicallyComplete completion callbacks are fired. This should be set to `true` at most once in the life of an animation, changing back to `false` later will be ignored. If this is never set to `true`, the behavior is equivalent to if this had been set to `true` just as the animation finished (by returning `nil`).
set isLogicallyComplete(value: boolean)Swift declarationvar isLogicallyComplete: BoolSet this to `true` to indicate that an animation is logically complete. This controls when AnimationCompletionCriteria.logicallyComplete completion callbacks are fired. This should be set to `true` at most once in the life of an animation, changing back to `false` later will be ignored. If this is never set to `true`, the behavior is equivalent to if this had been set to `true` just as the animation finished (by returning `nil`).
get state(): AnimationState<number>Swift declarationvar state: AnimationState<Value>The current state of a custom animation. An instance of ``CustomAnimation`` uses this property to read and write state values as the animation runs. An alternative to using the `state` property in a custom animation is to create an ``AnimationStateKey`` type and extend ``AnimationContext`` with a custom property that returns the state as a custom type. For example, the following code creates a state key named `PausableState`. It's convenient to store state values in the key type, so the `PausableState` structure includes properties for the stored state values `paused` and `pauseTime`. private struct PausableState<Value: VectorArithmetic>: AnimationStateKey { var paused = false var pauseTime: TimeInterval = 0.0 static var defaultValue: Self { .init() } } To provide access to the pausable state, the following code extends `AnimationContext` to include the `pausableState` property. This property returns an instance of the custom `PausableState` structure stored in ``AnimationContext/state``, and it can also store a new `PausableState` instance in `state`. extension AnimationContext { fileprivate var pausableState: PausableState<Value> { get { state[PausableState<Value>.self] } set { state[PausableState<Value>.self] = newValue } } } Now a custom animation can use the `pausableState` property instead of the ``AnimationContext/state`` property as a convenient way to read and write state values as the animation runs. struct PausableAnimation: CustomAnimation { func animate<V>(value: V, time: TimeInterval, context: inout AnimationContext<V>) -> V? where V : VectorArithmetic { let pausableState = context.pausableState var pauseTime = pausableState.pauseTime ... } }
set state(value: AnimationState<number>)Swift declarationvar state: AnimationState<Value>The current state of a custom animation. An instance of ``CustomAnimation`` uses this property to read and write state values as the animation runs. An alternative to using the `state` property in a custom animation is to create an ``AnimationStateKey`` type and extend ``AnimationContext`` with a custom property that returns the state as a custom type. For example, the following code creates a state key named `PausableState`. It's convenient to store state values in the key type, so the `PausableState` structure includes properties for the stored state values `paused` and `pauseTime`. private struct PausableState<Value: VectorArithmetic>: AnimationStateKey { var paused = false var pauseTime: TimeInterval = 0.0 static var defaultValue: Self { .init() } } To provide access to the pausable state, the following code extends `AnimationContext` to include the `pausableState` property. This property returns an instance of the custom `PausableState` structure stored in ``AnimationContext/state``, and it can also store a new `PausableState` instance in `state`. extension AnimationContext { fileprivate var pausableState: PausableState<Value> { get { state[PausableState<Value>.self] } set { state[PausableState<Value>.self] = newValue } } } Now a custom animation can use the `pausableState` property instead of the ``AnimationContext/state`` property as a convenient way to read and write state values as the animation runs. struct PausableAnimation: CustomAnimation { func animate<V>(value: V, time: TimeInterval, context: inout AnimationContext<V>) -> V? where V : VectorArithmetic { let pausableState = context.pausableState var pauseTime = pausableState.pauseTime ... } }
withState(state: AnimationState<number>): AnimationContext<number>Swift declarationfunc withState<T>(_ state: AnimationState<T>) -> AnimationContext<T> where T : VectorArithmeticCreates a new context from another one with a state that you provide. Use this method to create a new context that contains the state that you provide and view environment values from the original context. - Parameter state: The initial state for the new context. - Returns: A new context that contains the specified state.
valueTime(time: number): unknownSwift declarationfunc value(time: Double) -> ValueReturns the interpolated value at the given time.
valueProgress(progress: number): unknownSwift declarationfunc value(progress: Double) -> ValueReturns the interpolated value at the given progress in the range zero to one.
get duration(): numberSwift declarationvar duration: TimeInterval { get }The duration of the content in seconds.
get animatableData(): SDKHandleSwift declarationnonisolated var animatableData: TransformedShape<Content>.AnimatableData { get set }The data to animate. SwiftUI reads this property to capture the current vector representation of the animatable state, and writes it back on each animation frame with an interpolated value. The default implementation returns ``EmptyAnimatableData``, meaning nothing is animated. Use the ``Animatable()`` macro to synthesize this property automatically. Implement it by hand only when you need custom interpolation logic such as clamping, normalization, or mapping to a derived value.
set animatableData(value: SDKHandle)Swift declarationnonisolated var animatableData: TransformedShape<Content>.AnimatableData { get set }The data to animate. SwiftUI reads this property to capture the current vector representation of the animatable state, and writes it back on each animation frame with an interpolated value. The default implementation returns ``EmptyAnimatableData``, meaning nothing is animated. Use the ``Animatable()`` macro to synthesize this property automatically. Implement it by hand only when you need custom interpolation logic such as clamping, normalization, or mapping to a derived value.
get layoutDirectionBehavior(): LayoutDirectionBehaviorSwift declarationnonisolated var layoutDirectionBehavior: LayoutDirectionBehavior { get }Returns the behavior this shape should use for different layout directions. If the layoutDirectionBehavior for a Shape is one that mirrors, the shape's path will be mirrored horizontally when in the specified layout direction. When mirrored, the individual points of the path will be transformed. Defaults to `.mirrors` when deploying on iOS 17.0, macOS 14.0, tvOS 17.0, watchOS 10.0 and later, and to `.fixed` if not. To mirror a path when deploying to earlier releases, either use `View.flipsForRightToLeftLayoutDirection` for a filled or stroked shape or conditionally mirror the points in the path of the shape.
path(rect: { x: number; y: number; width: number; height: number }): PathSwift declarationnonisolated func path(in rect: CGRect) -> PathDescribes this shape as a path within a rectangular frame of reference. - Parameter rect: The frame of reference for describing this shape. - Returns: A path that describes this shape.
static get role(): ShapeRoleSwift declarationnonisolated static var role: ShapeRole { get }An indication of how to style a shape. SwiftUI looks at a shape's role when deciding how to apply a ``ShapeStyle`` at render time. The ``Shape`` protocol provides a default implementation with a value of ``ShapeRole/fill``. If you create a composite shape, you can provide an override of this property to return another value, if appropriate.
static init(shape: SDKHandle, transform: _CoreFoundation_CGAffineTransform): TransformedShape<SDKHandle>Swift declarationinit(shape: Content, transform: CGAffineTransform)get shape(): SDKHandleSwift declarationvar shape: Contentset shape(value: SDKHandle)Swift declarationvar shape: Contentget transform(): _CoreFoundation_CGAffineTransformSwift declarationvar transform: CGAffineTransformset transform(value: _CoreFoundation_CGAffineTransform)Swift declarationvar transform: CGAffineTransformget background(): SDKHandleSwift declaration@export(implementation) nonisolated var background: Background { get set }The background shown beneath this view.
set background(value: SDKHandle)Swift declaration@export(implementation) nonisolated var background: Background { get set }The background shown beneath this view.
get strokeStyle(): StrokeStyleSwift declaration@export(implementation) nonisolated var strokeStyle: StrokeStyle { get set }The stroke style used when stroking this view's shape.
set strokeStyle(value: StrokeStyle)Swift declaration@export(implementation) nonisolated var strokeStyle: StrokeStyle { get set }The stroke style used when stroking this view's shape.
get isAntialiased(): booleanSwift declaration@export(implementation) nonisolated var isAntialiased: Bool { get set }Whether this shape should be drawn antialiased.
set isAntialiased(value: boolean)Swift declaration@export(implementation) nonisolated var isAntialiased: Bool { get set }Whether this shape should be drawn antialiased.
get style(): SDKHandleSwift declaration@export(implementation) nonisolated var style: Style { get set }The style that strokes the border of this view's shape.
set style(value: SDKHandle)Swift declaration@export(implementation) nonisolated var style: Style { get set }The style that strokes the border of this view's shape.
get body(): AttributedTextFormatting_AnyDefinition<SDKHandle>Swift declarationvar body: AttributedTextFormatting.AnyDefinition<Scope> { get }The constraints of the formatting definition. When you implement a custom definition, you must implement a computed `body` property to provide the constraints of your definition. Return a definition that's composed of built-in definitions that SwiftUI provides, such as ``AttributedTextFormattingDefinition/ValueConstraint`` and ``AttributedTextValueConstraint``s, plus other composite ``AttributedTextFormattingDefinition``s that you've already defined: struct MyTextFormattingDefinition: AttributedTextFormattingDefinition { var body: some AttributedTextFormattingDefinition< AttributeScopes.SwiftUIAttributes > { ValueConstraint( for: \.underlineStyle, values: [nil, .single], default: .single) MyAttributedTextValueConstraint() } } Note that the order of the constraints in the result builder matters as constraints are applied in order. For details, see ``AttributedTextValueConstraint/constrain(_:)-(Attributes)``.
get body(): AttributedTextFormatting_EmptyDefinition<SDKHandle>Swift declarationvar body: AttributedTextFormatting.EmptyDefinition<Scope> { get }The constraints of the formatting definition. When you implement a custom definition, you must implement a computed `body` property to provide the constraints of your definition. Return a definition that's composed of built-in definitions that SwiftUI provides, such as ``AttributedTextFormattingDefinition/ValueConstraint`` and ``AttributedTextValueConstraint``s, plus other composite ``AttributedTextFormattingDefinition``s that you've already defined: struct MyTextFormattingDefinition: AttributedTextFormattingDefinition { var body: some AttributedTextFormattingDefinition< AttributeScopes.SwiftUIAttributes > { ValueConstraint( for: \.underlineStyle, values: [nil, .single], default: .single) MyAttributedTextValueConstraint() } } Note that the order of the constraints in the result builder matters as constraints are applied in order. For details, see ``AttributedTextValueConstraint/constrain(_:)-(Attributes)``.
entries(startDate: globalThis.Date, mode: TimelineScheduleMode): Array<globalThis.Date>Swift declarationfunc entries(from startDate: Date, mode: TimelineScheduleMode) -> EntriesProvides the sequence of dates with which you initialized the schedule. A ``TimelineView`` that you create with a schedule calls this ``TimelineSchedule`` method to ask the schedule when to update its content. The explicit timeline schedule implementation of this method returns the unmodified sequence of dates that you provided when you created the schedule with ``TimelineSchedule/explicit(_:)``. As a result, this particular implementation ignores the `startDate` and `mode` parameters. - Parameters: - startDate: The date from which the sequence begins. This particular implementation of the protocol method ignores the start date. - mode: The mode for the update schedule. This particular implementation of the protocol method ignores the mode. - Returns: The sequence of dates that you provided at initialization.
static init(dates: Array<globalThis.Date>): ExplicitTimelineSchedule<Array<globalThis.Date>>Swift declarationinit(_ dates: Entries)Creates a schedule composed of an explicit sequence of dates. Use the ``ExplicitTimelineSchedule/entries(from:mode:)`` method to get the sequence of dates. - Parameter dates: The sequence of dates at which a timeline view updates. Use a monotonically increasing sequence of dates, and ensure that at least one is in the future.
get startIndex(): numberSwift declarationvar startIndex: Int { get }The position of the first element in a nonempty collection. If the collection is empty, `startIndex` is equal to `endIndex`.
get endIndex(): numberSwift declarationvar endIndex: Int { 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(index: number): SectionConfigurationSwift declarationsubscript(index: Int) -> SectionConfiguration { 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 startIndex(): numberSwift declarationvar startIndex: Int { get }The position of the first element in a nonempty collection. If the collection is empty, `startIndex` is equal to `endIndex`.
get endIndex(): numberSwift declarationvar endIndex: Int { 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(index: number): SubviewSwift declarationsubscript(index: Int) -> Subview { 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)
static initInitialValue(value: unknown): State<unknown>Swift declaration@export(implementation) init(initialValue value: Value)Creates a state property that stores an initial value. This initializer has the same behavior as the ``init(wrappedValue:)`` initializer. See that initializer for more information. - Parameter value: An initial value to store in the state property.
static initWrappedValue(value: unknown): State<unknown>Swift declarationinit(wrappedValue value: Value)Creates a state property that stores an initial wrapped value. You don't call this initializer directly. Instead, SwiftUI calls it for you when you declare a property with the `@State` attribute and provide an initial value: struct MyView: View { @State private var isPlaying: Bool = false // ... } SwiftUI initializes the state's storage only once for each container instance that you declare. In the above code, SwiftUI creates `isPlaying` only the first time it initializes a particular instance of `MyView`. On the other hand, each instance of `MyView` creates a distinct instance of the state. For example, each of the views in the following ``VStack`` has its own `isPlaying` value: var body: some View { VStack { MyView() MyView() } } - Parameter value: An initial value to store in the state property.
get wrappedValue(): unknownSwift declarationvar wrappedValue: Value { get nonmutating set }The underlying value referenced by the state variable. This property provides primary access to the value's data. However, you don't typically access `wrappedValue` explicitly. Instead, you gain access to the wrapped value by referring to the property variable that you create with the `@State` attribute. In the following example, the button's label depends on the value of `isPlaying` and the button's action toggles the value of `isPlaying`. Both of these accesses implicitly access the state property's wrapped value: struct PlayButton: View { @State private var isPlaying: Bool = false var body: some View { Button(isPlaying ? "Pause" : "Play") { isPlaying.toggle() } } }
set wrappedValue(value: unknown)Swift declarationvar wrappedValue: Value { get nonmutating set }The underlying value referenced by the state variable. This property provides primary access to the value's data. However, you don't typically access `wrappedValue` explicitly. Instead, you gain access to the wrapped value by referring to the property variable that you create with the `@State` attribute. In the following example, the button's label depends on the value of `isPlaying` and the button's action toggles the value of `isPlaying`. Both of these accesses implicitly access the state property's wrapped value: struct PlayButton: View { @State private var isPlaying: Bool = false var body: some View { Button(isPlaying ? "Pause" : "Play") { isPlaying.toggle() } } }
get projectedValue(): Binding<unknown>Swift declarationvar projectedValue: Binding<Value> { get }A binding to the state value. Use the projected value to get a ``Binding`` to the stored value. The binding provides a two-way connection to the stored value. To access the `projectedValue`, prefix the property variable with a dollar sign (`$`). In the following example, `PlayerView` projects a binding of the state property `isPlaying` to the `PlayButton` view using `$isPlaying`. That enables the play button to both read and write the value: struct PlayerView: View { var episode: Episode @State private var isPlaying: Bool = false var body: some View { VStack { Text(episode.title) .foregroundStyle(isPlaying ? .primary : .secondary) PlayButton(isPlaying: $isPlaying) } } }
static rect(r: { x: number; y: number; width: number; height: number }): Anchor_Source<{ x: number; y: number; width: number; height: number }>Swift declarationstatic func rect(_ r: CGRect) -> Anchor<Value>.SourceReturns an anchor source rect defined by `r` in the current view.
static get bounds(): Anchor_Source<{ x: number; y: number; width: number; height: number }>Swift declarationstatic var bounds: Anchor<CGRect>.Source { get }An anchor source rect defined as the entire bounding rect of the current view.
static get topLeading(): Anchor_Source<{ x: number; y: number }>Swift declarationstatic var topLeading: Anchor<CGPoint>.Source { get }static get topTrailing(): Anchor_Source<{ x: number; y: number }>Swift declarationstatic var topTrailing: Anchor<CGPoint>.Source { get }static get bottomLeading(): Anchor_Source<{ x: number; y: number }>Swift declarationstatic var bottomLeading: Anchor<CGPoint>.Source { get }static get bottomTrailing(): Anchor_Source<{ x: number; y: number }>Swift declarationstatic var bottomTrailing: Anchor<CGPoint>.Source { get }static get top(): Anchor_Source<{ x: number; y: number }>Swift declarationstatic var top: Anchor<CGPoint>.Source { get }static point(p: { x: number; y: number }): Anchor_Source<{ x: number; y: number }>Swift declarationstatic func point(_ p: CGPoint) -> Anchor<Value>.Sourcestatic get bottom(): Anchor_Source<{ x: number; y: number }>Swift declarationstatic var bottom: Anchor<CGPoint>.Source { get }static get center(): Anchor_Source<{ x: number; y: number }>Swift declarationstatic var center: Anchor<CGPoint>.Source { get }static get leading(): Anchor_Source<{ x: number; y: number }>Swift declarationstatic var leading: Anchor<CGPoint>.Source { get }static get trailing(): Anchor_Source<{ x: number; y: number }>Swift declarationstatic var trailing: Anchor<CGPoint>.Source { get }static unitPoint(p: UnitPoint): Anchor_Source<{ x: number; y: number }>Swift declarationstatic func unitPoint(_ p: UnitPoint) -> Anchor<Value>.Sourcestatic init(array: Array<Anchor_Source<unknown>>): Anchor_Source<Array<unknown>>Swift declarationinit<T>(_ array: [Anchor<T>.Source]) where Value == [T]static init73288(anchor?: (Anchor_Source<unknown>) | null): Anchor_Source<(unknown) | null>Swift declarationinit<T>(_ anchor: Anchor<T>.Source?) where Value == T?get rendersAsynchronously(): booleanSwift declarationnonisolated var rendersAsynchronously: Bool { get set }A Boolean that indicates whether the canvas can present its contents to its parent view asynchronously.
set rendersAsynchronously(value: boolean)Swift declarationnonisolated var rendersAsynchronously: Bool { get set }A Boolean that indicates whether the canvas can present its contents to its parent view asynchronously.
get symbols(): SDKHandleSwift declarationvar symbols: SymbolsA view that provides child views that you can use in the drawing callback. Uniquely tag each child view using the ``View/tag(_:)`` modifier, so that you can find them from within your renderer using the ``GraphicsContext/resolveSymbol(id:)`` method.
set symbols(value: SDKHandle)Swift declarationvar symbols: SymbolsA view that provides child views that you can use in the drawing callback. Uniquely tag each child view using the ``View/tag(_:)`` modifier, so that you can find them from within your renderer using the ``GraphicsContext/resolveSymbol(id:)`` method.
get isOpaque(): booleanSwift declarationnonisolated var isOpaque: Bool { get set }A Boolean that indicates whether the canvas is fully opaque. You might be able to improve performance by setting this value to `true`, making the canvas is fully opaque. However, in that case, the result of drawing a non-opaque image into the canvas is undefined.
set isOpaque(value: boolean)Swift declarationnonisolated var isOpaque: Bool { get set }A Boolean that indicates whether the canvas is fully opaque. You might be able to improve performance by setting this value to `true`, making the canvas is fully opaque. However, in that case, the result of drawing a non-opaque image into the canvas is undefined.
set renderer(value: ((arg0: GraphicsContext, arg1: { width: number; height: number }) => void))Swift declarationvar renderer: (inout GraphicsContext, CGSize) -> VoidThe drawing callback that you use to draw into the canvas. - Parameters: - context: The graphics context to draw into. - size: The current size of the view.
get colorMode(): ColorRenderingModeSwift declarationnonisolated var colorMode: ColorRenderingMode { get set }The working color space and storage format of the canvas.
set colorMode(value: ColorRenderingMode)Swift declarationnonisolated var colorMode: ColorRenderingMode { get set }The working color space and storage format of the canvas.
static init(opaque: boolean, colorMode: ColorRenderingMode, rendersAsynchronously: boolean, renderer: ((arg0: GraphicsContext, arg1: { width: number; height: number }) => void)): Canvas<EmptyView>Swift declarationnonisolated init(opaque: Bool = false, colorMode: ColorRenderingMode = .nonLinear, rendersAsynchronously: Bool = false, renderer: @escaping (inout GraphicsContext, CGSize) -> Void)Creates and configures a canvas. Use this initializer to create a new canvas that you can draw into. For example, you can draw a path: Canvas { context, size in context.stroke( Path(ellipseIn: CGRect(origin: .zero, size: size)), with: .color(.green), lineWidth: 4) } .frame(width: 300, height: 200) .border(Color.blue) The example above draws the outline of an ellipse that exactly inscribes a canvas with a blue border:  For information about using a context to draw into a canvas, see ``GraphicsContext``. If you want to provide SwiftUI views for the renderer to use as drawing elements, use ``init(opaque:colorMode:rendersAsynchronously:renderer:symbols:)`` instead. - Parameters: - opaque: A Boolean that indicates whether the canvas is fully opaque. You might be able to improve performance by setting this value to `true`, but then drawing a non-opaque image into the context produces undefined results. The default is `false`. - colorMode: A working color space and storage format of the canvas. The default is ``ColorRenderingMode/nonLinear``. - rendersAsynchronously: A Boolean that indicates whether the canvas can present its contents to its parent view asynchronously. The default is `false`. - renderer: A closure in which you conduct immediate mode drawing. The closure takes two inputs: a context that you use to issue drawing commands and a size --- representing the current size of the canvas --- that you can use to customize the content. The canvas calls the renderer any time it needs to redraw the content.
get transaction(): TransactionSwift declarationvar transaction: TransactionThe binding's transaction. The transaction captures the information needed to update the view when the binding value changes.
set transaction(value: Transaction)Swift declarationvar transaction: TransactionThe binding's transaction. The transaction captures the information needed to update the view when the binding value changes.
transaction59249(transaction: Transaction): Binding<unknown>Swift declarationfunc transaction(_ transaction: Transaction) -> Binding<Value>Specifies a transaction for the binding. - Parameter transaction: An instance of a ``Transaction``. - Returns: A new binding.
get wrappedValue(): unknownSwift declarationvar wrappedValue: Value { get nonmutating set }The underlying value referenced by the binding variable. This property provides primary access to the value's data. However, you don't access `wrappedValue` directly. Instead, you use the property variable created with the ``Binding`` attribute. In the following code example, the binding variable `isPlaying` returns the value of `wrappedValue`: struct PlayButton: View { @Binding var isPlaying: Bool var body: some View { Button(isPlaying ? "Pause" : "Play") { isPlaying.toggle() } } } When a mutable binding value changes, the new value is immediately available. However, updates to a view displaying the value happens asynchronously, so the view may not show the change immediately.
set wrappedValue(value: unknown)Swift declarationvar wrappedValue: Value { get nonmutating set }The underlying value referenced by the binding variable. This property provides primary access to the value's data. However, you don't access `wrappedValue` directly. Instead, you use the property variable created with the ``Binding`` attribute. In the following code example, the binding variable `isPlaying` returns the value of `wrappedValue`: struct PlayButton: View { @Binding var isPlaying: Bool var body: some View { Button(isPlaying ? "Pause" : "Play") { isPlaying.toggle() } } } When a mutable binding value changes, the new value is immediately available. However, updates to a view displaying the value happens asynchronously, so the view may not show the change immediately.
subscript(keyPath: SDKHandle): Binding<unknown>Swift declarationsubscript<Subject>(dynamicMember keyPath: WritableKeyPath<Value, Subject>) -> Binding<Subject> { get }Returns a binding to the resulting value of a given key path. Use dynamic member lookup to project a property of the binding's wrapped value from a key path into a new binding. The returned value is read from, and written to, the original binding. This can be useful when a view accepts a binding for a type that only matches a property of a value from an existing binding. For example, the `PlayerView` controls the current position for an episode using a `Slider`, and whether the episode is a favorite using a `Toggle`. The view projects the `currentPosition` and `isFavorite` properties of `Episode` into bindings that each of these views accept using dynamic member lookup. struct Episode { var title: LocalizedStringKey var duration: TimeInterval var currentPosition: TimeInterval var isFavorite: Bool } struct PlayerView: View { @Binding var episode: Episode var body: some View { Text(episode.title) Toggle("Favorite", isOn: $episode.isFavorite) Slider( value: $episode.currentPosition, in: 0...episode.duration ) } } - Parameter keyPath: A key path to a specific resulting value. - Returns: A new binding.
static initProjectedValue(projectedValue: Binding<unknown>): Binding<unknown>Swift declaration@export(implementation) init(projectedValue: Binding<Value>)Creates a binding from the value of another binding.
get projectedValue(): Binding<unknown>Swift declarationvar projectedValue: Binding<Value> { get }A projection of the binding value that returns a binding. Use the projected value to pass a binding value down a view hierarchy. To get the `projectedValue`, prefix the property variable with `$`. For example, in the following code example `PlayerView` projects a binding of the state property `isPlaying` to the `PlayButton` view using `$isPlaying`. struct PlayerView: View { var episode: Episode @State private var isPlaying: Bool = false var body: some View { VStack { Text(episode.title) .foregroundStyle(isPlaying ? .primary : .secondary) PlayButton(isPlaying: $isPlaying) } } }
static constant(value: unknown): Binding<unknown>Swift declarationstatic func constant(_ value: Value) -> Binding<Value>Creates a binding with an immutable value. Use this method to create a binding to a value that cannot change. This can be useful when using a ``PreviewProvider`` to see how a view represents different values. // Example of binding to an immutable value. PlayButton(isPlaying: Binding.constant(true)) - Parameter value: An immutable value.
animation(animation?: (Animation) | null): Binding<unknown>Swift declarationfunc animation(_ animation: Animation? = .default) -> Binding<Value>Specifies an animation to perform when the binding value changes. - Parameter animation: An animation sequence performed when the binding value changes. - Returns: A new binding.
static init(base: Binding<unknown>): Binding<(unknown) | null>Swift declarationinit<V>(_ base: Binding<V>) where Value == V?Creates a binding by projecting the base value to an optional value. - Parameter base: A value to project to an optional value.
static init16056(base: Binding<number>): Binding<unknown>Swift declarationinit<V>(_ base: Binding<V>) where Value == AnyHashable, V : HashableCreates a binding by projecting the base value to a hashable value. - Parameters: - base: A `Hashable` value to project to an `AnyHashable` value.
static init51273(base: Binding<(unknown) | null>): (Binding<unknown>) | nullSwift declarationinit?(_ base: Binding<Value?>)Creates a binding by projecting the base value to an unwrapped value. > Warning: The new binding force-unwraps the value from the original binding. After creating of this binding, the original binding becoming `nil` will result in a crash from the new binding. - Parameter base: A value to project to an unwrapped value. - Returns: A new binding or `nil` when `base` is `nil`.
get wrappedValue(): unknownSwift declarationvar wrappedValue: ValueThe wrapped object.
set wrappedValue(value: unknown)Swift declarationvar wrappedValue: ValueThe wrapped object.
get projectedValue(): Bindable<unknown>Swift declarationvar projectedValue: Bindable<Value> { get }The bindable wrapper for the object that creates bindings to its properties using dynamic member lookup.
get value(): unknownSwift declarationvar value: Tset value(value: unknown)Swift declarationvar value: Tstatic init(value: unknown): TupleView<unknown>Swift declarationnonisolated init(_ value: T)custom(angle: Angle): _Symbols_WiggleSymbolEffectSwift declaration@export(implementation) func custom(angle: Angle) -> WiggleSymbolEffectReturns a copy of the effect requesting an animation that moves back and forth along an axis with the passed in angle.
get animatableData(): AnimatablePair<AnimatablePair<number, number>, AnimatablePair<number, number>>Swift declarationvar animatableData: CGRect.AnimatableData { get set }The data to animate. SwiftUI reads this property to capture the current vector representation of the animatable state, and writes it back on each animation frame with an interpolated value. The default implementation returns ``EmptyAnimatableData``, meaning nothing is animated. Use the ``Animatable()`` macro to synthesize this property automatically. Implement it by hand only when you need custom interpolation logic such as clamping, normalization, or mapping to a derived value.
set animatableData(value: AnimatablePair<AnimatablePair<number, number>, AnimatablePair<number, number>>)Swift declarationvar animatableData: CGRect.AnimatableData { get set }The data to animate. SwiftUI reads this property to capture the current vector representation of the animatable state, and writes it back on each animation frame with an interpolated value. The default implementation returns ``EmptyAnimatableData``, meaning nothing is animated. Use the ``Animatable()`` macro to synthesize this property automatically. Implement it by hand only when you need custom interpolation logic such as clamping, normalization, or mapping to a derived value.
get animatableData(): AnimatablePair<number, number>Swift declarationvar animatableData: CGSize.AnimatableData { get set }The data to animate. SwiftUI reads this property to capture the current vector representation of the animatable state, and writes it back on each animation frame with an interpolated value. The default implementation returns ``EmptyAnimatableData``, meaning nothing is animated. Use the ``Animatable()`` macro to synthesize this property automatically. Implement it by hand only when you need custom interpolation logic such as clamping, normalization, or mapping to a derived value.
set animatableData(value: AnimatablePair<number, number>)Swift declarationvar animatableData: CGSize.AnimatableData { get set }The data to animate. SwiftUI reads this property to capture the current vector representation of the animatable state, and writes it back on each animation frame with an interpolated value. The default implementation returns ``EmptyAnimatableData``, meaning nothing is animated. Use the ``Animatable()`` macro to synthesize this property automatically. Implement it by hand only when you need custom interpolation logic such as clamping, normalization, or mapping to a derived value.
get animatableData(): AnimatablePair<number, number>Swift declarationvar animatableData: CGPoint.AnimatableData { get set }The data to animate. SwiftUI reads this property to capture the current vector representation of the animatable state, and writes it back on each animation frame with an interpolated value. The default implementation returns ``EmptyAnimatableData``, meaning nothing is animated. Use the ``Animatable()`` macro to synthesize this property automatically. Implement it by hand only when you need custom interpolation logic such as clamping, normalization, or mapping to a derived value.
set animatableData(value: AnimatablePair<number, number>)Swift declarationvar animatableData: CGPoint.AnimatableData { get set }The data to animate. SwiftUI reads this property to capture the current vector representation of the animatable state, and writes it back on each animation frame with an interpolated value. The default implementation returns ``EmptyAnimatableData``, meaning nothing is animated. Use the ``Animatable()`` macro to synthesize this property automatically. Implement it by hand only when you need custom interpolation logic such as clamping, normalization, or mapping to a derived value.
applying(m: ProjectionTransform): { x: number; y: number }Swift declarationfunc applying(_ m: ProjectionTransform) -> CGPoint648 declarations were excluded from these bindings. Each reason comes from the generator or the iOS SDK compiler.
FormatStyle.reference(to:allowedFields:maxFieldCount:thresholdField:)
Static protocol requirements cannot be called through an instance.
FormatStyle.offset(to:allowedFields:maxFieldCount:sign:)
Static protocol requirements cannot be called through an instance.
AttributeScopes.swiftUI
Passing a Swift type itself is not supported.
AttributeDynamicLookup.subscript(dynamicMember:)
This declaration needs Swift generic type arguments. (no canonical witness for T)
FormatStyle.timer(countingDownIn:showsHours:maxFieldCount:maxPrecision:)
Static protocol requirements cannot be called through an instance.
FormatStyle.timer(countingUpIn:showsHours:maxFieldCount:maxPrecision:)
Static protocol requirements cannot be called through an instance.
FormatStyle.stopwatch(startingAt:showsHours:maxFieldCount:maxPrecision:)
Static protocol requirements cannot be called through an instance.
Float.scale(by:)
The containing type is outside the generated SDK type index.
Float.magnitudeSquared
The containing type is outside the generated SDK type index.
Double.scale(by:)
The containing type is outside the generated SDK type index.
Double.magnitudeSquared
The containing type is outside the generated SDK type index.
Optional.body
This protocol needs associated types that cannot yet cross the bridge.
RangeReplaceableCollection.remove(atOffsets:)
The containing type is outside the generated SDK type index.
MutableCollection.move(fromOffsets:toOffset:)
The containing type is outside the generated SDK type index.
View.disabled(_:)
This protocol needs associated types that cannot yet cross the bridge.
ZStack.init(alignment:content:)
callback cannot propagate synchronous failure
ShapeStyle.linearGradient(_:startPoint:endPoint:)
Static protocol requirements cannot be called through an instance.
ShapeStyle.linearGradient(colors:startPoint:endPoint:)
Static protocol requirements cannot be called through an instance.
ShapeStyle.linearGradient(stops:startPoint:endPoint:)
Static protocol requirements cannot be called through an instance.
ShapeStyle.radialGradient(_:center:startRadius:endRadius:)
Static protocol requirements cannot be called through an instance.
ShapeStyle.radialGradient(colors:center:startRadius:endRadius:)
Static protocol requirements cannot be called through an instance.
ShapeStyle.radialGradient(stops:center:startRadius:endRadius:)
Static protocol requirements cannot be called through an instance.
ShapeStyle.ellipticalGradient(_:center:startRadiusFraction:endRadiusFraction:)
Static protocol requirements cannot be called through an instance.
ShapeStyle.ellipticalGradient(colors:center:startRadiusFraction:endRadiusFraction:)
Static protocol requirements cannot be called through an instance.
ShapeStyle.ellipticalGradient(stops:center:startRadiusFraction:endRadiusFraction:)
Static protocol requirements cannot be called through an instance.
ShapeStyle.angularGradient(_:center:startAngle:endAngle:)
Static protocol requirements cannot be called through an instance.
ShapeStyle.angularGradient(colors:center:startAngle:endAngle:)
Static protocol requirements cannot be called through an instance.
ShapeStyle.angularGradient(stops:center:startAngle:endAngle:)
Static protocol requirements cannot be called through an instance.
ShapeStyle.conicGradient(_:center:angle:)
Static protocol requirements cannot be called through an instance.
ShapeStyle.conicGradient(colors:center:angle:)
Static protocol requirements cannot be called through an instance.