apple-liquid-glass-design
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseApple Liquid Glass Design
Apple Liquid Glass 设计指南
Lifecycle Position
生命周期定位
Phases 2-3 (Design → Implement). Related: (glass templates), (material backgrounds).
swiftui-componentsswiftui-material-apiReference for Apple's Liquid Glass design system introduced in iOS 26, iPadOS 26, and macOS 26. Liquid Glass is a dynamic material that combines optical properties of glass with fluidity, forming a functional layer for controls and navigation elements.
第2-3阶段(设计→实现)。相关内容:(玻璃效果模板)、(材质背景)。
swiftui-componentsswiftui-material-api本文档是针对iOS 26、iPadOS 26和macOS 26中引入的Apple Liquid Glass设计系统的参考资料。Liquid Glass是一种动态材质,融合了玻璃的光学特性与流体特性,可为控件和导航元素构建功能性图层。
When to Use This Skill
何时使用该技能
Trigger conditions:
- Applying Liquid Glass effects to custom SwiftUI views (,
glassEffect)GlassEffectContainer - Using background extension effects to stretch content under sidebars/inspectors
- Styling buttons with or
.glassbutton styles.glassProminent - Implementing morph animations between Liquid Glass elements
- Organizing toolbar items with grouping
ToolbarSpacer(.fixed) - Creating app icons with Icon Composer for Liquid Glass
- Extending horizontal scroll views under sidebars/inspectors
- Adding scroll edge effects for content legibility
- Implementing tab bar minimize behavior
- Using for concentric corner radii
ConcentricRectangle - Working with (UIKit) or
UIGlassEffect(AppKit)NSGlassEffectView - Adopting Liquid Glass in existing apps (migration from older SDK)
- Opting out via Info.plist key
UIDesignRequiresCompatibility
Do NOT use when:
- Working with pre-iOS 26 glass effects (visionOS is a separate API)
glassBackgroundEffect - General SwiftUI layout questions unrelated to Liquid Glass
触发条件:
- 为自定义SwiftUI视图应用Liquid Glass效果(、
glassEffect)GlassEffectContainer - 使用背景扩展效果将内容延伸至侧边栏/检查器下方
- 为按钮应用或
.glass按钮样式.glassProminent - 实现Liquid Glass元素之间的形态动画
- 使用组织工具栏项目
ToolbarSpacer(.fixed) - 使用Icon Composer创建适配Liquid Glass的应用图标
- 将水平滚动视图延伸至侧边栏/检查器下方
- 添加滚动边缘效果以提升内容可读性
- 实现标签栏最小化行为
- 使用创建同心圆角
ConcentricRectangle - 处理(UIKit)或
UIGlassEffect(AppKit)NSGlassEffectView - 在现有应用中适配Liquid Glass(从旧版SDK迁移)
- 通过Info.plist键选择退出适配
UIDesignRequiresCompatibility
请勿使用场景:
- 处理iOS 26之前的玻璃效果(visionOS的是独立API)
glassBackgroundEffect - 与Liquid Glass无关的通用SwiftUI布局问题
Workflow Decision Tree
工作流决策树
Choose the path that matches the request:
选择与请求匹配的路径:
1) Review an existing feature
1) 审核现有功能
- Inspect where Liquid Glass should be used and where it should not.
- Verify correct modifier order, shape usage, and container placement.
- Check for iOS 26+ availability handling and sensible fallbacks.
- 检查应使用和不应使用Liquid Glass的场景
- 验证修饰符顺序、形状使用和容器放置是否正确
- 检查iOS 26+兼容性处理及合理的降级方案
2) Improve a feature using Liquid Glass
2) 使用Liquid Glass优化功能
- Identify target components for glass treatment (surfaces, chips, buttons, cards).
- Refactor to use where multiple glass elements appear.
GlassEffectContainer - Introduce interactive glass only for tappable or focusable elements.
- 确定需要应用玻璃效果的目标组件(表面、芯片、按钮、卡片)
- 重构代码,在存在多个玻璃元素的场景中使用
GlassEffectContainer - 仅为可点击或可聚焦元素添加交互式玻璃效果
3) Implement a new feature using Liquid Glass
3) 使用Liquid Glass实现新功能
- Design the glass surfaces and interactions first (shape, prominence, grouping).
- Add glass modifiers after layout/appearance modifiers.
- Add morphing transitions only when the view hierarchy changes with animation.
- 先设计玻璃表面和交互逻辑(形状、突出度、分组)
- 在布局/外观修饰符之后添加玻璃效果修饰符
- 仅当视图层级随动画变化时,才添加形态过渡动画
Review Checklist
审核检查清单
- Availability: present with fallback UI.
#available(iOS 26, *) - Composition: Multiple glass views wrapped in .
GlassEffectContainer - Modifier order: applied after layout/appearance modifiers.
glassEffect - Interactivity: only where user interaction exists.
interactive() - Transitions: used with
glassEffectIDfor morphing.@Namespace - Consistency: Shapes, tinting, and spacing align across the feature.
- 兼容性:存在声明及对应的降级UI
#available(iOS 26, *) - 组合方式:多个玻璃视图被包裹在中
GlassEffectContainer - 修饰符顺序:在布局/外观修饰符之后应用
glassEffect - 交互性:仅在存在用户交互的场景中使用
interactive() - 过渡效果:配合使用
@Namespace实现形态动画glassEffectID - 一致性:功能中的形状、着色和间距保持统一
Implementation Checklist
实现检查清单
- Define target elements and desired glass prominence.
- Wrap grouped glass elements in and tune spacing.
GlassEffectContainer - Use as needed.
.glassEffect(.regular.tint(...).interactive(), in: .rect(cornerRadius: ...)) - Use /
.buttonStyle(.glass)for actions..buttonStyle(.glassProminent) - Add morphing transitions with when hierarchy changes.
glassEffectID - Provide fallback materials and visuals for earlier iOS versions.
- 定义目标元素及所需的玻璃效果突出度
- 将分组的玻璃元素包裹在中并调整间距
GlassEffectContainer - 根据需要使用
.glassEffect(.regular.tint(...).interactive(), in: .rect(cornerRadius: ...)) - 为操作按钮应用/
.buttonStyle(.glass).buttonStyle(.glassProminent) - 当视图层级变化时,使用添加形态过渡动画
glassEffectID - 为iOS旧版本提供降级材质和视觉效果
Availability & Fallbacks
兼容性与降级方案
All Liquid Glass APIs require iOS 26 or later. Always provide fallbacks:
swift
if #available(iOS 26, *) {
content
.padding()
.glassEffect(.regular.interactive(), in: .rect(cornerRadius: 16))
} else {
content
.padding()
.background(.ultraThinMaterial, in: RoundedRectangle(cornerRadius: 16))
}所有Liquid Glass API均要求iOS 26或更高版本。请始终提供降级方案:
swift
if #available(iOS 26, *) {
content
.padding()
.glassEffect(.regular.interactive(), in: .rect(cornerRadius: 16))
} else {
content
.padding()
.background(.ultraThinMaterial, in: RoundedRectangle(cornerRadius: 16))
}Fallback Materials
降级材质选项
- — Closest to glass appearance
.ultraThinMaterial - — Slightly more opaque
.thinMaterial - — Standard blur
.regularMaterial - — More opaque
.thickMaterial - — Most opaque
.ultraThickMaterial
- — 最接近玻璃外观
.ultraThinMaterial - — 略不透明
.thinMaterial - — 标准模糊效果
.regularMaterial - — 更高不透明度
.thickMaterial - — 最高不透明度
.ultraThickMaterial
Conditional Modifier Extension
条件修饰符扩展
swift
extension View {
@ViewBuilder
func glassEffectWithFallback(
_ style: Glass = .regular,
in shape: some Shape = .rect,
fallbackMaterial: Material = .ultraThinMaterial
) -> some View {
if #available(iOS 26, *) {
self.glassEffect(style, in: shape)
} else {
self.background(fallbackMaterial, in: shape)
}
}
}swift
extension View {
@ViewBuilder
func glassEffectWithFallback(
_ style: Glass = .regular,
in shape: some Shape = .rect,
fallbackMaterial: Material = .ultraThinMaterial
) -> some View {
if #available(iOS 26, *) {
self.glassEffect(style, in: shape)
} else {
self.background(fallbackMaterial, in: shape)
}
}
}Key Concepts
核心概念
| Concept | Description |
|---|---|
| Liquid Glass | Dynamic material that blurs content behind it, reflects color/light, and reacts to touch and pointer in real time |
| Glass variants | |
| GlassEffectContainer | Groups multiple glass effects for performance and morph animations |
| Morph animation | Shapes blend/separate fluidly when views appear/disappear within a container |
| Background extension | Mirrors and blurs edge content under sidebars/inspectors for edge-to-edge feel |
| Icon Composer | Xcode tool for creating multilayer Liquid Glass app icons |
| ConcentricRectangle | Shape that maintains concentric corner radii relative to its container |
| 概念 | 描述 |
|---|---|
| Liquid Glass | 动态材质,可模糊后方内容、反射颜色/光线,并实时响应触摸和指针操作 |
| 玻璃效果变体 | |
| GlassEffectContainer | 组合多个玻璃效果以提升性能并支持形态动画 |
| 形态动画 | 当视图在容器内显示/消失时,形状会流畅地融合/分离 |
| 背景扩展 | 镜像并模糊边缘内容至侧边栏/检查器下方,实现边缘到边缘的视觉效果 |
| Icon Composer | Xcode工具,用于创建多层Liquid Glass应用图标 |
| ConcentricRectangle | 相对于容器保持同心圆角的形状 |
Quick Reference
快速参考
Apply Liquid Glass to a view (SwiftUI)
为SwiftUI视图应用Liquid Glass
swift
// Default: regular glass, capsule shape
Text("Hello")
.padding()
.glassEffect()
// Custom shape with rounded rectangle
Text("Hello")
.padding()
.glassEffect(in: .rect(cornerRadius: 16.0))
// Tinted + interactive (reacts to touch)
Text("Hello")
.padding()
.glassEffect(.regular.tint(.orange).interactive())swift
// 默认:常规玻璃效果,胶囊形状
Text("Hello")
.padding()
.glassEffect()
// 自定义圆角矩形形状
Text("Hello")
.padding()
.glassEffect(in: .rect(cornerRadius: 16.0))
// 着色+交互式(响应触摸)
Text("Hello")
.padding()
.glassEffect(.regular.tint(.orange).interactive())Glass button styles
玻璃按钮样式
swift
// Standard glass button
Button("Action") { }
.buttonStyle(.glass)
// Prominent glass button (stronger visual weight)
Button("Primary") { }
.buttonStyle(.glassProminent)
// Clear variant glass button
Button("Subtle") { }
.buttonStyle(.glass(.clear))swift
// 标准玻璃按钮
Button("Action") { }
.buttonStyle(.glass)
// 突出显示的玻璃按钮(更强视觉权重)
Button("Primary") { }
.buttonStyle(.glassProminent)
// 透明变体玻璃按钮
Button("Subtle") { }
.buttonStyle(.glass(.clear))GlassEffectContainer with morph animation
带形态动画的GlassEffectContainer
swift
@State private var isExpanded = false
@Namespace private var namespace
GlassEffectContainer(spacing: 40.0) {
HStack(spacing: 40.0) {
Image(systemName: "scribble.variable")
.frame(width: 80, height: 80)
.glassEffect()
.glassEffectID("pencil", in: namespace)
if isExpanded {
Image(systemName: "eraser.fill")
.frame(width: 80, height: 80)
.glassEffect()
.glassEffectID("eraser", in: namespace)
}
}
}
Button("Toggle") {
withAnimation { isExpanded.toggle() }
}
.buttonStyle(.glass)swift
@State private var isExpanded = false
@Namespace private var namespace
GlassEffectContainer(spacing: 40.0) {
HStack(spacing: 40.0) {
Image(systemName: "scribble.variable")
.frame(width: 80, height: 80)
.glassEffect()
.glassEffectID("pencil", in: namespace)
if isExpanded {
Image(systemName: "eraser.fill")
.frame(width: 80, height: 80)
.glassEffect()
.glassEffectID("eraser", in: namespace)
}
}
}
Button("Toggle") {
withAnimation { isExpanded.toggle() }
}
.buttonStyle(.glass)Background extension effect
背景扩展效果
swift
NavigationSplitView {
// sidebar
} detail: {
ZStack {
Image(decorative: "hero")
.backgroundExtensionEffect()
.overlay(alignment: .bottom) {
// Overlay goes AFTER the modifier so it
// doesn't extend under the sidebar
Text("Title").font(.largeTitle)
}
}
}swift
NavigationSplitView {
// 侧边栏
} detail: {
ZStack {
Image(decorative: "hero")
.backgroundExtensionEffect()
.overlay(alignment: .bottom) {
// 叠加层需在修饰符之后添加,
// 避免延伸至侧边栏下方
Text("Title").font(.largeTitle)
}
}
}Toolbar grouping with spacers
使用间隔符进行工具栏分组
swift
.toolbar {
ToolbarSpacer(.flexible)
ToolbarItem { ShareLink(item: item, preview: preview) }
ToolbarSpacer(.fixed)
ToolbarItemGroup {
FavoriteButton(item: item)
CollectionsMenu(item: item)
}
ToolbarSpacer(.fixed)
ToolbarItem {
Button("Info", systemImage: "info") { showInspector.toggle() }
}
}swift
.toolbar {
ToolbarSpacer(.flexible)
ToolbarItem { ShareLink(item: item, preview: preview) }
ToolbarSpacer(.fixed)
ToolbarItemGroup {
FavoriteButton(item: item)
CollectionsMenu(item: item)
}
ToolbarSpacer(.fixed)
ToolbarItem {
Button("Info", systemImage: "info") { showInspector.toggle() }
}
}Horizontal scroll under sidebar
侧边栏下方的水平滚动
swift
ScrollView(.horizontal, showsIndicators: false) {
LazyHStack(spacing: Constants.standardPadding) {
Spacer().frame(width: Constants.standardPadding)
ForEach(items) { item in
ItemView(item: item)
}
}
}
// Ensure no padding on containing view so scroll touches sidebar edgeswift
ScrollView(.horizontal, showsIndicators: false) {
LazyHStack(spacing: Constants.standardPadding) {
Spacer().frame(width: Constants.standardPadding)
ForEach(items) { item in
ItemView(item: item)
}
}
}
// 确保容器视图无内边距,使滚动区域触达侧边栏边缘Custom badge with glass effect
带玻璃效果的自定义徽章
swift
BadgeLabel(badge: badge)
.glassEffect(.regular, in: .rect(cornerRadius: 12))swift
BadgeLabel(badge: badge)
.glassEffect(.regular, in: .rect(cornerRadius: 12))Glass effect union (merge multiple shapes)
玻璃效果合并(融合多个形状)
swift
GlassEffectContainer(spacing: 20.0) {
HStack(spacing: 20.0) {
ForEach(items.indices, id: \.self) { i in
Image(systemName: items[i])
.frame(width: 80, height: 80)
.glassEffect()
.glassEffectUnion(id: i < 2 ? "group1" : "group2",
namespace: namespace)
}
}
}swift
GlassEffectContainer(spacing: 20.0) {
HStack(spacing: 20.0) {
ForEach(items.indices, id: \.self) { i in
Image(systemName: items[i])
.frame(width: 80, height: 80)
.glassEffect()
.glassEffectUnion(id: i < 2 ? "group1" : "group2",
namespace: namespace)
}
}
}Tab bar minimize on scroll
滚动时标签栏最小化
swift
TabView {
Tab("Numbers", systemImage: "number") {
ScrollView { /* content */ }
}
}
.tabBarMinimizeBehavior(.onScrollDown)swift
TabView {
Tab("Numbers", systemImage: "number") {
ScrollView { /* 内容 */ }
}
}
.tabBarMinimizeBehavior(.onScrollDown)Scroll edge effect
滚动边缘效果
swift
ScrollView {
LazyVStack {
ForEach(data) { item in RowView(item) }
}
}
.scrollEdgeEffectStyle(.hard, for: .all)swift
ScrollView {
LazyVStack {
ForEach(data) { item in RowView(item) }
}
}
.scrollEdgeEffectStyle(.hard, for: .all)Concentric corner radii
同心圆角
swift
ZStack {
Color.cyan
.fill(.rect(corners: .concentric(minimum: 12), isUniform: false))
.padding(.all, padding)
}
.containerShape(.rect(cornerRadius: 24))swift
ZStack {
Color.cyan
.fill(.rect(corners: .concentric(minimum: 12), isUniform: false))
.padding(.all, padding)
}
.containerShape(.rect(cornerRadius: 24))API Quick Reference
API快速参考
| API | Framework | Purpose |
|---|---|---|
| SwiftUI | Apply Liquid Glass to any view |
| SwiftUI | Apply default (regular, capsule) glass |
| SwiftUI | Combine glass effects for performance + morphing |
| SwiftUI | Identity for morph transitions |
| SwiftUI | Control transition type ( |
| SwiftUI | Merge multiple shapes into one glass effect |
| SwiftUI | Config struct: |
| SwiftUI | Make glass react to touch/pointer |
| SwiftUI | Tint a glass effect |
| SwiftUI | Standard glass button |
| SwiftUI | Prominent glass button |
| SwiftUI | Clear variant glass button |
| SwiftUI | Extend view under sidebar/inspector |
| UIKit | Background extension in UIKit |
| AppKit | Background extension in AppKit |
| UIKit | Glass visual effect in UIKit |
| AppKit | Glass effect view in AppKit |
| SwiftUI | Separate toolbar groups |
| SwiftUI | |
| SwiftUI | Default capsule shape for glass |
| SwiftUI | Concentric corner radius shape |
| SwiftUI | Auto-minimize tab bar on scroll |
| SwiftUI | Legibility effect at scroll edges |
| Info.plist | Opt out of Liquid Glass (compatibility mode) |
| API | 框架 | 用途 |
|---|---|---|
| SwiftUI | 为任意视图应用Liquid Glass效果 |
| SwiftUI | 应用默认(常规、胶囊形)玻璃效果 |
| SwiftUI | 组合玻璃效果以提升性能并支持形态动画 |
| SwiftUI | 形态过渡动画的标识 |
| SwiftUI | 控制过渡类型( |
| SwiftUI | 将多个形状合并为一个玻璃效果 |
| SwiftUI | 配置结构体: |
| SwiftUI | 使玻璃效果响应触摸/指针操作 |
| SwiftUI | 为玻璃效果添加着色 |
| SwiftUI | 标准玻璃按钮样式 |
| SwiftUI | 突出显示的玻璃按钮样式 |
| SwiftUI | 透明变体玻璃按钮样式 |
| SwiftUI | 将视图延伸至侧边栏/检查器下方 |
| UIKit | UIKit中的背景扩展视图 |
| AppKit | AppKit中的背景扩展视图 |
| UIKit | UIKit中的玻璃视觉效果 |
| AppKit | AppKit中的玻璃效果视图 |
| SwiftUI | 分隔工具栏组 |
| SwiftUI | 过渡类型: |
| SwiftUI | 玻璃效果的默认胶囊形状 |
| SwiftUI | 同心圆角形状 |
| SwiftUI | 滚动时自动最小化标签栏 |
| SwiftUI | 滚动边缘的可读性效果 |
| Info.plist | 选择退出Liquid Glass适配(兼容模式) |
Common Mistakes
常见错误
Overusing Liquid Glass on custom controls. Apple explicitly warns: "Avoid overusing Liquid Glass effects. Limit these effects to the most important functional elements." Too many glass elements distract from content.
Not using GlassEffectContainer. Applying to multiple views without a container degrades performance. Always wrap related glass views in a .
glassEffectGlassEffectContainerApplying backgroundExtensionEffect with padding. The view must touch the leading/trailing edges of the containing view. Remove padding from the view and its containers so the effect can extend under the sidebar.
Putting overlays before backgroundExtensionEffect. Apply to the image first, then add after, so that overlaid text/buttons don't extend under the sidebar.
.backgroundExtensionEffect().overlay()Hard-coding layout metrics for controls. Controls have new shapes and sizes in iOS 26. If you hard-code dimensions, your controls won't adopt the new rounded forms automatically.
Ignoring accessibility settings. Liquid Glass adapts when users enable Reduce Transparency or Reduce Motion. Test with these settings on. Standard components handle this automatically; custom implementations need fallbacks.
Custom backgrounds interfering with glass. Remove custom backgrounds from bars, tab bars, toolbars, and split views. They overlay or interfere with the system Liquid Glass appearance.
Not testing with . To ship with the latest SDK while opting out temporarily, add this key to your Info.plist. Remove it when you're ready for the full Liquid Glass experience.
UIDesignRequiresCompatibility在自定义控件中过度使用Liquid Glass。Apple明确警告:“避免过度使用Liquid Glass效果。仅将这些效果应用于最重要的功能元素。”过多的玻璃元素会分散用户对内容的注意力。
未使用GlassEffectContainer。不为多个视图包裹容器就直接应用会降低性能。请始终将相关的玻璃视图包裹在中。
glassEffectGlassEffectContainer为应用了backgroundExtensionEffect的视图添加内边距。视图必须触达容器视图的左右边缘。请移除视图及其容器的内边距,使效果能够延伸至侧边栏下方。
在backgroundExtensionEffect之前添加叠加层。先为图片应用,再添加,避免叠加的文本/按钮延伸至侧边栏下方。
.backgroundExtensionEffect().overlay()为控件硬编码布局指标。iOS 26中控件有新的形状和尺寸。如果硬编码尺寸,控件将无法自动适配新的圆角样式。
忽略无障碍设置。当用户启用“降低透明度”或“减少动态效果”时,Liquid Glass会自动适配。请在这些设置开启的情况下进行测试。标准组件会自动处理这些场景;自定义实现则需要提供降级方案。
自定义背景干扰玻璃效果。移除导航栏、标签栏、工具栏和分栏视图的自定义背景。这些背景会覆盖或干扰系统Liquid Glass的外观。
未使用进行测试。如需使用最新SDK但暂时退出适配,请在Info.plist中添加该键。准备好全面适配Liquid Glass后再移除它。
UIDesignRequiresCompatibilityReference Files
参考文件
Detailed documentation organized by topic in :
references/| File | Content | Pages |
|---|---|---|
| Adopting Liquid Glass overview, Landmarks sample walkthrough, migration guide for existing apps | 2 |
| | 4 |
| | 23 |
| | 2 |
| Extending horizontal ScrollView under sidebar/inspector | 1 |
| Custom badges with glass effects, morph animations, ViewModifier patterns | 1 |
| | 2 |
| | 1 |
| Icon Composer workflow: layers, groups, Liquid Glass material, platform variants | 1 |
| | 1 |
| View styles overview, all Liquid Glass related SwiftUI style APIs | 1 |
references/| 文件 | 内容 | 页数 |
|---|---|---|
| Liquid Glass适配概述、Landmarks示例演练、现有应用迁移指南 | 2 |
| | 4 |
| | 23 |
| | 2 |
| 将水平ScrollView延伸至侧边栏/检查器下方 | 1 |
| 带玻璃效果的自定义徽章、形态动画、ViewModifier模式 | 1 |
| | 2 |
| | 1 |
| Icon Composer工作流:图层、分组、Liquid Glass材质、平台变体 | 1 |
| 用于退出适配的 | 1 |
| 视图样式概述、所有与Liquid Glass相关的SwiftUI样式API | 1 |
Working with This Skill
技能使用指南
Getting Started
入门
Read for the adoption overview and Landmarks sample walkthrough. It covers the full scope: background extension, horizontal scrolling, toolbar glass, custom badges, and Icon Composer.
references/getting_started.md阅读获取适配概述和Landmarks示例演练。内容涵盖完整范围:背景扩展、水平滚动、工具栏玻璃效果、自定义徽章和Icon Composer。
references/getting_started.mdFor Specific Features
特定功能参考
Each topic has a dedicated reference file. For custom glass views and animations, is the most comprehensive (23 pages covering all SwiftUI glass APIs).
custom_glass_views.md每个主题都有对应的参考文件。对于自定义玻璃视图和动画,是最全面的文档(23页,涵盖所有SwiftUI玻璃API)。
custom_glass_views.mdCross-Framework Implementation
跨框架实现
- SwiftUI: Primary framework. Use ,
glassEffect, etc.GlassEffectContainer - UIKit: Use and
UIGlassEffect. SeeUIBackgroundExtensionViewandcustom_glass_views.md.background_extension.md - AppKit: Use and
NSGlassEffectView. See same reference files.NSBackgroundExtensionView
- SwiftUI:主要框架。使用、
glassEffect等API。GlassEffectContainer - UIKit:使用和
UIGlassEffect。请查看UIBackgroundExtensionView和custom_glass_views.md。background_extension.md - AppKit:使用和
NSGlassEffectView。请查看相同的参考文件。NSBackgroundExtensionView
Adoption Checklist
适配检查清单
- Build with latest Xcode SDK to see automatic Liquid Glass adoption
- Remove custom backgrounds from bars, toolbars, split views
- Test with accessibility settings (Reduce Transparency, Reduce Motion)
- Group toolbar items with
ToolbarSpacer(.fixed) - Add to hero images in split views
backgroundExtensionEffect() - Wrap custom glass views in
GlassEffectContainer - Create new app icon with Icon Composer
- Test across all supported platforms
- 使用最新Xcode SDK构建,以查看自动适配的Liquid Glass效果
- 移除导航栏、工具栏、分栏视图的自定义背景
- 在无障碍设置(降低透明度、减少动态效果)下进行测试
- 使用对工具栏项目进行分组
ToolbarSpacer(.fixed) - 为分栏视图中的主图添加
backgroundExtensionEffect() - 将自定义玻璃视图包裹在中
GlassEffectContainer - 使用Icon Composer创建新的应用图标
- 在所有支持的平台上进行测试
Notes
说明
- Documentation sourced from Apple Developer Documentation via sosumi.ai extraction
- All APIs require iOS 26.0+ / iPadOS 26.0+ / macOS 26.0+ unless otherwise noted
- visionOS glass background APIs (,
glassBackgroundEffect) are separate from the Liquid Glass system described hereFeatheredGlassBackgroundEffect - watchOS and tvOS have limited Liquid Glass support; standard components adopt it automatically
- 文档内容通过sosumi.ai从Apple开发者文档提取
- 除非另有说明,所有API均要求iOS 26.0+ / iPadOS 26.0+ / macOS 26.0+
- visionOS的玻璃背景API(、
glassBackgroundEffect)与本文档描述的Liquid Glass系统无关FeatheredGlassBackgroundEffect - watchOS和tvOS对Liquid Glass的支持有限;标准组件会自动适配
Cross-References
交叉引用
- — Non-glass iOS 26 APIs (WebView, TextEditor rich text, @Animatable macro, UIHostingSceneDelegate, dragContainer, windowResizeAnchor)
swiftui-26-api
- — 非玻璃效果的iOS 26 API(WebView、TextEditor富文本、@Animatable宏、UIHostingSceneDelegate、dragContainer、windowResizeAnchor)
swiftui-26-api