当用户单击UITableViewCell时,我打开一个由3个按钮组成的UIPopoverController。这些按钮是投票按钮,所以当用户提交投票时,我想关闭我的UIPopoverController。
这就是我要做的:
UIStoryboard* sb = [UIStoryboard storyboardWithName:@"Main" bundle:nil];
myViewController* vc = [sb instantiateViewControllerWithIdentifier:@"val_vote"];
self.popOver = [[UIPopoverController alloc]initWithContentViewController:vc];
self.popOver.delegate=self;
[self.popOver presentPopoverFromRect:CGRectMake(x, y, 10, 10) inView:self.view permittedArrowDirections:UIPopoverArrowDirectionUp animated:YES];当用户与其交互时,是否可以关闭此弹出窗口?
谢谢你
发布于 2014-08-12 23:40:14
在要投票的按钮的目标方法中,您必须调用
[yourViewControllerThatPresentedThePopover dismissPopoverAnimated:YES];https://stackoverflow.com/questions/25268364
复制相似问题