Forum Xamarin.iOS

How to prevent UIPopover from dismissing when clicked outside?

All i found was this popoverControllerShouldDismissPopover: but im not actually managing to use and i dont even know thats right, someone knows how i can prevent a popover from closing when clicking in the outside?


  • adamkempadamkemp USInsider, Developer Group Leader mod

    In the view controller that is inside the popover you need to set ModalInPopover = true in its ViewDidAppear method:

    public override void ViewDidAppear(bool animated)
        ModalInPopover = true;

    I'm not sure why it has to be in ViewDidAppear, but that's what seems to work.

  • HiltonMenezesHiltonMenezes BRMember ✭✭

    Both answers worked thanks o/.

Sign In or Register to comment.