---
title: "setFrameFromContentFrame(_:)"
framework: appkit
role: symbol
role_heading: Instance Method
path: "appkit/nsbox/setframefromcontentframe(_:)"
---

# setFrameFromContentFrame(_:)

Places the receiver so its content view lies on the specified frame.

## Declaration

```swift
func setFrameFromContentFrame(_ contentFrame: NSRect)
```

## Parameters

- `contentFrame`: The rectangle specifying the frame of the box’s content view, reckoned in the coordinate system of the box’s superview. The box is marked for redisplay.

## See Also

### Related Documentation

- [contentViewMargins](appkit/nsbox/contentviewmargins.md)
- [needsDisplay](appkit/nsview/needsdisplay.md)
- [frame](appkit/nsview/frame.md)

### Sizing

- [sizeToFit()](appkit/nsbox/sizetofit().md)
