sprite kit remove child code example
Example: remove child from scene swift
if let child = self.childNode(withName: "object") as? SKSpriteNode {
child.removeFromParent()
}
if let child = self.childNode(withName: "object") as? SKSpriteNode {
child.removeFromParent()
}