예제 #1
0
 public void SetSplitViewController(MGSplitViewController controller)
 {
     if (controller != _splitViewController)
     {
         _splitViewController = controller;
         SetNeedsDisplay();
     }
 }
예제 #2
0
        public MGSplitDividerView(MGSplitViewController splitViewController)
        {
            SplitViewController = splitViewController;

            // TODO: set up options for this!!!
            //			AllowsDragging = TouchFactory.Instance.AllowSplitViewResizing;
            //
            ContentMode = UIViewContentMode.Redraw;
        }
예제 #3
0
        public MGSplitDividerView(MGSplitViewController splitViewController)
        {
            SplitViewController = splitViewController;

// TODO: set up options for this!!!
//			AllowsDragging = TouchFactory.Instance.AllowSplitViewResizing;
//
            ContentMode = UIViewContentMode.Redraw;
        }
예제 #4
0
        public MGDetailViewController(MGSplitViewController splitController)
        {
            this.splitController = splitController;

            toolbar                = new UIToolbar();
            toggleItem             = new UIBarButtonItem();
            verticalItem           = new UIBarButtonItem();
            dividerStyleItem       = new UIBarButtonItem();
            masterBeforeDetailItem = new UIBarButtonItem();
        }
예제 #5
0
        public MGDetailViewController(MGSplitViewController splitController)
        {
            this.splitController = splitController;

            toolbar = new UIToolbar();
            toggleItem = new UIBarButtonItem();
            verticalItem = new UIBarButtonItem();
            dividerStyleItem = new UIBarButtonItem();
            masterBeforeDetailItem = new UIBarButtonItem();
        }
예제 #6
0
 new void SplitViewController(MGSplitViewController svc, UIViewController viewController,
                              UIBarButtonItem barButtonItem, UIPopoverController pc)
 {
     if (barButtonItem != null)
     {
         barButtonItem.Title = "Popover";
         UIBarButtonItem[] items = toolbar.Items;
         items[0] = barButtonItem;
         toolbar.SetItems(items, true);
     }
     popoverController = pc;
 }
예제 #7
0
        public void Init(UIViewController viewController)
        {
            _masterNavigationController = new UINavigationController(viewController);


            if (IsTablet && _tabletOptions.TabletLayout == TabletLayout.MasterPane)
            {
                // toss a generic view in the detail pane
                _splashViewController       = new SplashViewController(_options.SplashBitmap);
                _detailNavigationController = new UINavigationController(_splashViewController);

                // initialize the SplitPane
                _splitViewController = new MGSplitViewController();
                // added the following to set RootViewController

                _splitViewController.SetViewControllers(new UIViewController[2] {
                    _masterNavigationController, _detailNavigationController
                });
                _splitViewController.SetShowsMasterInPortrait(_tabletOptions.MasterShowsinPotrait);
                _splitViewController.SetShowsMasterInLandscape(_tabletOptions.MasterShowsinLandscape);
                _splitViewController.SetMasterBeforeDetail(_tabletOptions.MasterBeforeDetail);
                if (_tabletOptions.AllowDividerResize)
                {
                    _splitViewController.SetDividerStyle(MGSplitViewDividerStyle.PaneSplitter);
                }
                else
                {
                    _splitViewController.SetDividerStyle(MGSplitViewDividerStyle.Thin);
                }

                if (_window != null)
                {
                    _window.RootViewController = _splitViewController;
                }


                // primary view with be the split view
                this.View = _splitViewController.View;

                if (_options.NavigationBarTintColor != UIColor.Clear)
                {
                    _masterNavigationController.NavigationBar.TintColor = _options.NavigationBarTintColor;
                    _detailNavigationController.NavigationBar.TintColor = _options.NavigationBarTintColor;
                }
            }
            else
            {
                // we are an iPhone, skip the split view and use the navigation controller instead!
                this.View = _masterNavigationController.View;
                _window.RootViewController = _masterNavigationController;
            }
        }
예제 #8
0
        // Called when the view is shown again in the split view, invalidating the button and popover controller.
        new void SplitViewController(MGSplitViewController svc, UIViewController viewController, UIBarButtonItem barButtonItem)
        {
            if (barButtonItem != null)
            {
                UIBarButtonItem[] items = toolbar.Items;

                for (int i = 0; i < items.Length; i++)
                {
                    if (items[i] == barButtonItem)
                    {
                        items[i] = null;
                    }
                }

                toolbar.SetItems(items, true);
            }
            popoverController = null;
        }
