帮助开发者与设计师实现 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
…
帮助AI继承遗留项目的既有代码风格与架构习惯,持续避免风格漂移。
提供数据库迁移最佳实践,支持模式变更、回滚与零停机发布方案
为 Grafana、SigNoz 等平台构建能回答运维问题的实用监控仪表板。
帮助你为生产级 REST API 制定一致、易用的设计规范。
帮助你规划家庭与实验室网络拓扑、地址分配、设备连接与常见避坑。
接入并理解视频音频内容,支持检索片段、编辑处理与实时事件告警。
为 AI 编码代理提供精选且最新的 SwiftUI 组件参考与生成支持。
使用 MockDeviceKit 在无实体眼镜硬件时进行功能联调与测试验证
帮助开发可视化界面,完成显示设备选择、控件配置与多媒体播放集成。
帮助你从间距、字体、阴影与交互细节入手,系统提升界面精致感。
将参考界面提炼为可量化的设计DNA,并据此生成风格一致的UI方案。