如何暂时隐藏UIPopoverController

发布于 2024-10-19 05:08:33 字数 318 浏览 7 评论 0原文

我有一个 UIPopoverController ,我想从中拖动项目并将其放在另一个视图上。 我实现了 Drag & 的机制。从弹出窗口中删除,但我希望它变得更好:当您拖动时,我认为应该隐藏弹出窗口,这样您就可以将项目放在它的正下方。

由于 UIPopoverController 不是“经典”视图控制器,我不知道如何暂时隐藏它而不不可逆转地关闭它。

但由于 UIPopoverController 在屏幕上呈现一些内容,因此在弹出窗口控制器内的某处必须有一个“视图”,我可以隐藏和显示......

有什么建议吗?

I have a UIPopoverController which i want to drag items from it and drop them on another view.
I implemented the mechanism for Drag & Drop from a popover but i want it to be even better: while you dragging, i think the popover should be hidden so you could drop items right underneath it.

Since UIPopoverController is not a "Classic" view controller i dont know how to hide it temporarily without dismissing it irreversibly.

BUT since UIPopoverController presents something on the screen, there got to be a "View" somewhere inside that popover controller that i can hide and show...

Any suggestions?

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

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

发布评论

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

评论(1

栖竹 2024-10-26 05:08:33

是否可以以某种方式“保留”弹出窗口中的视图控制器(例如呈现弹出窗口的对象的 ivar),然后关闭弹出窗口?这样,视图控制器仍然存在,当您想再次显示它时,就可以。

Would it work to "hold into" the view controller in the popover in some way (like an ivar of the object that presents the popover) and then just dismiss the popover? That way, the view controller will still be there and when you want to show it again, you can.

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