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

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

Informs the delegate that the cell specified by the column and item will be displayed.

```
@MainActor optional func outlineView(_ outlineView: NSOutlineView, willDisplayCell 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

The delegate can implement this method to modify `cell` to provide further setup for the `cell` in `tableColumn` and `item`. It is not safe to do drawing inside this method—you should only set up state for `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)