---
title: "insertChild(_:at:)"
framework: spritekit
role: symbol
role_heading: Instance Method
path: "spritekit/sknode/insertchild(_:at:)"
---

# insertChild(_:at:)

Inserts a node into a specific position in the receiver’s list of child nodes.

## Declaration

```swift
func insertChild(_ node: SKNode, at index: Int)
```

## Parameters

- `node`: The node to add. The node must not already have a parent.
- `index`: The position in the array to insert the node.

## Mentioned in

Accessing and Modifying the Node Tree

## 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)
- [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)
- [inParentHierarchy(_:)](spritekit/sknode/inparenthierarchy(_:).md)
