public MainSplitView() : base() { MasterViewHidden = true; // create our master and detail views masterViewController = new Screens.iPad.NavTable.MasterNavTableViewController(); detailViewController = new Screens.iPad.BasicUIViewAnimation.BasicUIViewAnimationScreen(); // create an array of controllers from them and then assign it to the // controllers property ViewControllers = new UIViewController[] { masterViewController, detailViewController }; // in this example, i expose an event on the master view called RowClicked, and i listen // for it in here, and then call a method on the detail view to update. this class thereby // becomes the defacto controller for the screen (both views). masterViewController.RowClicked += (sender, e) => { HandleRowClicked(e); }; // when the master view controller is hid (portrait mode), we add a button to // the detail view that when clicked will show the master view in a popover controller WillHideViewController += (sender, e) => { toggleMasterVisible = e.BarButtonItem.Action; }; ShouldHideViewController = (svc, vc, orientation) => { return(MasterViewHidden && (orientation == UIInterfaceOrientation.Portrait || orientation == UIInterfaceOrientation.PortraitUpsideDown)); }; }
public MainSplitView () : base () { MasterViewHidden = true; // create our master and detail views masterViewController = new MasterNavTableViewController (); detailViewController = new BasicUIViewAnimationScreen (); // create an array of controllers from them and then assign it to the // controllers property ViewControllers = new UIViewController[] { masterViewController, detailViewController }; // in this example, i expose an event on the master view called RowClicked, and i listen // for it in here, and then call a method on the detail view to update. this class thereby // becomes the defacto controller for the screen (both views). masterViewController.RowClicked += (sender, e) => { HandleRowClicked (e); }; // when the master view controller is hid (portrait mode), we add a button to // the detail view that when clicked will show the master view in a popover controller WillHideViewController += (sender, e) => { toggleMasterVisible = e.BarButtonItem.Action; }; ShouldHideViewController = (svc, vc, orientation) => { return MasterViewHidden && (orientation == UIInterfaceOrientation.Portrait || orientation == UIInterfaceOrientation.PortraitUpsideDown); }; }