Removes a child from the node’s array of children and inserts another node in its place.
- iOS 8.0+
- macOS 10.8+
- Mac Catalyst 13.0+
- tvOS 9.0+
- watchOS 3.0+
The existing child node to be replaced.
The node with which to replace the child node.
If both the
new nodes are children of the node, calling this method swaps their positions in the array. Note that removing a node from the node hierarchy may result in it being deallocated.
Calling this method results in undefined behavior if the
old parameter doesn’t refer to a child of this node.