public override void WillRotate(UIInterfaceOrientation toInterfaceOrientation, double duration) { // If the detail popover is presented, dismiss it. if (DetailViewPopover != null) { DetailViewPopover.Dismiss(true); } }
public void ShowPopover(NSObject sender) { // Set the sender to a UIButton. UIButton tappedButton = (UIButton)sender; // Present the popover from the button that was tapped in the detail view. DetailViewPopover.PresentFromRect(tappedButton.Frame, View, UIPopoverArrowDirection.Any, true); // Set the last button tapped to the current button that was tapped. LastTappedButton = sender; }