---
title: "rect(ofRow:)"
framework: appkit
role: symbol
role_heading: Instance Method
path: "appkit/nstableview/rect(ofrow:)"
---

# rect(ofRow:)

Returns the rectangle containing the row at the specified index.

## Declaration

```swift
func rect(ofRow row: Int) -> NSRect
```

## Return Value

Return Value The rectangle containing the row at rowIndex. Returns NSZeroRect if rowIndex lies outside the range of valid row indexes for the table view.

## Discussion

Discussion You can use this method to update a single row more efficiently than sending the table view a reloadData() message. [aTableView setNeedsDisplayInRect:[aTableView rectOfRow:row]];

## See Also

### Layout Support

- [userInterfaceLayoutDirection](appkit/nstableview/userinterfacelayoutdirection.md)
- [rect(ofColumn:)](appkit/nstableview/rect(ofcolumn:).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)
- [sizeToFit()](appkit/nstableview/sizetofit().md)
- [noteHeightOfRows(withIndexesChanged:)](appkit/nstableview/noteheightofrows(withindexeschanged:).md)
