How can I bring a SKSpriteNode to the front of all other node?
With UIView, I can use bringSubviewToFront to bring an uiview in front of other views.
This extension adds a bringToFront method to SKNode. This great for times when zPosition is inappropriate, and you want to rely on sibling ordering.
bringToFront
zPosition
extension SKNode { func bringToFront() { guard let parent = parent else { return } removeFromParent() parent.addChild(self) } }
`