<!--
{
  "availability" : [
    "macOS: -"
  ],
  "documentType" : "symbol",
  "framework" : "AppKit",
  "identifier" : "/documentation/AppKit/NSTreeController/insert(_:atArrangedObjectIndexPath:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "AppKit"
    ],
    "preciseIdentifier" : "c:objc(cs)NSTreeController(im)insertObject:atArrangedObjectIndexPath:"
  },
  "title" : "insert(_:atArrangedObjectIndexPath:)"
}
-->

# insert(_:atArrangedObjectIndexPath:)

Inserts `object` into the tree controller’s arranged objects array at the location specified by `indexPath`, and adds it to the tree controller’s content.

```
func insert(_ object: Any?, atArrangedObjectIndexPath indexPath: IndexPath)
```

---

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)