【发布时间】:2011-10-16 13:27:30
【问题描述】:
我正在尝试从弹出框 (pop) 中的按钮调用主视图 (TapView) 中的方法
现在我有
-(void)popoverControllerDidDismissPopover:
(UIPopoverController *)pop {
[self noise];
}
设置以便当弹出框被解除时它运行该方法。这是可行的,并且是“可以接受的”
我宁愿发生的事情是用户按下 UIButton(让我们在弹出窗口中将其称为...'load1',而这会调用该方法。
有人对此有什么好主意吗?我确信这很简单,但我不确定我正在尝试做什么,因此搜索答案提供了相当多的选择。
编辑:这就是我所说的弹出框。这可能会有所帮助。
saveLoadScifi *sLoad = [[saveLoadScifi alloc] init];
UIPopoverController *pop = [[UIPopoverController alloc] initWithContentViewController:sLoad];
[pop setDelegate:self];
CGRect popoverRect = [self.view convertRect:[sender frame]
fromView:[sender superview]];
[pop presentPopoverFromRect:popoverRect inView:self.view permittedArrowDirections:UIPopoverArrowDirectionAny animated:YES];
【问题讨论】: