CFTreeInsertSibling(_:_:)
Inserts a new sibling after a given tree.
Declaration
func CFTreeInsertSibling(_ tree: CFTree!, _ newSibling: CFTree!)Parameters
- tree:
The tree after which to insert
newSibling.treemust have a parent. - newSibling:
The sibling to add.
newSiblingmust not have a parent.
Discussion
When a child tree is added to another tree, the child tree is retained by its new parent.
If you want to manipulate an existing tree structure, since newSibling must not have a parent you need to remove a tree from its parent in order to move it to a new position. If you do this, you should retain the tree before you actually remove it from its parent (see CFTreeRemove(_:)).