---
title: "setFrameOrigin(_:)"
framework: appkit
role: symbol
role_heading: Instance Method
path: "appkit/nsview/setframeorigin(_:)"
---

# setFrameOrigin(_:)

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

## Declaration

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

## Parameters

- `newOrigin`: The point that is the new origin of the view’s frame.

## Discussion

Discussion Changing the frame does not mark the view as needing to be displayed. Set the needsDisplay property to true when you want the view to be redisplayed. Changing the frame origin results in the posting of an frameDidChangeNotification to the default notification center if the view is configured to do so.

## See Also

### Modifying the Frame Rectangle

- [frame](appkit/nsview/frame.md)
- [setFrameSize(_:)](appkit/nsview/setframesize(_:).md)
- [frameRotation](appkit/nsview/framerotation.md)
- [frameDidChangeNotification](appkit/nsview/framedidchangenotification.md)
- [postsFrameChangedNotifications](appkit/nsview/postsframechangednotifications.md)
