<!--
{
  "availability" : [
    "macOS: -"
  ],
  "documentType" : "symbol",
  "framework" : "AppKit",
  "identifier" : "/documentation/AppKit/NSOutlineViewDelegate/outlineView(_:willDisplayOutlineCell:for:item:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "AppKit"
    ],
    "preciseIdentifier" : "c:objc(pl)NSOutlineViewDelegate(im)outlineView:willDisplayOutlineCell:forTableColumn:item:"
  },
  "title" : "outlineView(_:willDisplayOutlineCell:for:item:)"
}
-->

# outlineView(_:willDisplayOutlineCell:for:item:)

Informs the delegate that an outline view is about to display a cell used to draw the expansion symbol.

```
@MainActor optional func outlineView(_ outlineView: NSOutlineView, willDisplayOutlineCell cell: Any, for tableColumn: NSTableColumn?, item: Any)
```

## Parameters

`outlineView`

The outline view that sent the message.

`cell`

The cell.

`tableColumn`

The table column.

`item`

The item.

## Discussion

Informs the delegate that `outlineView` is about to display `cell`—an expandable cell (a cell that has the expansion symbol)—for the column and item specified by `tableColumn` and `item`. The delegate can modify cell to alter its display attributes.

This method is not invoked when `outlineView` is about to display a non-expandable cell.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)