问题
let reveal = SKTransition.doorwayWithDuration(0.5)
reveal.pausesIncomingScene = false
reveal.pausesOutgoingScene = true
//self.skView!.presentScene(self.gameOverMenu!, transition: reveal)
self.skView!.presentScene(self.gameOverMenu)
That is the portion of code I'm using to present the new scene. The skView already has a scene running, I'm doing this from the view controller. When I do present scene it all works fine. But when I try to add the transition the new scene never shows up. The transition property of the view updates and so does the incoming and outgoing scene property. Any ideas?
Edit: It seems to be an issue with segueing from another VC to the current VC. If I remove my original landing VC and start the app at the VC that has the spritekit view, everything works normally. Now to either redesign how I am doing things, or figure out why moving to a new VC makes transitions stop working.
来源:https://stackoverflow.com/questions/35713804/in-spritekit-presentscene-transition-wont-work-however-presentscene-does