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

# outlineViewItemDidCollapse(_:)

Invoked when the did collapse notification is posted—that is, whenever the user collapses an item in the outline view.

```
@MainActor optional func outlineViewItemDidCollapse(_ notification: Notification)
```

## Parameters

`notification`

The posted notification.

## Discussion

This method is invoked as a result of posting an [`itemDidCollapseNotification`](/documentation/AppKit/NSOutlineView/itemDidCollapseNotification).

---

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)