public override void ViewDidLoad() { base.ViewDidLoad(); //Setup some of our UI NavigationItem.LeftItemsSupplementBackButton = true; menu = new UIBarButtonItem("Menu", UIBarButtonItemStyle.Bordered, (sender, e) => ShowPopover()); menu.SetBackgroundImage(Theme.DarkBarButtonItem, UIControlState.Normal, UIBarMetrics.Default); hide = new UIBarButtonItem("Hide", UIBarButtonItemStyle.Bordered, (sender, e) => HidePopover()); hide.SetBackgroundImage(Theme.DarkBarButtonItem, UIControlState.Normal, UIBarMetrics.Default); SwitchOrientation(InterfaceOrientation, false); //Hook up our controllers detailsController = ChildViewControllers[0] as AssignmentDetailsController; menuController = ChildViewControllers[1] as MenuController; detailsController.StatusChanged += (sender, e) => { menuController.UpdateAssignment(); }; detailsController.Completed += (sender, e) => { //Only perform the Seque if the screen is not already visible if (!detailsController.IsViewLoaded || detailsController.View.Window == null) { PerformSegue("AssignmentDetails", this); } }; menuController.MenuChanged += (sender, e) => { detailsController.SectionSelected(e.TableView, e.IndexPath, e.Animated); }; menuController.AssignmentCompleted += (sender, e) => { //Only perform the Seque if the screen is not already visible if (!detailsController.IsViewLoaded || detailsController.View.Window == null) { PerformSegue("AssignmentDetails", this); } }; menuController.StatusChanged += (sender, e) => detailsController.UpdateAssignment(); }
public override void ViewDidLoad () { base.ViewDidLoad (); //Setup some of our UI NavigationItem.LeftItemsSupplementBackButton = true; menu = new UIBarButtonItem("Menu", UIBarButtonItemStyle.Bordered, (sender, e) => ShowPopover ()); menu.SetBackgroundImage (Theme.DarkBarButtonItem, UIControlState.Normal, UIBarMetrics.Default); hide = new UIBarButtonItem("Hide", UIBarButtonItemStyle.Bordered, (sender, e) => HidePopover ()); hide.SetBackgroundImage (Theme.DarkBarButtonItem, UIControlState.Normal, UIBarMetrics.Default); SwitchOrientation (InterfaceOrientation, false); //Hook up our controllers detailsController = ChildViewControllers[0] as AssignmentDetailsController; menuController = ChildViewControllers[1] as MenuController; detailsController.StatusChanged += (sender, e) => { menuController.UpdateAssignment (); }; detailsController.Completed += (sender, e) => { //Only perform the Seque if the screen is not already visible if (!detailsController.IsViewLoaded || detailsController.View.Window == null) { PerformSegue ("AssignmentDetails", this); } }; menuController.MenuChanged += (sender, e) => { detailsController.SectionSelected (e.TableView, e.IndexPath, e.Animated); }; menuController.AssignmentCompleted += (sender, e) => { //Only perform the Seque if the screen is not already visible if (!detailsController.IsViewLoaded || detailsController.View.Window == null) { PerformSegue ("AssignmentDetails", this); } }; menuController.StatusChanged += (sender, e) => detailsController.UpdateAssignment (); }