macOS的NSEffectiveView
Asked on 06/14/2025
1 search
在WWDC 2025的“Build an AppKit app with the new design”会议中,介绍了如何使用NSGlassEffectView API来实现macOS中的液态玻璃效果。这个API允许开发者将内容放置在玻璃上,并通过设置内容视图来应用必要的视觉处理,以确保内容在玻璃适应其周围环境时保持可读性。开发者可以通过设置角半径和色调属性来自定义玻璃的外观。
如果你想了解更多关于如何在AppKit应用中使用NSGlassEffectView的细节,可以查看Build an AppKit app with the new design (17:43)的相关部分。

Build an AppKit app with the new design
Update your AppKit app to take full advantage of the new design system. We’ll dive into key changes to tab views, split views, bars, presentations, search, and controls, and show you how to use Liquid Glass in your custom UI. To get the most out of this video, we recommend first watching “Get to know the new design system” for general design guidance.

What’s new in AppKit
Discover the latest advances in Mac app development. Get an overview of the new features in macOS Sequoia, and how to adopt them in your app. Explore new ways to integrate your existing code with SwiftUI. Learn about the improvements made to numerous AppKit controls, like toolbars, menus, text input, and more.

What’s new in SwiftUI
Learn what’s new in SwiftUI to build great apps for any Apple platform. We’ll explore how to give your app a brand new look and feel with Liquid Glass. Discover how to boost performance with framework enhancements and new instruments, and integrate advanced capabilities like web content and rich text editing. We’ll also show you how SwiftUI is expanding to more places, including laying out views in three dimensions.