ios-hig
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseApple iOS HIG Best Practices
Apple iOS HIG最佳实践
Comprehensive guide for Apple Human Interface Guidelines compliance in iOS apps built with SwiftUI. Contains 34 rules across 6 categories covering navigation, interaction design, accessibility, user feedback, UX patterns, and visual design.
本指南是为使用SwiftUI构建的iOS应用提供的Apple人机界面指南(HIG)合规性综合参考,包含6个类别下的34条规则,覆盖导航、交互设计、无障碍访问、用户反馈、UX模式和视觉设计。
When to Apply
适用场景
Reference these guidelines when:
- Building navigation hierarchies with tab bars, NavigationStack, or split views
- Designing touch interactions, gestures, and haptic feedback
- Ensuring accessibility with VoiceOver, Dynamic Type, and color contrast
- Implementing loading states, error handling, and empty states
- Building onboarding flows, permission requests, and confirmation dialogs
- Supporting dark mode, SF Symbols, and standard layout margins
- Reviewing apps for HIG compliance
在以下场景中参考本指南:
- 使用标签栏、NavigationStack或分栏视图构建导航层级结构
- 设计触摸交互、手势和触觉反馈
- 通过VoiceOver、Dynamic Type和色彩对比度确保无障碍访问
- 实现加载状态、错误处理和空状态
- 构建引导流程、权限申请和确认对话框
- 支持深色模式、SF Symbols和标准布局边距
- 审核应用是否符合HIG规范
Rule Categories by Priority
按优先级划分的规则类别
| Priority | Category | Impact | Prefix |
|---|---|---|---|
| 1 | Navigation | CRITICAL | |
| 2 | Interaction Design | CRITICAL | |
| 3 | Accessibility | CRITICAL | |
| 4 | User Feedback | HIGH | |
| 5 | UX Patterns | HIGH | |
| 6 | Visual Design | HIGH | |
| 优先级 | 类别 | 影响程度 | 前缀 |
|---|---|---|---|
| 1 | 导航 | 关键 | |
| 2 | 交互设计 | 关键 | |
| 3 | 无障碍访问 | 关键 | |
| 4 | 用户反馈 | 高 | |
| 5 | UX模式 | 高 | |
| 6 | 视觉设计 | 高 | |
Quick Reference
快速参考
1. Navigation (CRITICAL)
1. 导航(关键)
- - Design tab bars for top-level navigation
nav-tab-bar - - Use NavigationStack for hierarchical navigation
nav-navigation-stack - - Place actions in toolbars using standard placements
nav-toolbar-placement
- - 为顶层导航设计标签栏
nav-tab-bar - - 使用NavigationStack构建层级导航
nav-navigation-stack - - 使用标准布局将操作放置在工具栏中
nav-toolbar-placement
2. Interaction Design (CRITICAL)
2. 交互设计(关键)
- - Maintain 44pt minimum touch targets
inter-touch-targets - - Use standard gesture patterns
inter-gesture-patterns - - Add haptic feedback for meaningful events
inter-haptic-feedback - - Handle keyboard appearance gracefully
inter-keyboard-handling - - Support drag and drop for content transfer
inter-drag-drop - - Support pull to refresh for lists
inter-pull-to-refresh - - Add swipe actions for contextual operations
inter-swipe-actions - - Use searchable for built-in search
inter-list-search
- - 保持44pt的最小触摸目标尺寸
inter-touch-targets - - 使用标准手势模式
inter-gesture-patterns - - 为重要事件添加触觉反馈
inter-haptic-feedback - - 优雅处理键盘显示
inter-keyboard-handling - - 支持拖拽功能以实现内容传输
inter-drag-drop - - 为列表支持下拉刷新
inter-pull-to-refresh - - 添加滑动操作以实现上下文相关功能
inter-swipe-actions - - 使用searchable实现内置搜索
inter-list-search
3. Accessibility (CRITICAL)
3. 无障碍访问(关键)
- - Provide meaningful accessibility labels
acc-labels - - Support Dynamic Type for all text
acc-dynamic-type - - Maintain sufficient color contrast
acc-color-contrast - - Respect reduce motion preference
acc-reduce-motion - - Never rely on color alone
acc-color-independent - - Manage focus for assistive technologies
acc-focus-management - - Use ScaledMetric for adaptive sizing
acc-scaled-metric - - Use ViewThatFits for adaptive layouts
acc-view-that-fits
- - 提供有意义的无障碍标签
acc-labels - - 为所有文本支持Dynamic Type
acc-dynamic-type - - 保持足够的色彩对比度
acc-color-contrast - - 遵循减少动效的偏好设置
acc-reduce-motion - - 绝不单独依赖色彩传递信息
acc-color-independent - - 为辅助技术管理焦点
acc-focus-management - - 使用ScaledMetric实现自适应尺寸
acc-scaled-metric - - 使用ViewThatFits实现自适应布局
acc-view-that-fits
4. User Feedback (HIGH)
4. 用户反馈(高)
- - Show appropriate loading indicators
feed-loading-states - - Handle errors with clear recovery actions
feed-error-states - - Use notifications judiciously
feed-notifications - - Confirm successful actions appropriately
feed-success-confirmation - - Design helpful empty states
feed-empty-states
- - 显示合适的加载指示器
feed-loading-states - - 通过清晰的恢复操作处理错误
feed-error-states - - 审慎使用通知
feed-notifications - - 适当地确认操作成功
feed-success-confirmation - - 设计实用的空状态
feed-empty-states
5. UX Patterns (HIGH)
5. UX模式(高)
- - Design minimal onboarding
ux-onboarding - - Request permissions in context
ux-permissions - - Use modality appropriately
ux-modality - - Use confirmation dialogs for destructive actions
ux-confirmation-dialog - - Minimize data entry friction
ux-data-entry - - Support undo for destructive actions
ux-undo - - Organize settings logically
ux-settings
- - 设计简洁的引导页
ux-onboarding - - 在合适的场景下申请权限
ux-permissions - - 合理使用模态窗口
ux-modality - - 为破坏性操作使用确认对话框
ux-confirmation-dialog - - 最小化数据输入的繁琐性
ux-data-entry - - 为破坏性操作支持撤销功能
ux-undo - - 逻辑化组织设置项
ux-settings
6. Visual Design (HIGH)
6. 视觉设计(高)
- - Support dark mode with semantic colors
vis-dark-mode - - Use SF Symbols with correct rendering mode and weight
vis-sf-symbols - - Use standard layout margins and safe areas
vis-layout-margins
- - 使用语义化色彩支持深色模式
vis-dark-mode - - 使用正确渲染模式和字重的SF Symbols
vis-sf-symbols - - 使用标准布局边距和安全区域
vis-layout-margins
How to Use
使用方法
Read individual reference files for detailed explanations and code examples:
- Section definitions - Category structure and impact levels
- Rule template - Template for adding new rules
阅读各个参考文件以获取详细说明和代码示例:
- 章节定义 - 类别结构和影响程度
- 规则模板 - 添加新规则的模板
Reference Files
参考文件
| File | Description |
|---|---|
| references/_sections.md | Category definitions and ordering |
| assets/templates/_template.md | Template for new rules |
| 文件 | 描述 |
|---|---|
| references/_sections.md | 类别定义与排序 |
| assets/templates/_template.md | 新规则模板 |