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

            var controller = new CustomSplitViewController();

            controller.Delegate = new SplitViewControllerDelegate();

            var master    = new AAPLListTableViewController(user);
            var masterNav = new CustomNavigationController(master);
            var detail    = new AAPLEmptyViewController();

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

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

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

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

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

            var master = new AAPLListTableViewController (user);
            var masterNav = new CustomNavigationController (master);
            var detail = new AAPLEmptyViewController ();

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

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

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

            return true;
        }