<!--
{
  "availability" : [
    "macOS: 26.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "SwiftUI",
  "identifier" : "/documentation/SwiftUI/NSGestureRecognizerRepresentableCoordinateSpaceConverter/location(in:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "SwiftUI"
    ],
    "preciseIdentifier" : "s:7SwiftUI56NSGestureRecognizerRepresentableCoordinateSpaceConverterV8location2inSo7CGPointVx_tAA0fG8ProtocolRzlF"
  },
  "title" : "location(in:)"
}
-->

# location(in:)

Converts the represented gesture recognizer’s current location to a
SwiftUI coordinate space of an ancestor of the view the gesture
recognizer is attached to.

```
func location(in coordinateSpace: some CoordinateSpaceProtocol) -> CGPoint
```

## Parameters

`coordinateSpace`

The SwiftUI coordinate space to convert to.

## Return Value

The represrnted gesture recognizer’s current location
converted into the given `coordinateSpace`.

---

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)