hig-patterns

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Apple HIG: Interaction Patterns

Apple HIG:交互模式

Check for
.claude/apple-design-context.md
before asking questions. Use existing context and only ask for information not already covered.
提问前请查看
.claude/apple-design-context.md
文件。请利用已有上下文,仅询问未涵盖的信息。

Key Principles

核心原则

  1. Minimize modality. Use modality only when it is critical to get attention, a task must be completed or abandoned, or saving changes is essential. Prefer non-modal alternatives.
  2. Provide clear feedback. Every action should produce visible, audible, or haptic response. Activity indicators for indeterminate waits, progress bars for determinate, haptics for physical confirmation.
  3. Support undo over confirmation dialogs. Destructive actions should be reversible when possible. Undo is almost always better than "Are you sure?"
  4. Launch quickly. Display a launch screen that transitions seamlessly into the first screen. No splash screens with logos. Restore previous state.
  5. Defer sign-in. Let users explore before requiring account creation. Support Sign in with Apple and passkeys.
  6. Keep onboarding brief. Three screens max. Let users skip. Teach through progressive disclosure and contextual hints.
  7. Use progressive disclosure. Show essentials first, let users drill into details. Don't overwhelm with every option on one screen.
  8. Respect user attention. Consolidate notifications, minimize interruptions, give users control over alerts. Never use notifications for marketing.
  1. 最小化模态交互。仅在必须获取用户注意力、任务必须完成或放弃、保存更改至关重要时使用模态交互。优先选择非模态替代方案。
  2. 提供清晰反馈。每个操作都应产生可见、可听或触觉响应。不确定等待时长时使用活动指示器,确定时长时使用进度条,触觉反馈用于物理确认。
  3. 优先支持撤销而非确认对话框。如果可能,破坏性操作应具备可逆性。撤销几乎总是比“你确定吗?”对话框更优。
  4. 快速启动。展示可无缝过渡到首屏的启动画面,不要使用带logo的闪屏,恢复之前的应用状态。
  5. 延迟登录。允许用户先探索应用,再要求创建账户。支持Sign in with Apple和passkeys。
  6. 保持引导流程简洁。最多3个引导页面,允许用户跳过。通过渐进式披露和上下文提示进行教学。
  7. 使用渐进式披露。先展示核心内容,让用户自行深入查看细节。不要在一个屏幕上展示所有选项,避免使用户感到 overwhelm。
  8. 尊重用户注意力。整合通知,尽量减少干扰,让用户控制提醒。切勿将通知用于营销目的。

Reference Index

参考索引

ReferenceTopicKey content
charting-data.mdCharting DataData visualization patterns, accessible charts, interactive elements
collaboration-and-sharing.mdCollaboration & SharingShare sheets, activity views, collaborative editing, SharePlay
drag-and-drop.mdDrag and DropDrag sources, drop targets, spring loading, multi-item drag, visual feedback
entering-data.mdEntering DataText fields, pickers, steppers, input validation, keyboard types, autofill
feedback.mdFeedbackAlerts, action sheets, haptic patterns, sound feedback, visual indicators
file-management.mdFile ManagementDocument browser, file providers, iCloud integration, document lifecycle
going-full-screen.mdGoing Full ScreenFull-screen transitions, immersive content, exiting full screen
launching.mdLaunchingLaunch screens, state restoration, cold vs warm launch
live-viewing-apps.mdLive Viewing AppsLive content display, real-time updates, Live Activities, Dynamic Island
loading.mdLoadingActivity indicators, progress views, skeleton screens, lazy loading, placeholders
managing-accounts.mdManaging AccountsSign in with Apple, passkeys, account creation, credential autofill, account deletion
managing-notifications.mdManaging NotificationsPermission requests, grouping, actionable notifications, provisional delivery
modality.mdModalitySheets, alerts, popovers, full-screen modals, when to use each
multitasking.mdMultitaskingiPad Split View, Slide Over, Stage Manager, responsive layout, size class transitions
offering-help.mdOffering HelpContextual tips, onboarding hints, help menus, support links
onboarding.mdOnboardingWelcome screens, feature highlights, progressive onboarding, skip options
playing-audio.mdPlaying AudioAudio sessions, background audio, Now Playing, audio routing, interruptions
playing-haptics.mdPlaying HapticsCore Haptics, UIFeedbackGenerator, haptic patterns, custom haptics
playing-video.mdPlaying VideoVideo player controls, picture-in-picture, AirPlay, full-screen video
printing.mdPrintingPrint dialogs, page setup, AirPrint integration
ratings-and-reviews.mdRatings & ReviewsSKStoreReviewController, timing, frequency limits, in-app feedback
searching.mdSearchingSearch bars, suggestions, scoped search, results display, recents
settings.mdSettingsIn-app vs Settings app, preference organization, toggles, defaults
undo-and-redo.mdUndo and RedoShake to undo, undo/redo stack, multi-level undo
workouts.mdWorkoutsWorkout sessions, live metrics, Always On display, summaries, HealthKit
参考链接主题核心内容
charting-data.md数据图表数据可视化模式、无障碍图表、交互元素
collaboration-and-sharing.md协作与分享分享面板、活动视图、协作编辑、SharePlay
drag-and-drop.md拖放拖拽源、放置目标、弹簧加载、多项目拖拽、视觉反馈
entering-data.md数据输入文本框、选择器、步进器、输入验证、键盘类型、自动填充
feedback.md反馈警报、操作表、触觉模式、声音反馈、视觉指示器
file-management.md文件管理文档浏览器、文件提供者、iCloud集成、文档生命周期
going-full-screen.md全屏模式全屏过渡、沉浸式内容、退出全屏
launching.md应用启动启动画面、状态恢复、冷启动 vs 热启动
live-viewing-apps.md实时查看应用实时内容展示、实时更新、Live Activities、Dynamic Island
loading.md加载状态活动指示器、进度视图、骨架屏、懒加载、占位符
managing-accounts.md账户管理Sign in with Apple、passkeys、账户创建、凭证自动填充、账户删除
managing-notifications.md通知管理权限请求、分组、可操作通知、临时推送
modality.md模态交互表单页、警报、弹出框、全屏模态、各场景适用时机
multitasking.md多任务处理iPad分屏视图、侧滑、Stage Manager、响应式布局、尺寸类过渡
offering-help.md帮助支持上下文提示、引导提示、帮助菜单、支持链接
onboarding.md用户引导欢迎页面、功能亮点、渐进式引导、跳过选项
playing-audio.md音频播放音频会话、后台音频、Now Playing、音频路由、中断处理
playing-haptics.md触觉反馈Core Haptics、UIFeedbackGenerator、触觉模式、自定义触觉
playing-video.md视频播放视频播放器控制、画中画、AirPlay、全屏视频
printing.md打印功能打印对话框、页面设置、AirPrint集成
ratings-and-reviews.md评分与评论SKStoreReviewController、时机、频率限制、应用内反馈
searching.md搜索功能搜索栏、建议、范围搜索、结果展示、历史记录
settings.md设置功能应用内设置 vs 系统设置应用、偏好组织、开关、默认值
undo-and-redo.md撤销与重做摇一摇撤销、撤销/重做栈、多级撤销
workouts.md运动功能运动会话、实时指标、常亮显示、摘要、HealthKit

