Returns all nodes in the node’s child node subtree that satisfy the test applied by a block.
- iOS 8.0+
- macOS 10.8+
- Mac Catalyst 13.0+
- tvOS 9.0+
- watchOS 3.0+
The block to apply to the node’s child and descendant nodes.
The block takes two parameters:
The child node currently being searched.
A reference to a Boolean value. Set
YESin the block to abort further processing of the child node subtree.
The block returns a Boolean value indicating whether to include the
childnode in the search results array.
An array containing nodes that passed the test.
Use this method to search for nodes using a test you specify. For example, you can search for empty nodes using a block that returns YES for nodes whose
geometry properties are all
SceneKit uses a recursive preorder traversal to search the child node subtree—that is, the block searches a node before it searches each of the node’s children, and it searches all children of a node before searching any of that node’s sibling nodes.