I have created a Home screen that has a button on that displays a Game screen when it is pushed. My AppDelegate declares a Navigation controler and wires up the HomeScreen to the NavigationController using the code below.
var rootNavigationController = new UINavigationController ();
HomeScreen homeScreen = new HomeScreen ();
rootNavigationController.PushViewController (homeScreen, false);
this.window.RootViewController = rootNavigationController;
In the Home screen , I have code like this to display the Game Screen.
if(this.gameScreen == null)
this.gameScreen = new GameScreen();
this.NavigationController.PushViewController (this.gameScreen , true);
I have some initialisation code in the Game Screen and I do it in the ViewDidAppear override function. So, anytime I am moving from the Home Screen to the Game screen I would expect the ViewDidAppear function to be called. This seems to work fine in the simulator (I can debug and see the code jump into the ViewDidAppear function every time I move from the Home to Game Screen). BUT, on the actual IOS device, this ViewDidAppear code is not called when I go back into the Game screen.
Just wondering if I have missed something here that is not allowing the ViewDidAppear code to fire on the actual device? Also, why is this behaviour different on the device compared to the Simulator?
Thanks for any help