The NSTableRowView class is the view shown for a row in an NSTableView. It is responsible for displaying attributes associated with the row, including the selection highlight, and group row look.


Display Style

var isEmphasized: Bool

Determines whether the row will draw with the alternate or secondary color (unless overridden).

var interiorBackgroundStyle: NSBackgroundStyle

Specifies how the subviews should draw.

var isFloating: Bool

Specifies whether the row is drawn using the floating style.

Row Selection

var isSelected: Bool

Determines whether the row is selected.

Drag and Drop

var indentationForDropOperation: CGFloat

Defines the amount the drag target for a row should be indented.

var isTargetForDropOperation: Bool

Specifies whether this row will draw a drop indicator based on the current dragging feedback style.

Row Grouping

var isGroupRowStyle: Bool

Specifies whether this row view is a group row.

var numberOfColumns: Int

Returns the number of columns represented by views in the table row view.

Overriding Row View Display Characteristics

var backgroundColor: NSColor

The background color of the row.

func drawBackground(in: NSRect)

Draws the background of the row in the rectangle.

func drawDraggingDestinationFeedback(in: NSRect)

Draws the row’s dragging destination feedback when the entire row is a drop target.

func drawSelection(in: NSRect)

Draws the selected row.

func drawSeparator(in: NSRect)

Draws the horizontal separator between table rows.

Accessing A Row Column View

func view(atColumn: Int)

Provides access to the given view at a particular column.