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

# outlineViewSelectionDidChange(_:)

Invoked when the selection did change notification is posted—that is, immediately after the outline view’s selection has changed.

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

## Parameters

`notification`

The posted notification.

## Discussion

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

---

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)