How to call method from ViewController in GameScene
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I have a method that has a custom segue in my viewController that looks like this: func gameOver() { performSegueWithIdentifier("GameOver", sender: nil) } I call the method like so in GameScene.swift: GameViewController().gameOver() I double checked the segue name and it is correct. Whenever I call this in my GameScene.swift file I get the SIGABRT message and I don't know why. I tried calling the function with only a println() message and it worked. Any advice on why this is occurring and how I can successfully call the method in the