---
title: "setValidateSize(_:)"
framework: appkit
role: symbol
role_heading: Instance Method
path: "appkit/nsmatrix/setvalidatesize(_:)"
---

# setValidateSize(_:)

Specifies whether the receiver’s size information is validated.

## Declaration

```swift
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 doc://com.apple.appkit/documentation/AppKit/NSControl method doc://com.apple.appkit/documentation/AppKit/NSControl/calcSize() will be invoked before any further drawing is done.

## See Also

### Resizing the Matrix and Its Cells

- [autosizesCells](appkit/nsmatrix/autosizescells.md)
- [sizeToCells()](appkit/nsmatrix/sizetocells().md)
