Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Remove SKNode children whose names match the search parameter.
import SpriteKit
extension SKNode {
public func removeChildrenWithName(name: String) {
enumerateChildNodesWithName(name) { (node, stop) -> Void in
node.removeFromParent()
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.