Ejemplo n.º 1
0
		public override bool FinishedLaunching (UIApplication app, NSDictionary options)
		{
			window = new UIWindow (UIScreen.MainScreen.Bounds);

			MenuViewController menuViewController = new MenuViewController(UITableViewStyle.Grouped);
			DetailsViewController detailsViewController = new DetailsViewController();
			UINavigationController navController = new UINavigationController (detailsViewController);

			SlideMenuController slideMenuViewController = new SlideMenuController();
			slideMenuViewController.SetContentViewController (navController);
			slideMenuViewController.SetLeftMenuViewController (menuViewController);

			UINavigationController cont = new UINavigationController (new MenuViewController (UITableViewStyle.Plain));

			slideMenuViewController.SetRightMenuViewController (cont);

			if (UIDevice.CurrentDevice.UserInterfaceIdiom == UIUserInterfaceIdiom.Pad) {
				slideMenuViewController.WidthOfPortraitContentViewVisible = 300f;
				slideMenuViewController.WidthOfLandscapeContentViewVisible = 556f;
			}

			window.RootViewController = slideMenuViewController;

			window.BackgroundColor = UIColor.White;
			window.MakeKeyAndVisible ();			
			return true;
		}
Ejemplo n.º 2
0
        public override bool FinishedLaunching(UIApplication app, NSDictionary options)
        {
            window = new UIWindow(UIScreen.MainScreen.Bounds);

            MenuViewController     menuViewController    = new MenuViewController(UITableViewStyle.Grouped);
            DetailsViewController  detailsViewController = new DetailsViewController();
            UINavigationController navController         = new UINavigationController(detailsViewController);

            SlideMenuController slideMenuViewController = new SlideMenuController();

            slideMenuViewController.SetContentViewController(navController);
            slideMenuViewController.SetLeftMenuViewController(menuViewController);

            UINavigationController cont = new UINavigationController(new MenuViewController(UITableViewStyle.Plain));

            slideMenuViewController.SetRightMenuViewController(cont);

            if (UIDevice.CurrentDevice.UserInterfaceIdiom == UIUserInterfaceIdiom.Pad)
            {
                slideMenuViewController.WidthOfPortraitContentViewVisible  = 300f;
                slideMenuViewController.WidthOfLandscapeContentViewVisible = 556f;
            }

            window.RootViewController = slideMenuViewController;

            window.BackgroundColor = UIColor.White;
            window.MakeKeyAndVisible();
            return(true);
        }
Ejemplo n.º 3
0
		public override bool FinishedLaunching (UIApplication app, NSDictionary options)
		{
			window = new UIWindow (UIScreen.MainScreen.Bounds);

			MenuViewController menuViewController = new MenuViewController(UITableViewStyle.Grouped);
			DetailsViewController detailsViewController = new DetailsViewController();

			SlideMenuController slideMenuViewController = new SlideMenuController(menuViewController, detailsViewController);

			window.RootViewController = slideMenuViewController;

			window.BackgroundColor = UIColor.White;
			window.MakeKeyAndVisible ();			
			return true;
		}
Ejemplo n.º 4
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

            var storyboard = UIStoryboard.FromName("Main", null);

            var leftController  = storyboard.InstantiateViewController("NavControllerLeft") as UINavigationController;
            var mainController  = storyboard.InstantiateViewController("NavControllerMain") as UINavigationController;
            var rightController = storyboard.InstantiateViewController("NavControllerRight") as UINavigationController;

            var rootController = mainController.ViewControllers[0];

            rootController.AddLeftBarButtonWithImage(UIImage.FromBundle("menu"));

            slideMenuController = new SlideMenuController(mainController, leftController, rightController);
            slideMenuController.AnimationType = SlideAnimation.Default;
            Window.RootViewController         = slideMenuController;
            Window.MakeKeyAndVisible();

            slideMenuController.RemoveRightGestures();

            return(true);
        }