Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Hide NSWindow title bar

Tags:

Is there a way to hide the titlebar in an NSWindow? I don't want to have to completely write a new custom window. I can't use NSBorderlessWindowMask because I have a bottom bar on my window, and using NSBorderlessWindowMask makes that disappear. I also tried using setContentBorderThickness:forEdge: with NSMaxYEdge and setting it to 0, that didn't work either.

Any help is appreciated

like image 706
indragie Avatar asked Jan 07 '10 04:01

indragie


2 Answers

[yourWindow setStyleMask:NSBorderlessWindowMask]; 
like image 155
user257587 Avatar answered Oct 13 '22 13:10

user257587


Starting from OS X 10.10, you can hide title bar.

window1.titlebarAppearsTransparent = true window1.titleVisibility            = .Hidden 

Maybe you want to override window style.

window1.styleMask = NSResizableWindowMask                   | NSTitledWindowMask                   | NSFullSizeContentViewWindowMask 
like image 44
eonil Avatar answered Oct 13 '22 13:10

eonil