如何创建 UIPopoverView 的静态版本?

发布于 2024-09-12 13:53:33 字数 183 浏览 7 评论 0原文

我尝试在界面中使用弹出窗口,但 UIPopoverController 的所有便利功能使其变得不可能。

我的目标是使用弹出窗口的镶边,但没有任何关联的事件或操作。我需要它保持显示在屏幕上(不关闭)并且不是模态的。

所以现在我正在考虑使用图像构建我自己的视图。我的问题:有没有更好的方法来实现这一点(带有图像边框的视图)?

I tried using a popover in my interface, but all the convenience features of the UIPopoverController made it impossible.

My goal is to use the popover's chrome, but none of the associated events or actions. I need it to stay displayed onscreen (no dismissal) and not be modal.

So now I'm considering building my own view using images. My question: is there a better way to accomplish this (a view with image borders)?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

别闹i 2024-09-19 13:53:33

如果您希望将 UIPopover 保留在屏幕上并允许用户在显示弹出窗口时与屏幕上的其他视图进行交互,请考虑使用 UIPopoverController 上的 passthroughViews 属性

。 "http://developer.apple.com/iphone/library/documentation/uikit/reference/UIPopoverController_class/Reference/Reference.html" rel="nofollow noreferrer">UIPopoverController 类参考:

当弹出窗口处于活动状态时,交互
与其他视图通常被禁用
直到弹出窗口被关闭。
为其分配视图数组
属性允许点击外部
弹出窗口由
相应的视图。

您应该能够通过仅传递仅包含“背景”视图控制器视图的数组来实现您想要的效果。

If you want to stay your UIPopover onscreen and allow the user to interact with other views onscreen while to popover is show, consider using the passthroughViews property on UIPopoverController

The UIPopoverController Class Reference:

When a popover is active, interactions
with other views are normally disabled
until the popover is dismissed.
Assigning an array of views to this
property allows taps outside of the
popover to be handled by the
corresponding views.

You should be able to achieve the effect you want by just passing an array containing only the "background" viewcontroller's view.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文