有没有办法在 SwiftUI 中像 fullscreensheet 一样显示全屏模式?

问题描述

我在 UIKit 中使用 UIHosting Controller 来使用 SwiftUI 视图

我还有一个 UITabBarController。我正在尝试在全屏上显示自定义模式,例如内置的 SwiftUI 全屏覆盖。但问题是它没有显示在移动设备的全屏上,而只显示在 SwiftUI 视图上,而忽略了 UITabBarController

显示全屏模态(如内置 SwiftUI 全屏封面但具有自定义功能)的解决方案是什么?

@State private var isShowing: Bool? = false

var body: some View {
    Button("Show Full Screen Modal") {
        isShowing = true
    }
    .fullscreenModal(isShowing: $isShowing) {
        Text("Full Screen Modal")
    }
}

Content over yellow color is .fullscreenModal which is not showing over UITabBarController.

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)