I have 2 tabs and on the view I have a game view. As I move from one tab to another, the game view disappears. ViewDidDisappear
method is called. How to resolve this?
public override void ViewWillAppear(bool animated) {
base.ViewWillAppear(animated);
if (gameView != null) {
gameScene = new CCScene(gameView);
gameScene.AddLayer(new GameLayer());
if (gameView.Director.RunningScene != null) {
gameView.Director.PopScene();
}
gameView.RunWithScene(gameScene);
}
}
public override void ViewDidDisappear(bool animated) {
if (gameView != null) {
gameView.Paused = true;
}
}