Contents

tableView(_:willDisplayCell:for:row:)

Tells the delegate that the table view will display the specified cell at the specified row and column.

Declaration

@MainActor optional func tableView(_ tableView: NSTableView, willDisplayCell cell: Any, for tableColumn: NSTableColumn?, row: Int)

Parameters

  • tableView:

    The table view that sent the message.

  • cell:

    The cell to be displayed.

  • tableColumn:

    The table column.

  • row:

    The row index.

Discussion

The delegate can modify the display attributes of aCell to alter the appearance of the cell.

Because aCell is reused for every row in aTableColumn, the delegate must set the display attributes both when drawing special cells and when drawing standard cells.

See Also

Providing cells for rows and columns