How can I create Yosemite-style unified toolbar in Interface Builder?

拟墨画扇 提交于 2019-11-27 10:51:01
  1. Create a standard toolbar
  2. When the window loads set:

    window.titleVisibility = NSWindowTitleHidden; // or .Hidden in Swift
    

In your Window Controller:

Put the following into your windowDidLoad override function.

self.window!.titleVisibility = NSWindowTitleVisibility.Hidden

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.

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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!