macOS window with integrated title bar and toolbar?

Solution 1:

  1. Create a standard toolbar.
  2. When the window loads, set titleVisibility to hidden:

    // Objective-C
    window.titleVisibility = NSWindowTitleHidden;
    
    // Swift
    window?.titleVisibility = .hidden
    

Solution 2:

As of Xcode 10, you can do this in your XIB or storyboard by turning on the “Hide Title” check box under the window's title in the window's Attributes Inspector.

xib demo

Note also that you should use the “Textured Rounded” style for toolbar buttons.

Solution 3:

In your window controller's windowDidLoad():

window?.titleVisibility = .hidden