gpt4 book ai didi

swift - 如何关闭模态视图之外的 modalView

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

我有一个 segue 类型是模态的,我将它的 presentationstyle 设置为 formsheet。

enter image description here

这是屏幕截图。

enter image description here

当我点击变暗的 View 时,“弹出窗口” View 不会自行消失。在模态视图外部点击时是否有任何技巧可以自行消失?

最佳答案

这可以通过使用 UIViewController 中的 UIPopoverController 类和 modalInPopover 属性来实现。将 modalInPopover 设置为 true 原因拥有的弹出 Controller 在显示时禁止在此 View Controller 之外进行交互。默认值为 false。 Here is the full doc.

关于swift - 如何关闭模态视图之外的 modalView,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/26796438/

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