I\'m working with sprite kit and if the user touches the screen, the actions within
override func touchesBegan(touches: NSSet, withEvent event: UIEvent) {
To disable user interaction app-wide, use:
UIApplication.shared.beginIgnoringInteractionEvents()
UIApplication.shared.endIgnoringInteractionEvents()
(as of Swift 5 this is deprecated)
Try to get the view from the touch object and then dissable the user interaction on it.
touch.view.isUserInteractionEnabled = false