---
title: "move(_:to:)"
framework: appkit
role: symbol
role_heading: Instance Method
path: "appkit/nstreecontroller/move(_:to:)-s5xp"
---

# move(_:to:)

Moves the specified tree node to the new index path.

## Declaration

```swift
func move(_ node: NSTreeNode, to indexPath: IndexPath)
```

## Parameters

- `node`: A tree node.
- `indexPath`: An index path specifying the new position in the tree controller’s content.

## See Also

### Adding, inserting and removing objects

- [add(_:)](appkit/nstreecontroller/add(_:).md)
- [addChild(_:)](appkit/nstreecontroller/addchild(_:).md)
- [canAddChild](appkit/nstreecontroller/canaddchild.md)
- [canInsert](appkit/nstreecontroller/caninsert.md)
- [canInsertChild](appkit/nstreecontroller/caninsertchild.md)
- [insert(_:)](appkit/nstreecontroller/insert(_:).md)
- [insertChild(_:)](appkit/nstreecontroller/insertchild(_:).md)
- [insert(_:atArrangedObjectIndexPath:)](appkit/nstreecontroller/insert(_:atarrangedobjectindexpath:).md)
- [insert(_:atArrangedObjectIndexPaths:)](appkit/nstreecontroller/insert(_:atarrangedobjectindexpaths:).md)
- [remove(_:)](appkit/nstreecontroller/remove(_:).md)
- [removeObject(atArrangedObjectIndexPath:)](appkit/nstreecontroller/removeobject(atarrangedobjectindexpath:).md)
- [removeObjects(atArrangedObjectIndexPaths:)](appkit/nstreecontroller/removeobjects(atarrangedobjectindexpaths:).md)
- [move(_:to:)](appkit/nstreecontroller/move(_:to:)-moi9.md)
