<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>2 场景 on 编程那些事儿</title><link>https://before80.github.io/prgms/Swift/SwiftUI/appstructure/2-Scenes/</link><description>Recent content in 2 场景 on 编程那些事儿</description><generator>Hugo</generator><language>zh-cn</language><lastBuildDate>Sun, 13 Sep 2026 18:20:56 +0800</lastBuildDate><atom:link href="https://before80.github.io/prgms/Swift/SwiftUI/appstructure/2-Scenes/index.xml" rel="self" type="application/rss+xml"/><item><title>2.1 用 SwiftUI 构建并自定义菜单栏</title><link>https://before80.github.io/prgms/Swift/SwiftUI/appstructure/2-Scenes/2.1-BuildingAndCustomizingTheMenuBarWithSwiftui/</link><pubDate>Sat, 12 Sep 2026 12:47:47 +0800</pubDate><guid>https://before80.github.io/prgms/Swift/SwiftUI/appstructure/2-Scenes/2.1-BuildingAndCustomizingTheMenuBarWithSwiftui/</guid><description>&lt;blockquote&gt;
&lt;p&gt;原文链接: &lt;a href="https://developer.apple.com/documentation/swiftui/building-and-customizing-the-menu-bar-with-swiftui"&gt;https://developer.apple.com/documentation/swiftui/building-and-customizing-the-menu-bar-with-swiftui&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h1 id="21-用-swiftui-构建并自定义菜单栏"&gt;2.1 用 SwiftUI 构建并自定义菜单栏&lt;/h1&gt;
&lt;p&gt;为 iPadOS 和 macOS 构建原生菜单栏，提供无缝的跨平台体验。&lt;/p&gt;
&lt;h2 id="Overview"&gt;概述&lt;/h2&gt;
&lt;p&gt;在 iPadOS 和 macOS 上，菜单栏提供对系统关键操作的访问，例如剪切、拷贝、粘贴和窗口管理。系统通过菜单栏把这些操作按功能归入菜单和子菜单。应用可以添加与上下文相关的操作（例如显示和隐藏侧边栏），也可以创建自定义菜单和菜单项，让人们从菜单栏执行应用特有的操作。你还可以把菜单栏绑定到键盘快捷键，让应用更快捷、更易用。&lt;/p&gt;</description></item></channel></rss>