---
title: sizeToFit()
framework: appkit
role: symbol
role_heading: Instance Method
path: appkit/nstableview/sizetofit()
---

# sizeToFit()

Sizes the  table view based on a uniform column autoresizing style.

## Declaration

```swift
func sizeToFit()
```

## Discussion

Discussion All columns are resized to the same size, up to a column’s maximum size. This method then invokes tile().

## See Also

### Layout Support

- [userInterfaceLayoutDirection](appkit/nstableview/userinterfacelayoutdirection.md)
- [rect(ofColumn:)](appkit/nstableview/rect(ofcolumn:).md)
- [rect(ofRow:)](appkit/nstableview/rect(ofrow:).md)
- [rows(in:)](appkit/nstableview/rows(in:).md)
- [columnIndexes(in:)](appkit/nstableview/columnindexes(in:).md)
- [column(at:)](appkit/nstableview/column(at:).md)
- [row(at:)](appkit/nstableview/row(at:).md)
- [frameOfCell(atColumn:row:)](appkit/nstableview/frameofcell(atcolumn:row:).md)
- [columnAutoresizingStyle](appkit/nstableview/columnautoresizingstyle-swift.property.md)
- [sizeLastColumnToFit()](appkit/nstableview/sizelastcolumntofit().md)
- [noteNumberOfRowsChanged()](appkit/nstableview/notenumberofrowschanged().md)
- [tile()](appkit/nstableview/tile().md)
- [noteHeightOfRows(withIndexesChanged:)](appkit/nstableview/noteheightofrows(withindexeschanged:).md)
