阻止 UIPopover 自动关闭第二部分
抱歉,我之前在此处发布了一个问题,但我得到的答案不起作用(可能是我的错)。
基本上,我想阻止 UIPopover 自动关闭。我得到了这段代码:
- (BOOL) popoverControllerShouldDismissPopover:(UIPopoverController *)popoverController
{
return NO;
}
我输入了它,但它似乎没有任何效果。还有什么我应该补充的吗? 我是否将其放在正确的位置(我将其放在其中包含弹出窗口的视图的 vc.m 中)?
非常感谢,
卢克
Sorry I previously posted a question here, but The answers I got didn't work (probably my fault).
Basically, I want to stop a UIPopover from dismissing automatically. I got to this piece of code:
- (BOOL) popoverControllerShouldDismissPopover:(UIPopoverController *)popoverController
{
return NO;
}
which I put in, but it doesn't seem to have any effect. Is there anything else I should add?
am I putting it in the right place (I was putting it in the vc.m of the view that has the popover within it)?
Thanks Very Much,
Luke
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
检查并确保设置了
UIPopover
委托。您可以通过设置 popover 实例变量在代码中执行此操作:aPopover.delegate = self;
Check to make sure the
UIPopover
delegate is set. You can do this in code by setting the popover instance variable:aPopover.delegate = self;