I have not been able to get this gesture to respond, at all.
self.isUserInteractionEnabled = true
let tap = UITapGestureRecognizer(target: self, action: #selector(self.movePlayer(_:)))
tap.allowedPressTypes = [NSNumber(value: UIPressType.playPause.rawValue)]
view?.addGestureRecognizer(tap)
and the function:
func movePlayer(_ sender: UITapGestureRecognizer){
player.run(SKAction.moveBy(x: 200, y: 0, duration: 10))
print("Right!")
}
nothing at all happens when pressing the play button on the simulator remote. What am I missing?