void DisplaySettingsOptions() { if (UserInterfaceIdiomIsPhone) { aboutViewController = new AboutViewController(this); aboutViewController.Done += (button, even) => { DismissViewController(true, null); }; PresentViewController(aboutViewController, true, null); } else { if (aboutViewController == null) { var controller = new AboutViewController(this); aboutPopoverController = new UIPopoverController(controller); aboutPopoverController.PopoverContentSize = new SizeF(320f, 420f); controller.Done += delegate { aboutPopoverController.Dismiss(true); }; } if (aboutPopoverController.PopoverVisible) { aboutPopoverController.Dismiss(true); } else { aboutPopoverController.PresentFromRect(settingsButton.Frame, View, UIPopoverArrowDirection.Any, true); } } }
void DisplaySettingsOptions() { if (UserInterfaceIdiomIsPhone) { aboutViewController = new AboutViewController (this); aboutViewController.Done += (button, even) => { DismissViewController (true, null); }; PresentViewController (aboutViewController, true, null); } else { if (aboutViewController == null) { var controller = new AboutViewController (this); aboutPopoverController = new UIPopoverController (controller); aboutPopoverController.PopoverContentSize = new SizeF (320f, 420f); controller.Done += delegate { aboutPopoverController.Dismiss (true); }; } if (aboutPopoverController.PopoverVisible) { aboutPopoverController.Dismiss (true); } else { aboutPopoverController.PresentFromRect (settingsButton.Frame, View, UIPopoverArrowDirection.Any, true); } } }