Loading...
Loading...
Compare original and translation side by side
What does the user SEE in the first half-second — before they read a single word?
// 0.5s: Four warm gradient cards stacked on black — a cookbook用户在最初的0.5秒内会看到什么——在他们阅读任何文字之前?
// 0.5s: 黑色背景上堆叠四张暖色调渐变卡片——食谱应用.system(size: 64).largeTitle.fontDesign(.rounded).caption.footnote.secondary.system(size: 64).fontDesign(.rounded).largeTitle.caption.footnote.secondarypython scripts/generate_palette.py \
--seed <hue-degrees> \
--mode both \
--items <collection-count> \
--app "App Name"enum Palette { ... }--itemsColor.red.green.bluePalette.primaryPalette.cardBackgroundColor(hue:)python scripts/generate_palette.py \\
--seed <hue-degrees> \\
--mode both \\
--items <collection-count> \\
--app "App Name"enum Palette { ... }--itemsColor.red.green.bluePalette.primaryPalette.cardBackgroundColor(hue:)LabeledContent("Steps", value: "8,432").titleLabeledContent("步数", value: "8,432").title.insetGroupedRoundedRectangle(cornerRadius: 16).fill(.secondary.opacity(0.15))LazyVGridLazyVStackScrollView.insetGroupedRoundedRectangle(cornerRadius: 16).secondary.opacity(0.15)ScrollViewLazyVGridLazyVStack.monospacedDigit()@ScaledMetric.contentTransition(.numericText()).sensoryFeedback()LabeledContent.monospacedDigit()@ScaledMetric.contentTransition(.numericText()).sensoryFeedback()LabeledContent// NO TASTE — jumped straight to layout, no user thinking
struct DemoView: View {
var body: some View {
NavigationStack {
List {
Section("Instructions") {
Text("This demo shows how lists work")
}
Section("Items") {
ForEach(1...5, id: \.self) { i in
HStack {
Image(systemName: "star")
Text("Item \(i)")
Spacer()
Text("Detail")
.foregroundStyle(.secondary)
}
}
}
}
.navigationTitle("Demo")
}
}
}// 缺乏质感——直接跳到布局,没有考虑用户
struct DemoView: View {
var body: some View {
NavigationStack {
List {
Section("说明") {
Text("此演示展示列表的用法")
}
Section("项目") {
ForEach(1...5, id: \\.self) { i in
HStack {
Image(systemName: "star")
Text("项目 \\(i)")
Spacer()
Text("详情")
.foregroundStyle(.secondary)
}
}
}
}
.navigationTitle("演示")
}
}
}// GOLDEN — Weather-inspired fitness dashboard
// User: Alex, 28, just finished a morning run, wants to see today's stats
// Emotional intent: MOTIVATED — celebrate the effort, inspire tomorrow
// Hero: calorie ring dominating the top half
struct FitnessCardView: View {
let calories: Int = 847
let goal: Int = 1000
var body: some View {
ScrollView {
VStack(spacing: 20) {
// Hero ring — 40% of visible screen, not a row in a list
ZStack {
Circle()
.stroke(.quaternary, lineWidth: 20)
Circle()
.trim(from: 0, to: Double(calories) / Double(goal))
.stroke(calorieGradient, style: StrokeStyle(lineWidth: 20, lineCap: .round))
.rotationEffect(.degrees(-90))
VStack(spacing: 4) {
Text("\(calories)")
.font(.system(size: 56, weight: .bold, design: .rounded))
Text("of \(goal) cal")
.font(.subheadline)
.foregroundStyle(.secondary)
}
}
.frame(width: 220, height: 220)
.padding(.top, 20)
// Stat cards — NOT LabeledContent rows
HStack(spacing: 12) {
statCard("Distance", value: "5.2 km", color: .blue)
statCard("Time", value: "28:14", color: .green)
statCard("Pace", value: "5'26\"", color: .orange)
}
}
.padding()
}
}
private func statCard(_ label: String, value: String, color: Color) -> some View {
VStack(spacing: 6) {
Text(value)
.font(.system(.title3, design: .rounded))
.fontWeight(.semibold)
Text(label)
.font(.caption)
.foregroundStyle(.secondary)
}
.frame(maxWidth: .infinity)
.padding(.vertical, 16)
.background(color.opacity(0.1), in: .rect(cornerRadius: 12))
}
private var calorieGradient: AngularGradient {
AngularGradient(colors: [.red, .orange, .yellow], center: .center)
}
}// 优秀示例——天气风格的健身仪表盘
// 用户:Alex,28岁,刚完成晨跑,想查看今天的统计数据
// 情感意图:充满动力——庆祝努力,激励明天
// 核心元素:占据上半屏的卡路里环形图
struct FitnessCardView: View {
let calories: Int = 847
let goal: Int = 1000
var body: some View {
ScrollView {
VStack(spacing: 20) {
// 核心环形图——占可见屏幕的40%,不是List中的一行
ZStack {
Circle()
.stroke(.quaternary, lineWidth: 20)
Circle()
.trim(from: 0, to: Double(calories) / Double(goal))
.stroke(calorieGradient, style: StrokeStyle(lineWidth: 20, lineCap: .round))
.rotationEffect(.degrees(-90))
VStack(spacing: 4) {
Text("\\(calories)")
.font(.system(size: 56, weight: .bold, design: .rounded))
Text("of \\(goal) cal")
.font(.subheadline)
.foregroundStyle(.secondary)
}
}
.frame(width: 220, height: 220)
.padding(.top, 20)
// 统计卡片——不是LabeledContent行
HStack(spacing: 12) {
statCard("距离", value: "5.2 km", color: .blue)
statCard("时间", value: "28:14", color: .green)
statCard("配速", value: "5'26\\"", color: .orange)
}
}
.padding()
}
}
private func statCard(_ label: String, value: String, color: Color) -> some View {
VStack(spacing: 6) {
Text(value)
.font(.system(.title3, design: .rounded))
.fontWeight(.semibold)
Text(label)
.font(.caption)
.foregroundStyle(.secondary)
}
.frame(maxWidth: .infinity)
.padding(.vertical, 16)
.background(color.opacity(0.1), in: .rect(cornerRadius: 12))
}
private var calorieGradient: AngularGradient {
AngularGradient(colors: [.red, .orange, .yellow], center: .center)
}
}| NEVER (reflex) | GOLDEN (reach for this instead) |
|---|---|
| |
| |
| Hero typography |
| |
| |
| Segmented control or custom pill |
| |
Default | Gradients, |
MeshGradient.scrollTransition.containerRelativeFrame.visualEffectCanvasTimelineView.scrollTargetBehavior(.paging)UnevenRoundedRectangle| 切勿(本能选择) | 推荐(优先选择) |
|---|---|
| |
| |
用 | 使用 |
| |
| |
| 分段控件或自定义胶囊按钮 |
用 | |
默认 | 渐变、 |
MeshGradient.scrollTransition.containerRelativeFrame.visualEffectCanvasTimelineView.scrollTargetBehavior(.paging)UnevenRoundedRectangleMeshGradientLinearGradient.ignoresSafeArea().stroke(.ultraThinMaterial).ultraThinMaterial.regularMaterialMeshGradientLinearGradient.ignoresSafeArea().stroke(.ultraThinMaterial).ultraThinMaterial.regularMaterialreferences/apple-design-dna.mdreferences/apple-design-dna.md