Xcode & Swift - Window without title bar but with close, minimize and resize buttons

The new window style mask NSFullSizeContentViewWindowMask added in OS X 10.10 will do the trick.

self.window.titleVisibility = NSWindowTitleVisibility.Hidden;
self.window.titlebarAppearsTransparent = YES;
self.window.styleMask |= NSFullSizeContentViewWindowMask;

Release Notes


Since MacOS X 10.10, you can use these:

if #available(macOS 10.10, *) {
    window.titlebarAppearsTransparent = true
}

if #available(macOS 10.2, *) {
    window.movableByWindowBackground  = true
}

There was an official sample project for window appearance in Yosemite. You might wanna check it out.


For Swift 3 :-

self.window.titleVisibility = .hidden
self.window.titlebarAppearsTransparent = true
self.window.styleMask.insert(.fullSizeContentView)