Esempio n. 1
0
		public override bool FinishedLaunching (UIApplication app, NSDictionary options)
		{
			var url = NSBundle.MainBundle.PathForResource ("User", "plist");
			var userDictionary = NSDictionary.FromFile (url);
			var user = User.UserWithDictionary (userDictionary);

			var controller = new CustomSplitViewController ();
			controller.Delegate = new SplitViewControllerDelegate ();

			var master = new ListTableViewController (user);
			var masterNav = new CustomNavigationController (master);
			var detail = new EmptyViewController ();

			controller.ViewControllers = new UIViewController[] { masterNav, detail };
			controller.PreferredDisplayMode = UISplitViewControllerDisplayMode.AllVisible;

			var traitController = new TraitOverrideViewController () {
				ViewController = controller
			};

			window = new UIWindow (UIScreen.MainScreen.Bounds);
			window.RootViewController = traitController;
			window.MakeKeyAndVisible ();

			return true;
		}
Esempio n. 2
0
        public override bool FinishedLaunching(UIApplication app, NSDictionary options)
        {
            var url            = NSBundle.MainBundle.PathForResource("User", "plist");
            var userDictionary = NSDictionary.FromFile(url);
            var user           = User.UserWithDictionary(userDictionary);

            var controller = new CustomSplitViewController();

            controller.Delegate = new SplitViewControllerDelegate();

            var master    = new ListTableViewController(user);
            var masterNav = new CustomNavigationController(master);
            var detail    = new EmptyViewController();

            controller.ViewControllers      = new UIViewController[] { masterNav, detail };
            controller.PreferredDisplayMode = UISplitViewControllerDisplayMode.AllVisible;

            var traitController = new TraitOverrideViewController()
            {
                ViewController = controller
            };

            window = new UIWindow(UIScreen.MainScreen.Bounds);
            window.RootViewController = traitController;
            window.MakeKeyAndVisible();

            return(true);
        }