In your scene or view, you should be able to handle pause by adding an observer to it
NSNotificationCenter.defaultCenter().addObserver(self,selector:Selector("pauseGame:",name:"Pause",object:nil)
Then you add a function to handle this
func pauseGame(notification:NSNotification)
{
self.paused = true;
}
Now keep in mind I have found that in iOS 8 there is a bug where CBApplicationDidBecomeActive can cause undesirable results, so you need to override this in your SKView's class like this:
class GameSceneView : SKView
{
...//Other Code
func CBApplicationDidBecomeActive()
{
}
}
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…