私はビューのどこから私は静的なデータを表示するUIPopoverPresentationcontroller
を提示しています。 詳細については、下記のコードをご覧ください。それは自動的に却下されたとして、私は単にビューに触れたとき、私は「ポップアップ」ビューを閉じるためのコードを書いていなかったとして閉じるときにUIPopoverPresentationControllerのイベントを取得します
- (void)openPopupScreen:(id)sender {
PopupViewController *popupVC = [self.storyboard instantiateViewControllerWithIdentifier:@"popupViewController"];
popupVC.delegate = self;
popupVC.preferredContentSize = CGSizeMake(220.0f, 230.0f);
popupVC.modalPresentationStyle = UIModalPresentationPopover;
_popupView = popupVC.popoverPresentationController;
self.popupView.delegate = self;
self.popupView.sourceView = self.view;
self.popupView.backgroundColor = [UIColor whiteColor];
CGRect rect = CGRectMake(0.0f, 0.0f, 220.0f, 230.0f);
self.popupView.sourceRect = rect;
[self presentViewController:popupVC animated:YES completion:nil];
}
。
私の質問は、ポップアップが解除されたときにイベントが必要なことです。
ありがとうございます。
お返事ありがとうございます。 – Nikita