<!--
{
  "availability" : [
    "macOS: -"
  ],
  "documentType" : "symbol",
  "framework" : "AppKit",
  "identifier" : "/documentation/AppKit/NSView/translateOrigin(to:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "AppKit"
    ],
    "preciseIdentifier" : "c:objc(cs)NSView(im)translateOriginToPoint:"
  },
  "title" : "translateOrigin(to:)"
}
-->

# translateOrigin(to:)

Translates the view’s coordinate system so that its origin moves to a new location.

```
func translateOrigin(to translation: NSPoint)
```

## Parameters

`translation`

A point that specifies the new origin.

## Discussion

In the process, the origin of the view’s bounds rectangle is shifted by (`–translation.x`, `–translation.y`). This method neither redisplays the view nor marks it as needing display. You must do this yourself by calling the  [`display()`](/documentation/AppKit/NSView/display()) method or setting the [`needsDisplay`](/documentation/AppKit/NSView/needsDisplay) property.

Note the difference between this method and setting the bounds origin. Translation effectively moves the image inside the bounds rectangle, while setting the bounds origin effectively moves the rectangle over the image. The two are in a sense inverse, although translation is cumulative, and setting the bounds origin is absolute.

This method posts an [`boundsDidChangeNotification`](/documentation/AppKit/NSView/boundsDidChangeNotification) to the default notification center if the view is configured to do so.

## See Also

[`-  setBoundsOrigin:`](/documentation/AppKit/NSView/setBoundsOrigin(_:))

Sets the origin of the view’s bounds rectangle to a specified point.

[`bounds`](/documentation/AppKit/NSView/bounds)

The view’s bounds rectangle, which expresses its location and size in its own coordinate system.



---

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)