<!--
{
  "availability" : [
    "macOS: 10.5.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "AppKit",
  "identifier" : "/documentation/AppKit/NSTreeNode/init(representedObject:)",
  "metadataVersion" : "0.1.0",
  "role" : "Initializer",
  "symbol" : {
    "kind" : "Initializer",
    "modules" : [
      "AppKit"
    ],
    "preciseIdentifier" : "c:objc(cs)NSTreeNode(im)initWithRepresentedObject:"
  },
  "title" : "init(representedObject:)"
}
-->

# init(representedObject:)

Initializes a newly allocated tree node that represents the specified object.

```
init(representedObject modelObject: Any?)
```

## Parameters

`modelObject`

The object the tree node represents.

## Return Value

An initialized tree node that represents `modelObject`.

## 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)