如何使用swiftUI删除macos应用程序中的工具栏

问题描述

我正在尝试在 macos 中开发一个应用程序,我有问题。

1.我想删除工具栏包括macos标题栏(关闭/缩小/放大)

2.如何让我的应用叠加在其他应用上?

非常感谢!

请看这张图:

enter image description here

MacOSAPPApp

import SwiftUI

@main
struct MacOSAPPApp: App {
    var body: some Scene {
        WindowGroup {
            ContentView()
        }
    }
}

内容视图

import SwiftUI

struct ContentView: View {
    var body: some View {
        vstack {
            Text("App Content")
        }
        .frame(width: 120.0,height: 80.0,alignment: .top)
        .padding(20)
    }
}

解决方法

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

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

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