gpt4 book ai didi

ios - 是否可以在其他 UI 元素后面显示 Popover?

转载 作者:行者123 更新时间:2023-11-29 11:11:48 25 4
gpt4 key购买 nike

在 iOS 应用中,是否可以在其他元素后面显示弹出窗口?

例如,如果我有一个已经包含多个 subview 的 UIView* myView,我创建一个新的 subview UIView* popopverView,并调用 presentPopoverFromRect 在 View popopverView 中,它仍然显示在其他 subview 中的元素前面,即使我调用 [myView sendSubviewToBack:popoverView]

我测试过按钮等其他元素,它们显示在其他元素后面。弹出窗口显示在所有 subview 之上是固有的吗?

最佳答案

来自documentation :

You use popovers to present information temporarily but in a way that does not take over the entire screen like a modal view does. The popover content is layered on top of your existing content in a special type of window. The popover remains visible until the user taps outside of the popover window or you explicitly dismiss it.

“隐藏”UIPopoverController 是不可能的——您可以关闭它(或用户关闭)。无论如何,您不需要让其他 View 出现在 UIPopoverController 之上 - 这就是的目的。

关于ios - 是否可以在其他 UI 元素后面显示 Popover?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11251208/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com