The error tells you what exactly is happening.
Warning: Attempt to present <AppName.PauseScreen: 0x7fae61fe5ff0> on <AppName.StartScreenViewController: 0x7fae61f79980> whose view is not in the window hierarchy!
(UIApplication.sharedApplication().delegate as AppDelegate).window?.rootViewController points to an instance of StartScreenViewController . This is bad: rootViewController should point to an instance of GameScene .
The root cause should be how GameScene is GameScene . From your description:
"StartScreenViewController" is the view controller ... Then it goes to "GameScene" ...
That should be your problem. How do you navigate to GameScene from StartScreenViewController ?
I assume that you are adding a new window to the application. You need to install rootViewController .
let gameScene = UIStoryboard(name: "Main", bundle:nil).instantiateViewControllerWithIdentifier("GameSceneID") as UIViewController let appDelegate = (UIApplication.sharedApplication().delegate as AppDelegate) appDelegate.window?.rootViewController = gameScene
When you return to the start screen, you will install rootViewController again.
let initialViewController = UIStoryboard(name: "Main", bundle:nil).instantiateInitialViewController() as UIViewController let appDelegate = (UIApplication.sharedApplication().delegate as AppDelegate) appDelegate.window?.rootViewController = initialViewController
You can use transitionFromViewController(,toViewController:, duration:, options:, animations:, completion:) to animate the settings of the root view controller.
source share