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

# viewSizeChanged(_:)

Tells the recever when the color panel’s view size changes in a way that might affect the color picker.

```
@MainActor func viewSizeChanged(_ sender: Any?)
```

## Parameters

`sender`

The `NSColorPanel` that contains the color picker.

## Discussion

Use this method to perform special preparation when resizing the color picker’s view. Because this method is invoked only as appropriate, it’s better to implement this method than to override the method `superviewSizeChanged:` for the `NSView` in which the color picker’s user interface is contained.

## See Also

[`func provideNewView(Bool) -> NSView`](/documentation/AppKit/NSColorPickingCustom/provideNewView(_:))

Returns the view containing the receiver’s user interface.



---

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)