macOS 26 appkit 如何适配
Asked on 2025-09-19
1 search
To adapt your AppKit app for macOS 26, you should consider the following updates and practices:
-
Control Heights and Sizes: The Mini, small, and medium controls are now slightly taller, providing more space around the control label and enhancing the click target size. Use auto layout to adapt to these varying control heights and avoid hard coding the heights of controls. For compatibility with existing high-density layouts, use the
PrefersCompact Control Size Metrics
property onNSView
to request control sizes that match previous macOS releases. This property is inherited down the view hierarchy and, when set to true, reverts controls to sizing compatible with previous macOS versions. Build an AppKit app with the new design -
New Design System: The new design of macOS introduces the liquid glass material, a translucent surface that reflects and refracts light, creating a sense of depth and dynamism. AppKit provides APIs to adopt this new design, including the Scroll Edge effect for legibility atop edge-to-edge scrolling content. Build an AppKit app with the new design
-
Adopting New APIs: Incrementally adopt SwiftUI with new menu and animation APIs, and adopt new system standard components like content type, pickers, cursors, and text entry suggestions. Ensure your toolbars support all display modes. What’s new in AppKit
-
Liquid Glass Effects: When you rebuild your app with Xcode 26, standard controls will automatically be rendered with the new design and materials. You can then identify opportunities where Liquid Glass can enhance your app, particularly for custom controls and views. Platforms State of the Union
These updates will help ensure your AppKit app is well-adapted to the new design principles introduced in macOS 26.

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.

Platforms State of the Union
Discover the newest advancements on Apple platforms.