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

# resize(withOldSuperviewSize:)

Informs the view that the bounds size of its superview has changed.

```
func resize(withOldSuperviewSize oldSize: NSSize)
```

## Parameters

`oldSize`

The previous size of the superview’s bounds rectangle.

## Discussion

This method is normally invoked automatically from [`resizeSubviews(withOldSize:)`](/documentation/AppKit/NSView/resizeSubviews(withOldSize:)).

The default implementation resizes the view according to the autoresizing options specified by the [`autoresizingMask`](/documentation/AppKit/NSView/autoresizingMask-swift.property) property. You shouldn’t invoke this method directly, but you can override it to define a specific resizing behavior.

If you override this method and call `super` as part of your implementation, you should be sure to call `super` before making changes to the receiving view’s frame yourself.

---

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)