ios-hig-design by wondelai/skills
npx skills add https://github.com/wondelai/skills --skill ios-hig-design用于设计原生 iOS 应用界面的框架,使其感觉直观、一致,并与苹果的设计理念保持一致。基于苹果的人机界面指南,这是构建能与 iPhone、iPad 及更广泛的苹果生态系统无缝集成的应用的权威资源。
苹果的 iOS 设计理念建立在三个基础支柱之上:清晰度、尊重和深度。每个元素都必须清晰易读且有目的性(清晰度)。界面绝不应掩盖其呈现的内容(尊重)。而分层、过渡和逼真的动效必须提供层次结构和空间关系(深度)。
基础: 最好的 iOS 应用不仅仅是机械地遵循 HIG 规则——它们内化了这样一个理念:界面存在的目的是为用户的内容和任务服务。原生组件、系统惯例和平台一致性不是约束——它们是 iOS 用户信任并享受那些感觉像是属于这个平台的应用的原因。
目标:10/10。 在评审或创建 iOS 界面或 SwiftUI/UIKit 代码时,根据对以下原则的遵循程度进行 0-10 分的评分。10/10 表示完全符合所有指南;较低的分数表示需要解决的差距。始终提供当前分数以及达到 10/10 所需的具体改进措施。
核心概念: iOS 设备具有特定的屏幕尺寸、安全区域插入边距和硬件侵入区域(刘海屏、灵动岛、主屏幕指示器),必须在每个布局中予以尊重。
为何有效: 当布局尊重安全区域和标准间距时,应用会感觉原生且值得信赖。用户的内容永远不会被硬件功能或系统 UI 遮挡,视觉节奏也与平台的其他部分相匹配。
关键见解:
产品应用:
| 上下文 | 布局模式 | 示例 |
|---|---|---|
| 状态栏 |
广告位招租
在这里展示您的产品或服务
触达数万 AI 开发者,精准高效
| 高度 59pt,始终被尊重 |
| 时间、信号、电池区域 |
| 导航栏 | 44pt 标准行 + 58pt 大标题 | 返回按钮、标题、操作 |
| 内容区域 | 灵活、可滚动、尊重安全区域 | 主要应用内容 |
| 标签栏 | 高度 49pt,带模糊效果的半透明 | 2-5 个主要目的地 |
| 主屏幕指示器 | 底部插入 34pt | 系统手势区域 |
代码模式:
VStack { }.ignoresSafeArea(),切勿用于交互式内容道德边界: 切勿将关键内容或控件隐藏在硬件侵入区域后面。任何设备的用户都应能平等地访问所有功能。
参见:references/navigation.md 以获取详细的导航栏和标签栏规范。
核心概念: iOS 使用旧金山(SF Pro)字体,并配有一个语义文本样式系统,可通过动态类型自动缩放以适应辅助功能需求。
为何有效: 语义文本样式在整个平台上创建了一致的视觉层次结构。动态类型确保每个用户——包括视力障碍者——都能以他们喜欢的尺寸阅读内容,而不会破坏布局。
关键见解:
产品应用:
| 上下文 | 排版模式 | 示例 |
|---|---|---|
| 屏幕标题 | .largeTitle 或 .title 样式 | 大标题在滚动时折叠 |
| 正文内容 | .body 样式,17pt | 列表项、描述 |
| 次要信息 | .subheadline 或 .footnote | 时间戳、元数据 |
| 标签标签 | 10pt SF 文本 | 标签栏项目标签 |
| 按钮 | .body 字重半粗体 | 主要操作文本 |
代码模式:
.font(.title)、.font(.body)、.font(.caption) 代替硬编码的尺寸@ScaledMetric 实现随动态类型缩放的自定义间距道德边界: 切勿禁用动态类型或设置固定的字体大小,从而阻止辅助功能缩放。每个用户都值得拥有可读的文本。
参见:references/typography.md 以获取完整的文本样式、字体大小和深色模式排版规则。
核心概念: iOS 提供语义系统颜色,这些颜色会自动在浅色和深色外观之间适应,确保两种模式下都有适当的对比度和视觉层次。
为何有效: 语义颜色无需手动干预即可在不同外观下保持可读性和层次结构。偏好深色模式的用户获得一流的体验,而支持两种模式的应用则感觉精致且原生。
关键见解:
Color(.label)、Color(.secondaryLabel)、Color(.systemBackground) 代替硬编码的颜色Color(.systemBlue) 是默认的色调/强调色;.systemRed 用于破坏性操作;.systemGreen 用于成功状态产品应用:
| 上下文 | 颜色模式 | 示例 |
|---|---|---|
| 主要文本 | Color(.label) | 根据模式适配白色/黑色 |
| 次要文本 | Color(.secondaryLabel) | 两种模式下均为 60% 不透明度 |
| 背景 | Color(.systemBackground) / .secondarySystemBackground | 分层深度 |
| 破坏性操作 | Color(.systemRed) | 删除按钮、警告 |
| 交互式色调 | 应用强调色或 .systemBlue | 链接、切换状态 |
代码模式:
.preferredColorScheme(.light) 和 .dark 来并排测试两种模式道德边界: 深色模式不是可选的润色——用户期望它。切勿发布在深色模式下不可读或显示异常的应用。
参见:references/colors-depth.md 以获取语义颜色、深色模式调色板和对比度比指南。
核心概念: iOS 使用分层导航模型,其中标签栏用于主要目的地,导航堆栈用于分层深入,模态视图用于聚焦任务。
为何有效: 一致的导航模式意味着用户始终知道他们在哪里、他们是如何到达那里的以及如何返回。违反这些模式会造成混乱,并使应用在 iOS 上感觉陌生。
关键见解:
产品应用:
| 上下文 | 导航模式 | 示例 |
|---|---|---|
| 应用结构 | 带有 3-5 个标签的标签栏 | 首页、搜索、个人资料 |
| 内容层次结构 | 推送导航(深入) | 列表 > 详情 > 编辑 |
| 聚焦任务 | 模态呈现 | 撰写、设置、筛选 |
| 搜索 | 下拉搜索栏 | 类 Spotlight 搜索 |
| 分屏视图 | iPad 侧边栏 + 详情 | iPad 上的邮件、备忘录 |
代码模式:
NavigationStack(而非已弃用的 NavigationView)道德边界: 切勿在没有明确退出的情况下将用户困在流程中。每个屏幕都必须有明确的返回或关闭方式。
参见:references/navigation.md 以获取标签栏、导航栏、模态视图、搜索模式和分屏视图的详细信息。
核心概念: iOS 提供了一个丰富的原生控件库(按钮、列表、开关、选择器、菜单、文本字段),用户已经理解并期望使用它们。
为何有效: 原生控件内置了辅助功能、触觉反馈和用户已经学会的交互模式。自定义控件会产生摩擦,并且常常会错过苹果已经解决的边缘情况。
关键见解:
.emailAddress、.phonePad、.URL).textContentType 支持自动填充(电子邮件、密码、地址)产品应用:
| 上下文 | 控件模式 | 示例 |
|---|---|---|
| 表单 | 带有适当键盘类型的原生文本字段 | 带有 @ 键盘的电子邮件字段 |
| 设置 | 带有开关、披露指示器的分组列表 | iOS 设置样式 |
| 选择 | 选择器、分段控件或操作列表 | 日期选择器、排序选项 |
| 破坏性操作 | 红色按钮 + 确认警告 | “删除账户”流程 |
| 上下文操作 | 长按菜单或滑动操作 | 行上的编辑、分享、删除 |
代码模式:
.keyboardType(.emailAddress) 和 .textContentType(.emailAddress).alert() 或 .confirmationDialog().swipeActions 处理常见操作道德边界: 切勿将广告伪装成本地控件,或使破坏性操作过于容易意外触发。确认对话框的存在是有原因的。
参见:references/components.md 以获取按钮、列表、输入控件、菜单和确认对话框的详细信息。另请参见:references/keyboard-input.md 以获取键盘类型和输入模式。
核心概念: iOS 拥有世界一流的辅助功能(旁白、动态类型、切换控制、语音控制),每个应用都必须将其作为首要关注点来支持,而不是事后考虑。
为何有效: 辅助功能不是可选的——它是应用商店指南和道德设计实践的要求。全球有超过 10 亿人患有某种形式的残疾。无障碍应用也使所有用户受益(阳光下更大的文字、驾驶时使用旁白)。
关键见解:
.accessibilityLabel.accessibilityValue 表示当前状态,使用 .accessibilityHint 描述其作用.accessibilityElement(children: .combine) 将相关元素分组产品应用:
| 上下文 | 辅助功能模式 | 示例 |
|---|---|---|
| 图标 | .accessibilityLabel("收藏") | 带有标签的心形图标 |
| 滑块 | .accessibilityValue("\(Int(volume * 100))%") | 音量控制 |
| 按钮 | .accessibilityHint("分享此项目") | 分享按钮 |
| 分组 | .accessibilityElement(children: .combine) | 头像 + 姓名行 |
| 图像 | 装饰性:.accessibilityHidden(true) | 背景图案 |
代码模式:
道德边界: 辅助功能不是可有可无的。发布一个无法访问的应用会排除真实的人群。将旁白测试视为与视觉测试同等重要。
参见:references/accessibility.md 以获取旁白实现、动态类型支持和辅助功能检查清单。
核心概念: iOS 使用 SF Symbols 作为标准图标系统,并要求应用图标具有特定尺寸,并自动应用标志性的超椭圆(“圆角矩形”)蒙版。
为何有效: SF Symbols 的设计旨在与旧金山文本完美对齐,随动态类型缩放,并适应不同的字重和尺寸。一致的图标设计使界面感觉连贯且原生。
关键见解:
Image(systemName:))——它们随文本缩放产品应用:
| 上下文 | 图标模式 | 示例 |
|---|---|---|
| 标签栏 | SF Symbols,选中状态使用填充变体 | house.fill, magnifyingglass |
| 导航栏 | 常规字重的 SF Symbols | gear, plus, ellipsis |
| 列表附件 | SF Symbols,次要颜色 | chevron.right, checkmark |
| 应用图标 | 1024px 正方形,简洁大胆的设计 | 单一可识别的字形 |
| 小组件 | 匹配小组件样式的 SF Symbols | 与应用品牌一致 |
代码模式:
Image(systemName: "heart.fill").symbolRenderingMode(.hierarchical) 实现多色深度.imageScale(.large) 或 .font() 相对于文本调整符号大小道德边界: 切勿使用暗示不存在功能的误导性图标。图标的含义应与 iOS 惯例匹配(例如,垃圾桶 = 删除,而不是归档)。
参见:references/app-icons.md 以获取图标尺寸表、形状规范和设计指南。
核心概念: iOS 定义了标准手势(滑动返回、下拉刷新、长按显示上下文菜单)和触觉反馈模式,必须予以尊重且不得覆盖。
为何有效: 手势是肌肉记忆。当应用覆盖滑动返回手势或重新利用下拉刷新时,用户会感到迷失方向和沮丧。触觉反馈提供了操作已注册的无形确认,减少了不确定性。
关键见解:
产品应用:
| 上下文 | 手势/触觉模式 | 示例 |
|---|---|---|
| 导航 | 从左边缘向右滑动 | 系统返回手势 |
| 模态视图 | 向下滑动关闭 | 表单关闭 |
| 列表 | 下拉刷新、滑动操作 | 刷新内容、删除行 |
| 媒体 | 双指缩放、双击 | 照片查看器 |
| 确认 | 完成时使用 .success 触觉 | 支付确认 |
| 选择 | 切换/选择时使用选择触觉 | 选择器滚轮滚动 |
代码模式:
UIImpactFeedbackGenerator(style: .medium)UINotificationFeedbackGenerator() 配合 .success、.warning、.errorUISelectionFeedbackGenerator().prepare() 以最小化延迟道德边界: 切勿使用激进的触觉反馈来迫使用户采取行动。触觉反馈应起到确认作用,而非胁迫。
参见:references/gestures.md 以获取标准手势表、触觉反馈模式和动画指南。
| 错误 | 为何失败 | 修复方法 |
|---|---|---|
| 覆盖标准手势 | 用户期望全局的滑动返回、下拉刷新;覆盖会破坏肌肉记忆 | 将系统手势用于其预期目的;仅对补充操作添加自定义手势 |
| 触摸目标小于 44pt | 小目标导致误触,使用户沮丧,尤其是有辅助功能需求的用户 | 确保所有交互元素至少为 44 x 44pt |
| 忽略安全区域 | 内容被刘海屏、灵动岛或主屏幕指示器遮挡 | 始终尊重安全区域插入边距;仅对背景使用 .ignoresSafeArea() |
| 在 iOS 上使用 Android 模式 | 汉堡菜单、顶部标签栏、Material 风格的悬浮操作按钮感觉陌生 | 使用标签栏进行主要导航、底部表单、原生 iOS 组件 |
| 跳过深色模式 | 偏好深色模式的用户看到破损的布局、不可读的文本 | 使用语义颜色;测试两种外观;定义浅色/深色颜色对 |
| 硬编码字体大小 | 破坏动态类型,排除了需要更大文本的用户 | 始终使用语义文本样式(.title、.body、.caption) |
| 文本对比度低 | 不符合 WCAG AA 标准,在阳光下或对视力低下用户不可读 | 保持最小 4.5:1 对比度比;在启用“增加对比度”设置下测试 |
| 未在真实设备上测试 | 模拟器会遗漏性能、触觉反馈、安全区域边缘情况 | 在物理设备上测试,尤其是最小和最大屏幕尺寸的设备 |
审核任何 iOS 界面设计:
| 问题 | 如果否 | 行动 |
|---|---|---|
| 布局是否在所有设备尺寸上都尊重安全区域? | 内容可能被硬件功能遮挡 | 在 iPhone SE 和 Pro Max 上审核所有屏幕;修复安全区域插入边距 |
| 所有触摸目标是否至少为 44 x 44pt? | 用户会误触,尤其是有辅助功能需求的用户 | 增加点击区域;使用 .frame(minWidth: 44, minHeight: 44) |
| 应用在深色模式下是否完全正常工作? | 深色模式用户看到破损/不可读的 UI | 用语义系统颜色替换硬编码的颜色 |
| 文本是否随动态类型正确缩放? | 违反辅助功能;排除视力低下用户 | 用语义文本样式替换固定字体大小;在最大设置下测试 |
| 旁白用户能否完成每项任务? | 应用对盲人和视力低下用户无法访问 | 为所有交互元素添加无障碍标签、值、提示 |
| 导航模式是否是原生 iOS 的? | 应用感觉陌生;用户难以导航 | 用标签栏替换汉堡菜单;使用标准推送/模态导航 |
此技能基于苹果的人机界面指南,这是所有苹果平台的官方设计文档。有关完整指南、平台特定指导和最新更新:
Apple Human Interface Guidelines 由苹果的人机界面设计团队撰写和维护,该团队是科技界最具影响力的设计组织之一。HIG 的起源可追溯到 1984 年,当时苹果在发布第一台 Macintosh 电脑的同时发布了原始的 Macintosh Human Interface Guidelines。该文件确立的原则——直接操作、所见即所得、一致性、用户控制——定义了数十年的图形用户界面设计。在包括 Jef Raskin、Bruce Tognazzini,以及后来的 Jony Ive 和 Alan Dye 在内的设计师领导下,苹果的设计理念通过 Mac OS、iPhone (2007)、iPad (2010)、Apple Watch (2015) 和 Apple Vision Pro (2024) 不断发展。HIG 不断更新以反映新的交互范式——从鼠标到多点触控再到空间计算——同时保持了核心信念,即技术应该是直观、可访问且令人愉悦的。如今,HIG 可在 developer.apple.com 上免费获取,并且仍然是任何在苹果平台上构建应用的人的必备参考。
每周安装数
406
仓库
GitHub 星标数
255
首次出现
2026年1月29日
安全审计
安装于
opencode364
gemini-cli358
codex354
cursor346
github-copilot333
claude-code330
Framework for designing native iOS app interfaces that feel intuitive, consistent, and aligned with Apple's design philosophy. Based on Apple's Human Interface Guidelines, the definitive resource for building apps that integrate seamlessly with iPhone, iPad, and the broader Apple ecosystem.
Apple's iOS design philosophy rests on three foundational pillars: clarity, deference, and depth. Every element must be legible and purposeful (clarity). The interface should never overshadow the content it presents (deference). And layering, transitions, and realistic motion must provide hierarchy and spatial relationships (depth).
The foundation: The best iOS apps don't just follow HIG rules mechanically---they internalize the philosophy that the interface exists to serve the user's content and tasks. Native components, system conventions, and platform consistency aren't constraints---they're the reason iOS users trust and enjoy apps that feel like they belong.
Goal: 10/10. When reviewing or creating iOS interfaces or SwiftUI/UIKit code, rate them 0-10 based on adherence to the principles below. A 10/10 means full alignment with all guidelines; lower scores indicate gaps to address. Always provide the current score and specific improvements needed to reach 10/10.
Core concept: iOS devices have specific screen dimensions, safe area insets, and hardware intrusions (notch, Dynamic Island, home indicator) that must be respected in every layout.
Why it works: When layouts respect safe areas and standard spacing, the app feels native and trustworthy. Users never have content hidden behind hardware features or system UI, and the visual rhythm matches the rest of the platform.
Key insights:
Product applications:
| Context | Layout Pattern | Example |
|---|---|---|
| Status bar | 59pt height, always respected | Time, signal, battery area |
| Navigation bar | 44pt standard row + 58pt large title | Back button, title, actions |
| Content area | Flexible, scrollable, respects safe area | Main app content |
| Tab bar | 49pt height, translucent with blur | 2-5 primary destinations |
| Home indicator | 34pt inset at bottom | System gesture area |
Copy patterns:
VStack { } which respects safe areas by default.ignoresSafeArea() only for backgrounds and decorative elements, never for interactive contentEthical boundary: Never hide critical content or controls behind hardware intrusions. Users with any device should have equal access to all functionality.
See: references/navigation.md for detailed navigation bar and tab bar specifications.
Core concept: iOS uses the San Francisco (SF Pro) typeface with a semantic text style system that automatically scales for accessibility via Dynamic Type.
Why it works: Semantic text styles create consistent visual hierarchy across the platform. Dynamic Type ensures every user---including those with visual impairments---can read content at their preferred size without breaking layouts.
Key insights:
Product applications:
| Context | Typography Pattern | Example |
|---|---|---|
| Screen titles | .largeTitle or .title style | Large title collapses on scroll |
| Body content | .body style, 17pt | List items, descriptions |
| Secondary info | .subheadline or .footnote | Timestamps, metadata |
| Tab labels | 10pt SF text |
Copy patterns:
.font(.title), .font(.body), .font(.caption) instead of hardcoded sizes@ScaledMetric for custom spacing that scales with Dynamic TypeEthical boundary: Never disable Dynamic Type or set fixed font sizes that prevent accessibility scaling. Every user deserves readable text.
See: references/typography.md for complete text styles, font sizes, and Dark Mode typography rules.
Core concept: iOS provides semantic system colors that automatically adapt between light and dark appearances, ensuring proper contrast and visual hierarchy in both modes.
Why it works: Semantic colors maintain readability and hierarchy across appearances without manual intervention. Users who prefer Dark Mode get a first-class experience, and apps that support both modes feel polished and native.
Key insights:
Color(.label), Color(.secondaryLabel), Color(.systemBackground) instead of hardcoded colorsColor(.systemBlue) is the default tint/accent; .systemRed for destructive actions; .systemGreen for successProduct applications:
| Context | Color Pattern | Example |
|---|---|---|
| Primary text | Color(.label) | Adapts white/black per mode |
| Secondary text | Color(.secondaryLabel) | 60% opacity in both modes |
| Backgrounds | Color(.systemBackground) / .secondarySystemBackground | Layered depth |
| Destructive actions | Color(.systemRed) |
Copy patterns:
.preferredColorScheme(.light) and .dark in previews to test both modes side by sideEthical boundary: Dark Mode is not optional polish---it is expected by users. Never ship an app that is unreadable or broken in Dark Mode.
See: references/colors-depth.md for semantic colors, Dark Mode palette, and contrast ratio guidelines.
Core concept: iOS uses a layered navigation model with tab bars for primary destinations, navigation stacks for hierarchical drilling, and modals for focused tasks.
Why it works: Consistent navigation patterns mean users always know where they are, how they got there, and how to go back. Violating these patterns creates confusion and makes the app feel foreign on iOS.
Key insights:
Product applications:
| Context | Navigation Pattern | Example |
|---|---|---|
| App structure | Tab bar with 3-5 tabs | Home, Search, Profile |
| Content hierarchy | Push navigation (drill-down) | List > Detail > Edit |
| Focused tasks | Modal presentation | Compose, settings, filters |
| Search | Pull-down search bar | Spotlight-style search |
| Split view | iPad sidebar + detail | Mail, Notes on iPad |
Copy patterns:
NavigationStack (not deprecated NavigationView) in SwiftUIEthical boundary: Never trap users in flows without a clear exit. Every screen must have an obvious way to go back or dismiss.
See: references/navigation.md for tab bar, navigation bar, modals, search patterns, and split views.
Core concept: iOS provides a rich library of native controls (buttons, lists, toggles, pickers, menus, text fields) that users already understand and expect.
Why it works: Native controls come with built-in accessibility, haptic feedback, and interaction patterns that users have already learned. Custom controls create friction and often miss edge cases that Apple has already solved.
Key insights:
.emailAddress, .phonePad, .URL).textContentType for autofill support (email, password, address)Product applications:
| Context | Control Pattern | Example |
|---|---|---|
| Forms | Native text fields with proper keyboard types | Email field with @ keyboard |
| Settings | Grouped list with toggles, disclosure | iOS Settings style |
| Selection | Picker, segmented control, or action sheet | Date picker, sort options |
| Destructive actions | Red button + confirmation alert | "Delete Account" flow |
| Context actions | Long press menu or swipe actions | Edit, share, delete on row |
Copy patterns:
.keyboardType(.emailAddress) and .textContentType(.emailAddress) together.alert() or .confirmationDialog().swipeActions on list rows for common actionsEthical boundary: Never disguise ads as native controls or make destructive actions too easy to trigger accidentally. Confirmation dialogs exist for a reason.
See: references/components.md for buttons, lists, input controls, menus, and confirmation dialogs. See also: references/keyboard-input.md for keyboard types and input patterns.
Core concept: iOS has world-class accessibility features (VoiceOver, Dynamic Type, Switch Control, Voice Control) and every app must support them as a first-class concern, not an afterthought.
Why it works: Accessibility is not optional---it is required by app store guidelines and by ethical design practice. Over 1 billion people worldwide live with some form of disability. Accessible apps also benefit all users (larger text in sunlight, VoiceOver while driving).
Key insights:
.accessibilityLabel describing what it is.accessibilityValue for current state and .accessibilityHint for what it does.accessibilityElement(children: .combine)Product applications:
| Context | Accessibility Pattern | Example |
|---|---|---|
| Icons | .accessibilityLabel("Favorite") | Heart icon with label |
| Sliders | .accessibilityValue("\(Int(volume * 100))%") | Volume control |
| Buttons | .accessibilityHint("Shares this item") | Share button |
| Groups | .accessibilityElement(children: .combine) | Avatar + name row |
Copy patterns:
Ethical boundary: Accessibility is not a nice-to-have. Shipping an inaccessible app excludes real people. Treat VoiceOver testing as seriously as visual testing.
See: references/accessibility.md for VoiceOver implementation, Dynamic Type support, and accessibility checklist.
Core concept: iOS uses SF Symbols as the standard icon system and requires app icons in specific sizes with the signature superellipse ("squircle") mask applied automatically.
Why it works: SF Symbols are designed to align perfectly with San Francisco text, scale with Dynamic Type, and adapt to different weights and sizes. Consistent iconography makes the interface feel cohesive and native.
Key insights:
Image(systemName:)) for all standard icons---they scale with textProduct applications:
| Context | Icon Pattern | Example |
|---|---|---|
| Tab bar | SF Symbols, filled variant for selected | house.fill, magnifyingglass |
| Navigation bar | SF Symbols at regular weight | gear, plus, ellipsis |
| List accessories | SF Symbols, secondary color | chevron.right, |
Copy patterns:
Image(systemName: "heart.fill") for SF Symbols.symbolRenderingMode(.hierarchical) for multi-color depth.imageScale(.large) or .font() to size symbols relative to textEthical boundary: Never use misleading icons that suggest functionality that does not exist. Icon meaning should match the iOS convention (e.g., trash = delete, not archive).
See: references/app-icons.md for icon size tables, shape specifications, and design guidelines.
Core concept: iOS defines standard gestures (swipe back, pull to refresh, long press for context menu) and haptic feedback patterns that must be respected and never overridden.
Why it works: Gestures are muscle memory. When an app overrides the swipe-back gesture or repurposes pull-to-refresh, users feel disoriented and frustrated. Haptics provide invisible confirmation that an action registered, reducing uncertainty.
Key insights:
Product applications:
| Context | Gesture/Haptic Pattern | Example |
|---|---|---|
| Navigation | Swipe right from left edge | System back gesture |
| Modals | Swipe down to dismiss | Sheet dismissal |
| Lists | Pull to refresh, swipe for actions | Refresh content, delete row |
| Media | Pinch to zoom, double-tap | Photo viewer |
| Confirmation | .success haptic on completion | Payment confirmed |
| Selection | Selection haptic on toggle/pick | Picker wheel scroll |
Copy patterns:
UIImpactFeedbackGenerator(style: .medium) for physical interactionsUINotificationFeedbackGenerator() with .success, .warning, .error for outcomesUISelectionFeedbackGenerator() for UI state changes.prepare() before triggering haptics to minimize latencyEthical boundary: Never use aggressive haptics to pressure users into actions. Haptic feedback should confirm, not coerce.
See: references/gestures.md for standard gesture table, haptic feedback patterns, and animation guidelines.
| Mistake | Why It Fails | Fix |
|---|---|---|
| Overriding standard gestures | Users expect swipe-back, pull-refresh globally; overriding breaks muscle memory | Use system gestures for their intended purposes; add custom gestures only for supplementary actions |
| Touch targets under 44pt | Small targets cause mis-taps and frustrate users, especially with accessibility needs | Ensure all interactive elements are at least 44 x 44pt |
| Ignoring safe areas | Content hidden behind notch, Dynamic Island, or home indicator | Always respect safe area insets; use .ignoresSafeArea() only for backgrounds |
| Using Android patterns on iOS | Hamburger menus, top tab bars, material-style FABs feel foreign | Use tab bars for primary navigation, bottom sheets, native iOS components |
| Skipping Dark Mode | Users who prefer Dark Mode see broken layouts, unreadable text | Use semantic colors; test both appearances; define light/dark color pairs |
Audit any iOS interface design:
| Question | If No | Action |
|---|---|---|
| Does the layout respect safe areas on all device sizes? | Content may be hidden behind hardware features | Audit all screens on iPhone SE and Pro Max; fix safe area insets |
| Are all touch targets at least 44 x 44pt? | Users will mis-tap, especially with accessibility needs | Increase tap areas; use .frame(minWidth: 44, minHeight: 44) |
| Does the app work fully in Dark Mode? | Dark Mode users see broken/unreadable UI | Replace hardcoded colors with semantic system colors |
| Does text scale properly with Dynamic Type? | Accessibility violation; excludes low-vision users | Replace fixed font sizes with semantic text styles; test at largest setting |
| Can a VoiceOver user complete every task? | App is inaccessible to blind and low-vision users | Add accessibility labels, values, hints to all interactive elements |
| Are navigation patterns native iOS? | App feels foreign; users struggle to navigate | Replace hamburger menus with tab bars; use standard push/modal navigation |
This skill is based on Apple's Human Interface Guidelines, the official design documentation for all Apple platforms. For the complete guidelines, platform-specific guidance, and latest updates:
The Apple Human Interface Guidelines are authored and maintained by Apple's Human Interface Design team, one of the most influential design organizations in technology. The HIG traces its origins to 1984, when Apple published the original Macintosh Human Interface Guidelines alongside the launch of the first Macintosh computer. That document established principles---direct manipulation, see-and-point, consistency, WYSIWYG, user control---that defined graphical user interface design for decades. Under the leadership of designers including Jef Raskin, Bruce Tognazzini, and later Jony Ive and Alan Dye, Apple's design philosophy evolved through Mac OS, iPhone (2007), iPad (2010), Apple Watch (2015), and Apple Vision Pro (2024). The HIG has been continuously updated to reflect new interaction paradigms---from mouse to multi-touch to spatial computing---while maintaining the core belief that technology should be intuitive, accessible, and delightful. Today the HIG is freely available at developer.apple.com and remains the essential reference for anyone building apps on Apple platforms.
Weekly Installs
406
Repository
GitHub Stars
255
First Seen
Jan 29, 2026
Security Audits
Gen Agent Trust HubFailSocketPassSnykPass
Installed on
opencode364
gemini-cli358
codex354
cursor346
github-copilot333
claude-code330
前端打磨(Polish)终极指南:提升产品细节与用户体验的系统化检查清单
33,400 周安装
| Tab bar item labels |
| Buttons | .body weight semibold | Primary action text |
| Delete buttons, warnings |
| Interactive tint | App accent color or .systemBlue | Links, toggle states |
Decorative: .accessibilityHidden(true) |
| Background patterns |
checkmark| App icon | 1024px square, simple bold design | Single recognizable glyph |
| Widgets | SF Symbols matching widget style | Consistent with app branding |
| Hardcoding font sizes |
| Breaks Dynamic Type, excludes users who need larger text |
Use semantic text styles (.title, .body, .caption) throughout |
| Low contrast text | Fails WCAG AA, unreadable in sunlight or for low-vision users | Maintain 4.5:1 minimum contrast ratio; test with Increase Contrast setting |
| Not testing on real devices | Simulator misses performance, haptics, safe area edge cases | Test on physical devices, especially the smallest and largest screen sizes |