<!--
{
  "availability" : [
    "macOS: 10.5.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "AppKit",
  "identifier" : "/documentation/AppKit/NSTreeNode/descendant(at:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "AppKit"
    ],
    "preciseIdentifier" : "c:objc(cs)NSTreeNode(im)descendantNodeAtIndexPath:"
  },
  "title" : "descendant(at:)"
}
-->

# descendant(at:)

Returns the receiver’s descendant at the specified index path.

```
func descendant(at indexPath: IndexPath) -> NSTreeNode?
```

## Parameters

`indexPath`

An index path specifying a descendant of the receiver.

## Return Value

A tree node, or `nil` if the node does not exist.

## Discussion

---

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)