1
votes

How to show the Title Bar if it is not selected the option "Show Title Bar" in Attributes?

I can show/hide:

view.window?.titleVisibility = .visible
view.window?.titlebarAppearsTransparent = false

But this does not work if "Show Title Bar" is not selected. How to show the title bar in that case?

Regular window with Title bar and rounded corners: enter image description here

When I remove the Title bar, the rounded corners disappear: enter image description here

Is it possible to have no Title bar (remove or hidden) and the window with rounded corners?

(Be aware that I can make the Title bar transparent but still occupies a space: How to remove title bar and have rounded corners)

1

1 Answers

1
votes

You need to add .titled to the window's styleMask.

view.window?.styleMask.insert(.titled)