I have a Mac app, and I set the titlebar of a NSWindow to transparent through InterfaceBuilder. But it is not fully transparent, there is always a line above the window. I'm certain it is the highlight part of the title bar. You may need to look closely through the picture, it's just inside the red box, but it is rather obvious when you run the app.
I have also tried to make the window FullSizeContentView. But it makes no difference. The white highlight part will just move down to the top of my window. And because I'm using round cornered window, it will still be very obvious (I don't know why it would not clip the title bar)
Thanks in advance. Really hope someone can help me out of this. Below is part of the code I used to create the window:
final class BaseWindow: NSPanel {
override init(contentRect: NSRect, styleMask style: NSWindow.StyleMask, backing backingStoreType: NSWindow.BackingStoreType, defer flag: Bool) {
...
isMovableByWindowBackground = true
isMovable = true
level = .mainMenu
isOpaque = false
styleMask = [.titled]
titlebarAppearsTransparent = true
titleVisibility = .hidden
backgroundColor = .clear
collectionBehavior = [.ignoresCycle, .canJoinAllSpaces]
...
}
}