Exemplo n.º 1
0
        public void LoginViewController_OnLoginSuccess(object sender, EventArgs e)
        {
            //We have successfully Logged In
            var mainViewController = ViewControllersHelper.GetViewController(ViewControllersHelper.MainStoryboard, "MainTabBarController");

            SetRootViewController(mainViewController, true);
        }
Exemplo n.º 2
0
        public override bool FinishedLaunching(UIApplication application, NSDictionary launchOptions)
        {
            // Override point for customization after application launch.
            // If not required for your application you can safely delete this method

            global::Xamarin.Forms.Forms.Init();

            if (AppSettingsHelper.IsAuthAccessTokenSet)
            {
                isAuthenticated = true;
            }

            //isAuthenticated can be used for an auto-login feature, you'll have to implement this
            //as you see fit or get rid of the if statement if you want.
            if (isAuthenticated)
            {
                //We are already authenticated, so go to the main tab bar controller;
                var tabBarController = ViewControllersHelper.GetViewController(ViewControllersHelper.MainStoryboard, "MainTabBarController");
                SetRootViewController(tabBarController, false);
            }
            else
            {
                var introViewController = ViewControllersHelper.GetViewController(ViewControllersHelper.MainStoryboard, "IntroViewController") as IntroViewController;
                SetRootViewController(introViewController, false);
            }

            UINavigationBar.Appearance.TintColor           = UIColor.White;
            UINavigationBar.Appearance.BarTintColor        = Constants.UIColorFromRGB(0xffffff);
            UINavigationBar.Appearance.TitleTextAttributes = new UIStringAttributes()
            {
                ForegroundColor = UIColor.Black
            };

            return(true);
        }