<!--
{
  "availability" : [
    "iOS: 13.0.0 -",
    "iPadOS: 13.0.0 -",
    "macCatalyst: 13.1.0 -",
    "tvOS: 17.0.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "UIKit",
  "identifier" : "/documentation/UIKit/UIContextMenuInteraction/location(in:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "UIKit"
    ],
    "preciseIdentifier" : "c:objc(cs)UIContextMenuInteraction(im)locationInView:"
  },
  "title" : "location(in:)"
}
-->

# location(in:)

Returns the location of the user interaction in the specified view’s coordinate system.

```
func location(in view: UIView?) -> CGPoint
```

## Parameters

`view`

The view containing the target coordinate system. To return a point in the window’s coordinate system, specify `nil`.

## Return Value

The location of the interaction specified in the coordinate system of `view`.

## Discussion

---

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)