---
title: "inParentHierarchy(_:)"
framework: spritekit
role: symbol
role_heading: Instance Method
path: "spritekit/sknode/inparenthierarchy(_:)"
---

# inParentHierarchy(_:)

Returns a Boolean value that indicates whether the node is a descendant of the target node.

## Declaration

```swift
func inParentHierarchy(_ parent: SKNode) -> Bool
```

## Parameters

- `parent`: An SKNode object to test against.

## Return Value

Return Value true if the node is a descendant of the parent node; otherwise false.

## See Also

### Modifying the Node Tree

- [Accessing and Modifying the Node Tree](spritekit/accessing-and-modifying-the-node-tree.md)
- [addChild(_:)](spritekit/sknode/addchild(_:).md)
- [insertChild(_:at:)](spritekit/sknode/insertchild(_:at:).md)
- [isEqual(to:)](spritekit/sknode/isequal(to:).md)
- [move(toParent:)](spritekit/sknode/move(toparent:).md)
- [removeFromParent()](spritekit/sknode/removefromparent().md)
- [removeAllChildren()](spritekit/sknode/removeallchildren().md)
- [removeChildren(in:)](spritekit/sknode/removechildren(in:).md)
