All I want if for when the user touches a skspritenode in the skscene, it will go to a different view like performseguewithidentifier. Thanks for any help. I ca
ZeMoon, nice answer, but what if multiple scenes want to show the same view controller, for example some settings screen? You don't want to define multiple scene delegate protocols that do the same thing.
Another idea is to define a single protocol which handles the presentation of different view controllers for you:
@protocol ScreenFlowController
- (void)presentSettingsScreenFromScene:(SKScene *)scene;
- (void)presentCreditsScreenFromScene:(SKScene *)scene;
@end
The scene parameter might be used to make decisions based on where you are coming from.
The view controller of your game (or any other object) implements the protocol. All scenes that display a different screen receive a weak reference to the controller:
@property (nonatomic, weak) id screenFlowController;