macOS window with integrated title bar and toolbar?

后端 未结 3 2064
清酒与你
清酒与你 2020-11-29 20:26

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

3条回答
  •  鱼传尺愫
    2020-11-29 21:01

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

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

提交回复
热议问题