Esempio n. 1
0
        public override void ViewDidLoad()
        {
            base.ViewDidLoad();
            this.NavigationController.NavigationBar.Hidden = true;
            this.submitBtn.TouchUpInside += (sender, e) =>
            {
                BaseNavigationController nav =
                    new BaseNavigationController(new HomeVC(false, true));


                MainDelegate.MainNavController         = nav;
                MainDelegate.Window.RootViewController = MainDelegate.MainNavController;
            };
        }
        /// <summary>
        /// Ons the menu item click.
        /// </summary>
        /// <param name="currentIndex">Current index.</param>
        /// <param name="menuCell">Menu cell.</param>
        /// <param name="oldInd">Old ind.</param>
        void OnMenuItemClick(int currentIndex, MenuCell menuCell, int oldInd)
        {
            HideSideBar();
            SecondVC home       = new SecondVC(false, true);
            var      window     = UIApplication.SharedApplication.KeyWindow;
            var      controller = (UINavigationController)window.RootViewController;

            if (controller != null && !(controller.TopViewController is SecondVC))
            {
                foreach (var viewController in controller.ViewControllers)
                {
                    if (viewController is SecondVC)
                    {
                        home.SelectedTabIndex = ((SecondVC)viewController).SelectedTabIndex;
                    }
                }
                BaseNavigationController nav =
                    new BaseNavigationController(home);
                this.MainDelegate.MainNavController         = nav;
                this.MainDelegate.Window.RootViewController = this.MainDelegate.MainNavController;
            }
        }