带有集成标题栏和工具栏的macOS窗口? [英] macOS window with integrated title bar and toolbar?
问题描述
在macOS中,如何在Xcode和/或Interface Builder中创建带有集成标题栏和工具栏"的窗口?
In macOS how can I create a window with an "integrated title bar and toolbar" in Xcode and/or Interface Builder?
这是脂肪标题栏"类型的窗口,已添加到OS X 10.10 Yosemite中的Safari和Calendar等应用程序中.统一的标题栏和工具栏以及其他小工具.
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.
工具栏(包括)位于标题栏(或与标题栏集成)下方,并包含控件(称为工具栏项),可快速访问常用的命令和功能.
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.
集成的标题栏和工具栏
推荐答案
- 创建标准工具栏.
-
窗口加载后,将
titleVisibility
设置为隐藏:
// Objective-C
window.titleVisibility = NSWindowTitleHidden;
// Swift
window?.titleVisibility = .hidden
这篇关于带有集成标题栏和工具栏的macOS窗口?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!