public void SetSplitViewController(MGSplitViewController controller) { if (controller != _splitViewController) { _splitViewController = controller; SetNeedsDisplay(); } }
public MGSplitDividerView(MGSplitViewController splitViewController) { SplitViewController = splitViewController; // TODO: set up options for this!!! // AllowsDragging = TouchFactory.Instance.AllowSplitViewResizing; // ContentMode = UIViewContentMode.Redraw; }
public MGDetailViewController(MGSplitViewController splitController) { this.splitController = splitController; toolbar = new UIToolbar(); toggleItem = new UIBarButtonItem(); verticalItem = new UIBarButtonItem(); dividerStyleItem = new UIBarButtonItem(); masterBeforeDetailItem = new UIBarButtonItem(); }
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; }
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; } }
// 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; }
new void SplitViewController(MGSplitViewController svc, bool isVertical) { }
new void SplitViewController(MGSplitViewController svc, UIPopoverController pc, UIViewController viewController) { }
// 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; }
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; } }
new void SplitViewController(MGSplitViewController svc, float position) { }
new float SplitViewController(MGSplitViewController svc, float proposedPosition, SizeF viewSize) { return proposedPosition; }
new float SplitViewController(MGSplitViewController svc, float proposedPosition, SizeF viewSize) { return(proposedPosition); }