我有一个 PopoverPresentationController,它从下面的按钮显示。
我想在单击外部弹出窗口时关闭此弹出窗口。单击弹出窗口内部时不应关闭它。下面是我的代码。
_popup = [self.storyboard instantiateViewControllerWithIdentifier:@"PopupViewController"];
_popup.modalPresentationStyle = UIModalPresentationPopover;
_popup.popoverPresentationController.sourceView = self.button;
_popup.modalInPopover = TRUE;
[self presentViewController:_popup animated:TRUE completion:nil];
我怎么做?