Пример #1
0
        partial void showInfo(NSObject sender)
        {
            if (UserInterfaceIdiomIsPhone)
            {
                var controller = new FlipsideViewController()
                {
                    ModalTransitionStyle = UIModalTransitionStyle.FlipHorizontal,
                };

                controller.Done += delegate
                {
                    this.DismissModalViewControllerAnimated(true);
                };

                this.PresentModalViewController(controller, true);
            }
            else
            {
                if (flipsidePopoverController == null)
                {
                    var controller = new FlipsideViewController();
                    flipsidePopoverController = new UIPopoverController(controller);
                    controller.Done          += delegate
                    {
                        flipsidePopoverController.Dismiss(true);
                    };
                }

                if (flipsidePopoverController.PopoverVisible)
                {
                    flipsidePopoverController.Dismiss(true);
                }
                else
                {
                    flipsidePopoverController.PresentFromBarButtonItem((UIBarButtonItem)sender, UIPopoverArrowDirection.Any, true);
                }
            }
        }
        partial void showInfo(NSObject sender)
        {
            if (UserInterfaceIdiomIsPhone)
            {
                var controller = new FlipsideViewController()
                {
                    ModalTransitionStyle = UIModalTransitionStyle.FlipHorizontal,
                };
				
                controller.Done += delegate
                {
                    this.DismissModalViewControllerAnimated(true);
                };
				
                this.PresentModalViewController(controller, true);
            } else
            {
                if (flipsidePopoverController == null)
                {
                    var controller = new FlipsideViewController();
                    flipsidePopoverController = new UIPopoverController(controller);
                    controller.Done += delegate
                    {
                        flipsidePopoverController.Dismiss(true);
                    };
                }
				
                if (flipsidePopoverController.PopoverVisible)
                {
                    flipsidePopoverController.Dismiss(true);
                } else
                {
                    flipsidePopoverController.PresentFromBarButtonItem((UIBarButtonItem)sender, UIPopoverArrowDirection.Any, true);
                }
            }
        }