Removes the receiving node from its parent.
SDKs
- iOS 7.0+
- macOS 10.9+
- Mac Catalyst 13.0+
- tvOS 9.0+
- watchOS 3.0+
Framework
- Sprite
Kit
Declaration
func removeFromParent()
Removes the receiving node from its parent.
SDKs
Framework
func removeFromParent()
See the objects and functions you use to control the node tree's composition.
func add Child(SKNode)
Adds a node to the end of the receiver’s list of child nodes.
func insert Child(SKNode, at: Int)
Inserts a node into a specific position in the receiver’s list of child nodes.
func is Equal(to: SKNode) -> Bool
Compares the parameter node to the receiving node.
func move(to Parent: SKNode)
Moves the node to a new parent node in the scene.
func remove All Children()
Removes all of the node’s children.
func remove Children(in: [SKNode])
Removes a list of children from the receiving node.
func in Parent Hierarchy(SKNode) -> Bool
Returns a Boolean value that indicates whether the node is a descendant of the target node.