How to prevent UIPopover from dismissing when clicked outside?

HiltonMenezesHiltonMenezes ✭✭BRMember ✭✭

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?

Posts

  • adamkempadamkemp mod 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)
    {
        base.ViewDidAppear(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.