One Logo Pool Ball
SwiftUICore · IOS API REFERENCE

CoordinateSpaceProtocol

protocol · iOS 17.0+ · SDK 27.1

protocol CoordinateSpaceProtocol

A frame of reference within the layout system. All geometric properties of a view, including size, position, and transform, are defined within the local coordinate space of the view's parent. These values can be converted into other coordinate spaces by passing types conforming to this protocol into functions such as `GeometryProxy.frame(in:)`. For example, a named coordinate space allows you to convert the frame of a view into the local coordinate space of an ancestor view by defining a named coordinate space using the `coordinateSpace(_:)` modifier, then passing that same named coordinate space into the `frame(in:)` function. VStack { GeometryReader { geometryProxy in let distanceFromTop = geometryProxy.frame(in: "container").origin.y Text("This view is \(distanceFromTop) points from the top of the VStack") } .padding() } .coordinateSpace(.named("container")) You don't typically create types conforming to this protocol yourself. Instead, use the system-provided `.global`, `.local`, and `.named(_:)` implementations.

Members (0)

This type has no directly callable members in this snapshot. See the framework’s skipped declarations for unsupported APIs.

Skipped declarations

5 declarations were excluded from these bindings. Each reason comes from the generator or the iOS SDK compiler.

CoordinateSpaceProtocol.named(_:)

Static protocol requirements cannot be called through an instance.

CoordinateSpaceProtocol.local

Static protocol requirements cannot be called through an instance.

CoordinateSpaceProtocol.global

Static protocol requirements cannot be called through an instance.

CoordinateSpaceProtocol.scrollView(axis:)

Static protocol requirements cannot be called through an instance.

CoordinateSpaceProtocol.scrollView

Static protocol requirements cannot be called through an instance.

All SwiftUICore types →