<!--
{
  "availability" : [
    "macCatalyst: -",
    "macOS: -"
  ],
  "documentType" : "symbol",
  "framework" : "AppKit",
  "identifier" : "/documentation/AppKit/NSTableView/frameOfCell(atColumn:row:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "AppKit"
    ],
    "preciseIdentifier" : "c:objc(cs)NSTableView(im)frameOfCellAtColumn:row:"
  },
  "title" : "frameOfCell(atColumn:row:)"
}
-->

# frameOfCell(atColumn:row:)

Returns a rectangle locating the cell that lies at the intersection of the specified column and row.

```
func frameOfCell(atColumn column: Int, row: Int) -> NSRect
```

## Parameters

`column`

The index in the [`tableColumns`](/documentation/AppKit/NSTableView/tableColumns) array of the column containing the cell whose rectangle you want.

`row`

The index of the row containing the cell whose rectangle you want.

## Return Value

A rectangle locating the cell that lies at the intersection of `columnIndex` and `rowIndex`. This method returns `NSZeroRect` if `columnIndex` or `rowIndex` is greater than the number of columns or rows in the table view.

## Discussion

You can use this method to update a single cell more efficiently than sending the table view a [`reloadData()`](/documentation/AppKit/NSTableView/reloadData()) message using [`reloadData(forRowIndexes:columnIndexes:)`](/documentation/AppKit/NSTableView/reloadData(forRowIndexes:columnIndexes:))

The result of this method is used in a [`draw(withFrame:in:)`](/documentation/AppKit/NSCell/draw(withFrame:in:)) message to the table column’s data cell. You can subclass and override this method to customize the frame of a particular cell. However, never return a frame larger than the default implementation returns.

The default frame is computed to have a height equal to the [`rect(ofRow:)`](/documentation/AppKit/NSTableView/rect(ofRow:)) for `rowIndex`, minus the half [`intercellSpacing`](/documentation/AppKit/NSTableView/intercellSpacing) height on the top and half on the bottom.  The width of frame is equal to the with of the table column minus half the [`intercellSpacing`](/documentation/AppKit/NSTableView/intercellSpacing) width on the left, and half on the right.

---

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)
