I'm trying to create a custom NSWindow where I want my content to completely fill the available space, I have managed to hide the navigation bar buttons and title and make it transparent, but when I set the content to fill the available space there is some space at the bottom that is not working
The way I create my window:
private func createWindow() -> MyWindow {
let window = MyWindow(
contentRect: NSRect(x: 0, y: 0, width: 10, height: 10), // these values don't matter, the window expands to the swiftUI view
styleMask: [.titled, .closable, .fullSizeContentView],
backing: .buffered, defer: false)
window.titlebarAppearsTransparent = true
window.titleVisibility = .hidden
window.isMovableByWindowBackground = false
window.isReleasedWhenClosed = false
window.collectionBehavior = [.transient, .ignoresCycle]
window.standardWindowButton(.closeButton)?.isHidden = true
window.standardWindowButton(.zoomButton)?.isHidden = true
window.standardWindowButton(.miniaturizeButton)?.isHidden = true
return window
}
And on my component, I added the following property:
.ignoresSafeArea()
I already followed all the suggestions in this question but nothing seems to work on my case, any help is appreciatted