void Button_TouchUpInside(object sender, EventArgs e)
        {
            STPopupController popupController = new STPopupController(new PopupViewController(new CGSize(View.Bounds.Width - 40, View.Bounds.Height - 120)));

            popupController.ContainerView.Layer.CornerRadius = 4f;
            popupController.BackgroundView.AddGestureRecognizer(new UITapGestureRecognizer((obj) => popupController.Dismiss()));
            popupController.PresentInViewController(this);
        }
예제 #2
0
        void Button_TouchUpInside(object sender, EventArgs e)
        {
            // Old school
            //var vc = new PopupViewController(new CGSize(View.Bounds.Width, View.Bounds.Height - 220));
            //vc.ModalPresentationStyle = UIModalPresentationStyle.Popover;
            //vc.ModalTransitionStyle = UIModalTransitionStyle.CoverVertical;
            //PresentModalViewController(vc, true);
            //return;

            STPopupController popupController = new STPopupController(
                new PopupViewController(new CGSize(View.Bounds.Width - 40,
                                                   View.Bounds.Height - 420)));

            popupController.ContainerView.Layer.CornerRadius = 8f;
            popupController.NavigationBarHidden = true;
            popupController.TransitionStyle     = STPopupTransitionStyle.SlideVertical;
            popupController.Style = STPopupStyle.BottomSheet;
            popupController.BackgroundView.AddGestureRecognizer(new UITapGestureRecognizer((obj) => popupController.Dismiss()));
            popupController.PresentInViewController(this);
        }