---
title: calcSize()
framework: appkit
role: symbol
role_heading: Instance Method
path: appkit/nscontrol/calcsize()
---

# calcSize()

Recomputes any internal sizing information for the receiver, if necessary.

## Declaration

```swift
func calcSize()
```

## Discussion

Discussion This method uses the calcDrawInfo(_:) method of its cell to perform the calculations. Most controls maintain a flag that informs them if any of their cells have been modified in such a way that the location or size of the cell should be recomputed. If such a modification happens, this method is automatically invoked before the control is displayed. You should never need to invoke it yourself.

## See Also

### Related Documentation

- [sizeToFit()](appkit/nscontrol/sizetofit().md)

### Deprecated Methods

- [selectedCell()](appkit/nscontrol/selectedcell().md)
- [selectedTag()](appkit/nscontrol/selectedtag().md)
- [setNeedsDisplay()](appkit/nscontrol/setneedsdisplay().md)
- [selectCell(_:)](appkit/nscontrol/selectcell(_:).md)
- [drawCell(_:)](appkit/nscontrol/drawcell(_:).md)
- [drawCellInside(_:)](appkit/nscontrol/drawcellinside(_:).md)
- [updateCell(_:)](appkit/nscontrol/updatecell(_:).md)
- [updateCellInside(_:)](appkit/nscontrol/updatecellinside(_:).md)
