<!--
{
  "availability" : [
    "macOS: -"
  ],
  "documentType" : "symbol",
  "framework" : "AppKit",
  "identifier" : "/documentation/AppKit/NSTableViewDataSource/tableView(_:objectValueFor:row:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "AppKit"
    ],
    "preciseIdentifier" : "c:objc(pl)NSTableViewDataSource(im)tableView:objectValueForTableColumn:row:"
  },
  "title" : "tableView(_:objectValueFor:row:)"
}
-->

# tableView(_:objectValueFor:row:)

Called by the table view to return the data object associated with the specified row and column.

```
@MainActor optional func tableView(_ tableView: NSTableView, objectValueFor tableColumn: NSTableColumn?, row: Int) -> Any?
```

## Parameters

`tableView`

The table view that sent the message.

`tableColumn`

A column in `aTableView`.

`row`

The row of the item in `aTableColumn`.

## Return Value

An item in the data source in the specified table column of the view.

## Discussion

[`tableView(_:objectValueFor:row:)`](/documentation/AppKit/NSTableViewDataSource/tableView(_:objectValueFor:row:)) is called each time the table cell needs to be redisplayed, so it must be efficient.

> Note:
> This method is mandatory unless your application is using Cocoa bindings for providing data to the table view.

---

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)