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

# setFrameOrigin(_:)

Sets the origin of the view’s frame rectangle to the specified point, effectively repositioning it within its superview.

```
func setFrameOrigin(_ newOrigin: NSPoint)
```

## Parameters

`newOrigin`

The point that is the new origin of the view’s frame.

## Discussion

Changing the frame does not mark the view as needing to be displayed. Set the [`needsDisplay`](/documentation/AppKit/NSView/needsDisplay) property to <doc://com.apple.documentation/documentation/Swift/true> when you want the view to be redisplayed.

Changing the frame origin results in the posting of an [`frameDidChangeNotification`](/documentation/AppKit/NSView/frameDidChangeNotification) to the default notification center if the view is configured to do so.

---

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)