I'm trying to achieve the look seen below in Xcode's about window, where there is no border between the title bar of the window and the content view, but I can't seem to get rid of the border between the title bar and the content view.
This is my code:
struct MyView: View {
var body: some View {
HStack {
Text("Hello world")
}
.frame(width: 200, height: 200)
}
}
...
myWindow = NSWindow(
contentRect: NSRect(x: 0, y: 0, width: 200, height: 200),
styleMask: [.closable, .titled],
backing: .buffered, defer: false)
myWindow.contentView = NSHostingView(rootView: MyView())
Which results in: