Beispiel #1
0
        public override void ViewDidLoad()
        {
            base.ViewDidLoad();
            // Enable back navigation using swipe.
            NavigationController.InteractivePopGestureRecognizer.Delegate = null;

            new AppDelegate().disableAllOrientation = true;
            SidebarController = ((AppDelegate)UIApplication.SharedApplication.Delegate).SideBarController;
            UIStoryboard           sb        = UIStoryboard.FromName("Main", NSBundle.MainBundle);
            SideMenuViewController menuVC    = (SideMenuViewController)sb.InstantiateViewController(nameof(SideMenuViewController));
            QRViewController       contentVC = (QRViewController)sb.InstantiateViewController(nameof(QRViewController));

            View.BackgroundColor           = UIColor.FromRGB(36, 43, 52);
            SidebarController              = new SidebarController(this, contentVC, menuVC);
            SidebarController.MenuLocation = MenuLocations.Left;
            SidebarController.MenuWidth    = Convert.ToInt32(View.Frame.Width - Convert.ToInt32(View.Frame.Width) / 6);
            SidebarController.Sidebar.GestureActiveArea = SidebarController.MenuWidth;
            contentVC.SideBarController = SidebarController;
            contentVC.holderVC          = this;
        }
Beispiel #2
0
 public static void close_menu()
 {
     try { QRViewController.clear_current_card_name_and_pos(); } catch { }
     try { RootQRViewController.SidebarController.ToggleMenu(); } catch { }
     try { RootMyCardViewController.SidebarController.ToggleMenu(); } catch { }
 }