I'm developing an iOS app and i want to switch between two separate ViewController and close the first one.
i tried this code snippet
NavigationController.PushViewController (new MainController (), true);
where MainController is the second ViewController, but i get always 'System.NullReferenceException: Object reference not set to an instance of an object '
How can i do the switching?