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