Search code examples
swiftnodescontainsenumeratechild-nodes

Swift - enumerateChildNodesWithName with name containing a string


I would like to use enumerateChildNodesWithName but enumerateChildNodesWithName containing another string, is there any way to do that?


Solution

  • I found the solution:

    enumerateChildNodesWithName("*") { node, _ in
    if node.name == "string" {
        // do anything
    }}