In my SpriteKit scene I have a pauseView that displays a UIView over the scene, and on the UIView I've created a button in IB to remove the view but when the view disappears, In order to resume the game the user has to hit the pause button a second time. Is there a way to dismiss the view and resume the game?
The pause game method used to display the subview:
-(void)pauseGame {
if (self.gameIsPaused == NO) {
[self.view addSubview:pauseView];
self.gameIsPaused = YES;
self.scene.view.paused = YES;
} else {
self.gameIsPaused = NO;
self.scene.view.paused = NO;
}
}
And in the pause layer:
- (IBAction)resume:(id)sender {
[gameScene pauseGame];
[self removeFromSuperview];
}