1

我正在使用弹出框来显示有关用户单击的对象的信息。问题是,有时这个弹出框会出现在需要保持可见的图形组件之上。

解决方案是告诉我的 UIPopverController 严格显示在特定区域内,即使锚点位于该区域的边界(当需要在屏幕边框附近显示弹出框时也会发生同样的事情)。

将视图设置为弹出框容器不起作用,因为弹出框可以从中显示出来:

[self.aPopover presentPopoverFromRect:popOverFrame inView:self.textView
            permittedArrowDirections:UIPopoverArrowDirectionRight animated:YES];

你知道怎么做吗 ?

请注意,我的对象不是按钮,因此我无法使用该功能

– presentPopoverFromBarButtonItem:permittedArrowDirections:animated:
4

1 回答 1

0

I'd try taking the object you don't want obscured, get its frame and use that as the rect in presentPopoverFromRect:inView:permittedArrowDirections:animated:. iOS generally tries to avoid obscuring the origin rect.

于 2011-02-21T21:09:55.617 回答