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

# setBoundsSize(_:)

Sets the size of the view’s bounds rectangle to specified dimensions, inversely scaling its coordinate system relative to its frame rectangle.

```
func setBoundsSize(_ newSize: NSSize)
```

## Parameters

`newSize`

An `NSSize` structure specifying the new width and height of the view’s bounds rectangle.

## Discussion

For example, a view object with a frame size of (100.0, 100.0) and a bounds size of (200.0, 100.0) draws half as wide along the x axis. This method neither redisplays the view nor marks it as needing display. Set the [`needsDisplay`](/documentation/AppKit/NSView/needsDisplay) property to <doc://com.apple.documentation/documentation/Swift/true> when you want the view to be redisplayed.

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

After calling this method, `NSView` creates an internal transform (or appends these changes to an existing internal transform) to convert from frame coordinates to bounds coordinates in your view. As long as the width-to-height ratio of the two coordinate systems remains the same, your content appears normal. If the ratios differ, your content may appear skewed.

---

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)