---
title: "outlineView(_:shouldShowOutlineCellForItem:)"
framework: appkit
role: symbol
role_heading: Instance Method
path: "appkit/nsoutlineviewdelegate/outlineview(_:shouldshowoutlinecellforitem:)"
---

# outlineView(_:shouldShowOutlineCellForItem:)

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

## Declaration

```swift
@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

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

## Discussion

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

- [outlineView(_:willDisplayCell:for:item:)](appkit/nsoutlineviewdelegate/outlineview(_:willdisplaycell:for:item:).md)
- [outlineView(_:willDisplayOutlineCell:for:item:)](appkit/nsoutlineviewdelegate/outlineview(_:willdisplayoutlinecell:for:item:).md)
- [outlineView(_:dataCellFor:item:)](appkit/nsoutlineviewdelegate/outlineview(_:datacellfor:item:).md)
- [outlineView(_:shouldShowCellExpansionFor:item:)](appkit/nsoutlineviewdelegate/outlineview(_:shouldshowcellexpansionfor:item:).md)
