I have a PopoverPresentationController which shows from the button like below.
I want to dismiss this popup on clicking outside popup. It should not dismiss on clicking inside popup. Below is my code.
_popup = [self.storyboard instantiateViewControllerWithIdentifier:@"PopupViewController"];
_popup.modalPresentationStyle = UIModalPresentationPopover;
_popup.popoverPresentationController.sourceView = self.button;
_popup.modalInPopover = TRUE;
[self presentViewController:_popup animated:TRUE completion:nil];
How do I do that?
Delete this line:
_popup.modalInPopover = TRUE;