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

# setValidateSize(_:)

Specifies whether the receiver’s size information is validated.

```
func setValidateSize(_ flag: Bool)
```

## Parameters

`flag`

<doc://com.apple.documentation/documentation/Swift/true> to assume that the size information in the receiver is correct. If `flag` is <doc://com.apple.documentation/documentation/Swift/false>, the [`NSControl`](/documentation/AppKit/NSControl) method [`calcSize()`](/documentation/AppKit/NSControl/calcSize()) will be invoked before any further drawing is done.

---

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)