I'm building a macOS (OSX) application with XCode and I'm trying to get rid of the titlebar (maybe it's called toolbar?) in top of the window while still keeping the 3 control buttons (close, minimize and full screen).
So far I'm only able to hide this bar while keeping the buttons, but it looks like the bar is still there somehow. My NSTableViews
recognize this as the bar and create some sort of transparent safe area before the rows and headers.
Notice that application is using UIKit and storyboards - NOT SwiftUI. The green area to the left is a sidebar of a NSSplitView
. Just so you understand the structure.
I have these attributes set for the NSWindow
at the moment:
Thanks!
You can accomplish what you are looking for by setting the window's title bar to transparent, hide its title text and set its appearance to Full Size Content View.
If you would like to have your table view ignore the top inset you need to set its enclosing scroll view automaticallyAdjustsContentInsets
property to false
scrollView.automaticallyAdjustsContentInsets = false