Instance Method

tableView(_:objectValueFor:row:)

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

Declaration

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

Parameters

aTableView

The table view that sent the message.

aTableColumn

A column in aTableView.

rowIndex

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:) is called each time the table cell needs to be redisplayed, so it must be efficient.

See Also

Getting Values

func numberOfRows(in: NSTableView) -> Int

Returns the number of records managed for aTableView by the data source object.