Contents

outlineView(_:shouldShowOutlineCellForItem:)

Returns whether the specified item should display the outline cell (the disclosure triangle).

Declaration

@MainActor optional func outlineView(_ outlineView: NSOutlineView, shouldShowOutlineCellForItem item: Any) -> Bool

Parameters

  • outlineView:

    The outline view that sent the message.

  • item:

    An item in the outline view.

Return Value

true if the outline cell should be displayed, otherwise false.

Discussion

Returning false causes frameOfOutlineCell(atRow:) to return NSZeroRect, hiding the cell. In addition, the row will not be collapsible by keyboard shortcuts.

This method is called only for expandable rows.

See Also

Displaying Cells