You cannot imagine the viewController from SKScene, since it is actually displayed only in SKView. You need to send a message to the SKView viewController, which in turn will present the viewController. You can use delegation or NSNotificationCenter for this.
Delegation
Add the following protocol definition to your SKScene.h file:
@protocol sceneDelegate <NSObject> -(void)showDifferentView; @end
And declare a delegate property in the interface:
@property (weak, nonatomic) id <sceneDelegate> delegate;
Then, at the moment you want to present a common screen, use this line:
[self.delegate showDifferentView]
Now, in your viewController.h file, execute the protocol:
@interface ViewController : UIViewController <sceneDelegate>
And in your .m file, add the following line before presenting the scene:
scene.delegate = self;
Then add the following method:
-(void)showDifferentView { [self performSegueWithIdentifier:@"whateverIdentifier"]; }
NSNotificationCenter
Save the -showDifferentView method as described in the previous alternative.
Add viewController as a listener for notification in it -viewDidLoad:
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(showDifferentView) name:@"showDifferenView" object:nil];
Then in the scene at the point where you want to display this viewController, use this line:
[[NSNotificationCenter defaultCenter] postNotificationName:@"showDifferentView" object:nil];