I am trying to prototype a game with SpriteKit with Swift in the playground .
I'm having difficulty getting custom callback requests to work.
Here is what I am trying:
let view:SKView = SKView(frame: CGRectMake(0, 0, 320, 586)) XCPShowView("Live view", view) class PrototypeScene: SKScene { override func didMoveToView(view: SKView) { self.userInteractionEnabled = true } override func touchesBeganWithEvent(event: NSEvent!) { println("Hello touches") } } let scene:PrototypeScene = PrototypeScene(size: CGSizeMake(320, 586)) scene.scaleMode = SKSceneScaleMode.AspectFit view.presentScene(scene)
I do not receive callbacks for the chain of responders. How can I enable this?
source share