帮助开发者与设计师实现 iOS 液态玻璃动态界面与交互效果。
复制安装指令,让 AI 自动完成配置 · 推荐新手
请帮我安装 askskill 上的 "liquid-glass-design" 技能: 1. 下载 https://raw.githubusercontent.com/affaan-m/ECC/main/skills/liquid-glass-design/SKILL.md 2. 保存为 ~/.claude/skills/liquid-glass-design/SKILL.md 3. 装好后重载技能,告诉我可以用了
请用 SwiftUI 创建一个 iOS 26 Liquid Glass 风格的信息卡片,包含背景模糊、边缘高光、轻微反射效果,以及点击时的形变动画,并附上可运行代码。
输出一段可运行的 SwiftUI 代码,实现液态玻璃卡片的视觉与交互动效。
请为 UIKit 设计一个 Liquid Glass 风格导航栏方案,说明如何实现半透明玻璃材质、滚动时反射变化,以及与浅色/深色模式的适配,并提供示例代码。
给出 UIKit 实现思路、关键样式说明,以及可参考的示例代码。
请为 WidgetKit 生成一个液态玻璃风格的小组件设计方案,包含层次结构、模糊与高光建议、内容排版原则,以及对应的 SwiftUI 组件代码。
输出小组件的视觉规范说明与对应代码,便于直接制作原型或开发。
Patterns for implementing Apple's Liquid Glass — a dynamic material that blurs content behind it, reflects color and light from surrounding content, and reacts to touch and pointer interactions. Covers SwiftUI, UIKit, and WidgetKit integration.
The simplest way to add Liquid Glass to any view:
Text("Hello, World!")
.font(.title)
.padding()
.glassEffect() // Default: regular variant, capsule shape
Text("Hello, World!")
.font(.title)
.padding()
.glassEffect(.regular.tint(.orange).interactive(), in: .rect(cornerRadius: 16.0))
Key customization options:
.regular — standard glass effect.tint(Color) — add color tint for prominence.interactive() — react to touch and pointer interactions.capsule (default), .rect(cornerRadius:), .circleButton("Click Me") { /* action */ }
.buttonStyle(.glass)
Button("Important") { /* action */ }
.buttonStyle(.glassProminent)
Always wrap multiple glass views in a container for performance and morphing:
GlassEffectContainer(spacing: 40.0) {
HStack(spacing: 40.0) {
Image(systemName: "scribble.variable")
.frame(width: 80.0, height: 80.0)
.font(.system(size: 36))
.glassEffect()
Image(systemName: "eraser.fill")
.frame(width: 80.0, height: 80.0)
.font(.system(size: 36))
.glassEffect()
}
}
The spacing parameter controls merge distance — closer elements blend their glass shapes together.
Combine multiple views into a single glass shape with glassEffectUnion:
@Namespace private var namespace
GlassEffectContainer(spacing: 20.0) {
HStack(spacing: 20.0) {
ForEach(symbolSet.indices, id: \.self) { item in
Image(systemName: symbolSet[item])
.frame(width: 80.0, height: 80.0)
.glassEffect()
.glassEffectUnion(id: item < 2 ? "group1" : "group2", namespace: namespace)
}
}
}
Create smooth morphing when glass elements appear/disappear:
@State private var isExpanded = false
@Namespace private var namespace
GlassEffectContainer(spacing: 40.0) {
HStack(spacing: 40.0) {
Image(systemName: "scribble.variable")
.frame(width: 80.0, height: 80.0)
.glassEffect()
.glassEffectID("pencil", in: namespace)
if isExpanded {
Image(systemName: "eraser.fill")
.frame(width: 80.0, height: 80.0)
.glassEffect()
.glassEffectID("eraser", in: namespace)
}
}
}
Button("Toggle") {
withAnimation { isExpanded.toggle() }
}
.buttonStyle(.glass)
To allow horizontal scroll content to extend under a sidebar or inspector, ensure the ScrollView content reaches the leading/trailing edges of the container. The system automatically handles the under-sidebar scrolling behavior when the layout extends to the edges — no additional modifier is needed.
let glassEffect = UIGlassEffect()
glassEffect.tintColor = UIColor.systemBlue.withAlphaComponent(0.3)
glassEffect.isInteractive = true
let visualEffectView = UIVisualEffectView(effect: glassEffect)
visualEffectView.translatesAutoresizingMaskIntoConstraints = false
…
帮助开发者为代码代理配置性能优化、安全防护与研究优先工作流。
提供数据库迁移、回滚与零停机发布的最佳实践指导,适用于多种 ORM 与 SQL 数据库。
通过双评审智能体对结果进行对抗式校验,提升输出发布前的可靠性
帮助你掌握地道 Rust 模式、所有权与并发实践,编写安全高性能应用。
基于 C++ Core Guidelines 编写、审查并重构更安全现代的 C++ 代码。
为 Claude Code 会话提供系统化校验流程,帮助检查结果正确性与质量。
将 liquid-glass-design 相关内容准确翻译为日语,适合设计与产品文档本地化。
使用 MockDeviceKit 在无实体眼镜硬件时进行功能联调与测试验证
帮助开发者用 MockDeviceKit 无需实体眼镜即可进行应用测试与调试。
帮助开发可视化界面,完成显示设备选择、控件配置与多媒体播放集成。
帮助你从间距、字体、阴影与交互细节入手,系统提升界面精致感。
将参考界面提炼为可量化的设计DNA,并据此生成风格一致的UI方案。