UINavigationController is NULL

Hi guys,

I am writing an application using Xamarin.IOS and I am trying to implement the Navigation logic which will check whether user is logged in and then decide which view I should display.

As a root in my Main.Storyboard I have MyNavigationController which is inherited from UINavigationController. In the ViewWillAppear of this controller I am checking the Login status and I want to push the next view using:

NavigationController.PushViewController(_loginView, false);

But my NavigationController is null.

As I understood, since I have set UINavigationController as a Initial Controller and using the controller class generated after specifying the name of it, property "NavigationController" of UINavigationController should be initialized automatically.

Please help me to understand why this property is null.

Thanks for your help!

Best Answer

Answers

  • IlliaGryshkevychIlliaGryshkevych USMember ✭✭
    Thanks Joe
    That is what I was looking for
Sign In or Register to comment.