In OS X 10.10+ how can I create the "fat titlebar" kind of window that has a toolbar integrated with other gadgets in the window's title bar, like in the new Safari and Calendar?
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试):
问题:
回答1:
- Create a standard toolbar
When the window loads set:
window.titleVisibility = NSWindowTitleHidden; // or .Hidden in Swift
回答2:
In your Window Controller:
Put the following into your windowDidLoad override function.
self.window!.titleVisibility = NSWindowTitleVisibility.Hidden