带有集成标题栏和工具栏的 macOS 窗口? [英] macOS window with integrated title bar and toolbar?

查看:36
本文介绍了带有集成标题栏和工具栏的 macOS 窗口?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在 macOS 中,如何创建带有集成标题栏和工具栏"的窗口?在 Xcode 和/或 Interface Builder 中?

这是胖标题栏";添加到 OS X 10.10 Yosemite 中的 Safari 和日历等应用程序的窗口类型.统一的标题栏和工具栏以及其他小工具.

<块引用>

集成标题栏和工具栏

解决方案

  1. 创建标准工具栏.
  2. 当窗口加载时,将titleVisibility设置为隐藏:

    //Objective-Cwindow.titleVisibility = NSWindowTitleHidden;//斯威夫特window?.titleVisibility = .hidden

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

解决方案

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

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

这篇关于带有集成标题栏和工具栏的 macOS 窗口?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