private void ResetRootViewController() { var authManager = ServiceContainer.Resolve <AuthManager> (); UIViewController vc = null; bool emptyStack = ViewControllers.Length < 1; if (authManager.IsAuthenticated && (emptyStack || ViewControllers [0] is WelcomeViewController)) { vc = new LogViewController(); } else if (emptyStack || !(ViewControllers [0] is WelcomeViewController)) { vc = new WelcomeViewController(); } if (vc != null) { SetViewControllers(new [] { vc }, ViewControllers.Length > 0); } }
private void ResetRootViewController () { var authManager = ServiceContainer.Resolve<AuthManager> (); UIViewController vc = null; bool emptyStack = ViewControllers.Length < 1; if (authManager.IsAuthenticated && (emptyStack || ViewControllers [0] is WelcomeViewController)) { vc = new LogViewController (); } else if (emptyStack || ! (ViewControllers [0] is WelcomeViewController)) { vc = new WelcomeViewController (); } if (vc != null) { SetViewControllers (new [] { vc }, ViewControllers.Length > 0); } }