<!--
{
  "availability" : [
    "iOS: 27.0.0 -",
    "iPadOS: 27.0.0 -",
    "macCatalyst: 27.0.0 -",
    "tvOS: 27.0.0 -",
    "visionOS: 27.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "UIKit",
  "identifier" : "/documentation/UIKit/NSTextSelectionDataSource/convertInteractionPoint(_:toContainerAt:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "UIKit"
    ],
    "preciseIdentifier" : "c:objc(pl)NSTextSelectionDataSource(im)convertInteractionPoint:toContainerAtLocation:"
  },
  "title" : "convertInteractionPoint(_:toContainerAt:)"
}
-->

# convertInteractionPoint(_:toContainerAt:)

Converts an interaction point from display space into the text container’s coordinate system.

```
optional func convertInteractionPoint(_ point: CGPoint, toContainerAt containerLocation: any NSTextLocation) -> CGPoint
```

## Parameters

`point`

The interaction point in display/view-space coordinates.

`containerLocation`

The location identifying the text container the interaction occurred in.

## Return Value

The point mapped into the text container’s coordinate system. Return `point` unchanged when no transform is active.

## Discussion

`NSTextSelectionNavigation` calls this method before hit-testing to allow the data source to undo any display transform (rotation, flip, path layout, etc.) applied to the text.

---

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)