I am creating an application using xamarin.ios. I have some pages in my storyboard and I have set "Is initial View Controller" for one of the pages as the first page. Users see that page as the first page if they already logged in otherwise I want to show the login page. To do that I added this code:
[Export ("application:didFinishLaunchingWithOptions:")]
public bool FinishedLaunching (UIApplication application, NSDictionary launchOptions)
{
this.Window = new UIWindow(UIScreen.MainScreen.Bounds);
LoginViewController yourViewController = UIStoryboard.FromName("Main", NSBundle.MainBundle).InstantiateViewController("LoginViewController") as LoginViewController;
this.Window.RootViewController = yourViewController;
this.Window.MakeKeyAndVisible();
return true;
}
The problem is, this code cannot change the first page at all. It seems my application always ignore this code and shows the page with "Is Initial View controller" equals true on storyboard. It means when I change first page on storyboard I see the change but no change when I set it in my code.