Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

macOS window with integrated title bar and toolbar?

In macOS how can I create a window with an "integrated title bar and toolbar" in Xcode and/or Interface Builder?

This is the "fat title bar" type of window that was added to apps such as Safari and Calendar in OS X 10.10 Yosemite. Unified title bar and toolbar plus other gadgets.

macOS Human Interface Guidelines: Title Bar and Toolbar

A toolbar, when included, resides beneath the title bar (or is integrated with the title bar) and includes controls—known as toolbar items—that provide quick access to frequently used commands and features.

Integrated title bar and toolbar

Integrated title bar and toolbar

like image 472
Kornel Avatar asked Jun 03 '14 19:06

Kornel


People also ask

How do I move a window when I can't see the title bar Mac?

Hi. On the application menu bar go to Window/Zoom, and then resize and position the window as you like. In order to make it open the same way next time you use the application, hold the Option key while closing the window. Good Luck.

What is window toolbar in Mac?

The menu bar runs along the top of the screen on your Mac. Use the menus and icons in the menu bar to choose commands, perform tasks, and check status. You can set an option to automatically hide the menu bar so it's shown only when you move the pointer to the top of the screen.

What toolbar is on the title bar?

Introduction. By default, the Quick Access Toolbar (QAT) is located in the title bar of the application window but can be configured to display below the ribbon.

What is Anatomy of window?

The framework consists of a head, jambs, and a sill. The head is the main horizontal piece that makes up the top of the window frame. The jambs are the vertical side pieces that make up the left and right portions of the frame. The sill is the horizontal piece that makes up the bottom part of the frame.


3 Answers

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

    // Objective-C
    window.titleVisibility = NSWindowTitleHidden;
    
    // Swift
    window?.titleVisibility = .hidden
    
like image 115
Kornel Avatar answered Oct 04 '22 01:10

Kornel


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.

like image 31
rob mayoff Avatar answered Oct 04 '22 01:10

rob mayoff


In your window controller's windowDidLoad():

window?.titleVisibility = .hidden
like image 36
Sammy The Hand Avatar answered Oct 04 '22 01:10

Sammy The Hand