void AddNavigationController( ) { // Create a viewcontroller var vc = new TestViewController ( "View" ); vc.WantsFullScreenLayout = true; vc.View.BackgroundColor = UIColor.Blue; // Add the navigation view, which holds the RootController, to the Window NavigationController = new UINavigationController ( vc ); mWindow.AddSubview ( NavigationController.View ); // You only have a few seconds to get everything done and call this or iOS will kill your app mWindow.MakeKeyAndVisible ( ); }
void ForwardClicked( object sender, EventArgs args ) { var nextViewController = new TestViewController ( mMsg ); nextViewController.WantsFullScreenLayout = true; nextViewController.View.BackgroundColor = UIColor.Blue; // Make your next view and push it onto the NavControllers stack NavigationController.PushViewController ( nextViewController, true ); }