Pattern Selection Guide

模式选择指南

User GoalRecommended PatternAvoid
First app experienceBrief onboarding (max 3 screens) + progressive disclosureLong tutorials, mandatory sign-up
Waiting for contentSkeleton screens or progress indicatorsBlocking spinners with no context
Confirming destructive actionUndo supportExcessive "Are you sure?" dialogs
Collecting user inputInline validation, smart defaults, autofillModal forms for simple inputs
Requesting permissionsContextual, just-in-time with explanationRequesting all permissions at launch
Providing feedbackHaptics + visual indicatorSilent actions with no confirmation
Organizing preferencesIn-app settings for frequent itemsBurying all settings in system Settings app
用户目标推荐模式避免事项
首次使用应用简洁引导(最多3屏)+ 渐进式披露冗长教程、强制注册
等待内容加载骨架屏或进度指示器无上下文的阻塞式加载动画
确认破坏性操作支持撤销过多的“你确定吗?”对话框
收集用户输入内联验证、智能默认值、自动填充简单输入使用模态表单
请求权限上下文相关、及时请求并说明原因启动时一次性请求所有权限
提供操作反馈触觉反馈+视觉指示器无任何确认的静默操作
组织偏好设置常用项放在应用内设置将所有设置都隐藏在系统设置应用中

Output Format

输出格式

  1. Recommended pattern with rationale, citing the relevant reference file.
  2. Step-by-step implementation covering each screen or state.
  3. Platform variations for targeted platforms.
  4. Common pitfalls that violate HIG for this pattern.
  1. 推荐模式及理由,引用相关参考文件。
  2. 分步实现方案,涵盖每个页面或状态。
  3. 平台差异,针对不同平台的实现细节。
  4. 常见误区,违反HIG规范的常见错误。

Questions to Ask

提问须知

  1. Where in the app does this pattern appear? What comes before and after?
  2. Which platforms?
  3. Designing from scratch or improving an existing flow?
  4. Does this involve sensitive actions? (Destructive operations, payments, permissions)
  1. 该模式出现在应用的哪个位置?前后的流程是什么?
  2. 针对哪些平台?
  3. 是从零开始设计还是优化现有流程?
  4. 是否涉及敏感操作?(破坏性操作、支付、权限请求)

Related Skills

相关技能

  • hig-foundations -- Accessibility, color, typography, and privacy principles underlying every pattern
  • hig-platforms -- Platform-specific pattern implementations
  • hig-components-layout -- Structural components (tab bars, sidebars, split views) for navigation patterns
  • hig-components-content -- Content display within patterns (charts, collections, search results)

  • hig-foundations -- 所有模式的底层原则:无障碍、颜色、排版、隐私
  • hig-platforms -- 平台特定的模式实现
  • hig-components-layout -- 导航模式的结构组件(标签栏、侧边栏、分屏视图)
  • hig-components-content -- 模式中的内容展示(图表、集合、搜索结果)