One example might be to detect a node by its assigned name
override func touchesBegan(_ touches: Set, with event: UIEvent?) { for touch in touches { let location = touch.location(in: self) if atPoint(location).name == "Play" { // do stuff for node with the name "Play" } } }
The function, atPoint, returns a SKNode or property of a node, e.g. name. More information at Help: Instance Method: atPoint(_ p: CGPoint)