Instance Method


Asks the delegate for a string to display in a tooltip for the specified cell in the column and row.


optional func tableView(_ tableView: NSTableView, toolTipFor cell: NSCell, rect: NSRectPointer, tableColumn: NSTableColumn?, row: Int, mouseLocation: NSPoint) -> String



The table view that sent the message.


The cell.


The proposed active area of the tooltip. You can modify rect to provide an alternative active area.


The table column.


The row index.


The mouse location.

Return Value

A string that should be displayed in the tooltip. Return nil or the empty string if no tooltip is desired.


By default, rect is computed as

[cell drawingRectForBounds:cellFrame]. Note that tooltips are also known as help tags.

See Also

Providing Cells for Rows and Columns

func tableView(NSTableView, willDisplayCell: Any, for: NSTableColumn?, row: Int)

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

func tableView(NSTableView, dataCellFor: NSTableColumn?, row: Int) -> NSCell?

Asks the delegate for a custom data cell for the specified row and column.

func tableView(NSTableView, shouldShowCellExpansionFor: NSTableColumn?, row: Int) -> Bool

Asks the delegate if an expansion tooltip should be displayed for a specific row and column.