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

# location(in:)

Returns the location of the drag activity within the specified view.

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

## Parameters

`view`

The view that is used to determine the location of the drag activity.

## Return Value

A point in the local coordinate system of `view`.

## Discussion

To get the location of the drag activity within the window, use `nil` for the view.

---

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)