<!--
{
  "availability" : [
    "iOS: 13.0.0 -",
    "iPadOS: 13.0.0 -",
    "macCatalyst: 13.0.0 -",
    "macOS: 10.15.0 -",
    "tvOS: 13.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 6.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "SwiftUI",
  "identifier" : "/documentation/SwiftUI/CoordinateSpace",
  "metadataVersion" : "0.1.0",
  "role" : "Enumeration",
  "symbol" : {
    "kind" : "Enumeration",
    "modules" : [
      "SwiftUI"
    ],
    "preciseIdentifier" : "s:7SwiftUI15CoordinateSpaceO"
  },
  "title" : "CoordinateSpace"
}
-->

# CoordinateSpace

A resolved coordinate space created by the coordinate space protocol.

```
enum CoordinateSpace
```

## Overview

You don’t typically use `CoordinateSpace` directly. Instead, use the static
properties and functions of `CoordinateSpaceProtocol` such as `.global`,
`.local`, and `.named(_:)`.

## Topics

### Getting coordinate spaces

[`CoordinateSpace.global`](/documentation/SwiftUI/CoordinateSpace/global)

The global coordinate space at the root of the view hierarchy.

[`CoordinateSpace.local`](/documentation/SwiftUI/CoordinateSpace/local)

The local coordinate space of the current view.

[`CoordinateSpace.named(_:)`](/documentation/SwiftUI/CoordinateSpace/named(_:))

A named reference to a view’s local coordinate space.

### Testing a space

[`isGlobal`](/documentation/SwiftUI/CoordinateSpace/isGlobal)

[`isLocal`](/documentation/SwiftUI/CoordinateSpace/isLocal)



---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)