예제 #9
0
 new void SplitViewController(MGSplitViewController svc, bool isVertical)
 {
 }
예제 #10
0
 new void SplitViewController(MGSplitViewController svc, UIPopoverController pc, UIViewController viewController)
 {
 }
예제 #11
0
        new void SplitViewController(MGSplitViewController svc, UIViewController viewController,
		                         UIBarButtonItem barButtonItem, UIPopoverController pc)
        {
            if (barButtonItem != null) {
                barButtonItem.Title = "Popover";
                UIBarButtonItem[] items = toolbar.Items;
                items[0] = barButtonItem;
                toolbar.SetItems(items, true);
            }
            popoverController = pc;
        }
예제 #12
0
 new void SplitViewController(MGSplitViewController svc, UIPopoverController pc, UIViewController viewController)
 {
 }
예제 #13
0
        // Called when the view is shown again in the split view, invalidating the button and popover controller.
        new void SplitViewController(MGSplitViewController svc, UIViewController viewController, UIBarButtonItem barButtonItem)
        {
            if (barButtonItem != null) {
                UIBarButtonItem[] items = toolbar.Items;

                for(int i = 0; i < items.Length; i++)
                    if (items[i] == barButtonItem) items[i] = null;

                toolbar.SetItems(items, true);
            }
            popoverController = null;
        }
예제 #14
0
        public void Init(UIViewController viewController)
        {
            _masterNavigationController = new UINavigationController(viewController);

            if (IsTablet && _tabletOptions.TabletLayout == TabletLayout.MasterPane)
            {
                // toss a generic view in the detail pane
                _splashViewController = new SplashViewController(_options.SplashBitmap);
                _detailNavigationController = new UINavigationController(_splashViewController);

                // initialize the SplitPane
                _splitViewController = new MGSplitViewController();
                // added the following to set RootViewController

                _splitViewController.SetViewControllers(new UIViewController[2] { _masterNavigationController, _detailNavigationController });
                _splitViewController.SetShowsMasterInPortrait(_tabletOptions.MasterShowsinPotrait);
                _splitViewController.SetShowsMasterInLandscape(_tabletOptions.MasterShowsinLandscape);
                _splitViewController.SetMasterBeforeDetail(_tabletOptions.MasterBeforeDetail);
                if (_tabletOptions.AllowDividerResize)
                    _splitViewController.SetDividerStyle(MGSplitViewDividerStyle.PaneSplitter);
                else
                    _splitViewController.SetDividerStyle(MGSplitViewDividerStyle.Thin);

                if (_window != null)
                    _window.RootViewController = _splitViewController;

                // primary view with be the split view
                this.View = _splitViewController.View;

                if (_options.NavigationBarTintColor != UIColor.Clear)
                {
                    _masterNavigationController.NavigationBar.TintColor = _options.NavigationBarTintColor;
                    _detailNavigationController.NavigationBar.TintColor = _options.NavigationBarTintColor;
                }
            }
            else
            {
                // we are an iPhone, skip the split view and use the navigation controller instead!
                this.View = _masterNavigationController.View;
                _window.RootViewController = _masterNavigationController;
            }
        }
예제 #15
0
 new void SplitViewController(MGSplitViewController svc, bool isVertical)
 {
 }
예제 #16
0
 new void SplitViewController(MGSplitViewController svc, float position)
 {
 }
예제 #17
0
 new float SplitViewController(MGSplitViewController svc, float proposedPosition, SizeF viewSize)
 {
     return proposedPosition;
 }
예제 #18
0
 new void SplitViewController(MGSplitViewController svc, float position)
 {
 }
예제 #19
0
 new float SplitViewController(MGSplitViewController svc, float proposedPosition, SizeF viewSize)
 {
     return(proposedPosition);
 }
예제 #20
0
 public void SetSplitViewController(MGSplitViewController controller)
 {
     if (controller != _splitViewController) {
         _splitViewController = controller;
         SetNeedsDisplay();
     }
 }