<!--
{
  "availability" : [
    "macOS: -"
  ],
  "documentType" : "symbol",
  "framework" : "AppKit",
  "identifier" : "/documentation/AppKit/NSOutlineView/parent(forItem:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "AppKit"
    ],
    "preciseIdentifier" : "c:objc(cs)NSOutlineView(im)parentForItem:"
  },
  "title" : "parent(forItem:)"
}
-->

# parent(forItem:)

Returns the parent for a given item.

```
func parent(forItem item: Any?) -> Any?
```

## Parameters

`item`

The item for which to return the parent.

## Return Value

The parent for `item`, or `nil` if the parent is the root.

---

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)