360 Secure SkillHub
360 安全技能中心

hig-patterns

汇总 Apple HIG 中启动、加载、搜索、设置、模态、拖放、撤销、通知、反馈、音视频、账户、打印等交互模式,按用户流程给出模式推荐、分步实现、平台差异和常见陷阱,并可结合项目上下文或代码审查发现。

分类:知识
raintree-technology
热度 0.66
最近更新 2026-11-29 11:15:08

安装

发给 Agent
帮我安装这个技能:npx secure-skills-cli add raintree-technology/hig-doctor/hig-patterns
兼容性
通用兼容
联网要求
不联网
数据出网
数据不出本机
Metadata
name
hig-patterns
description
When the user designs a flow rather than a single control in an Apple app: onboarding, launch, loading, search, settings, modality, multitasking, drag and drop, undo, file management, data entry, sharing and collaboration, notification permissions, feedback and haptics, audio and video playback, ratings, accounts, help, printing, or workouts. For individual components, see the hig-components-* skills.
license
MIT. Apple HIG content is © Apple Inc.
metadata
{"version":"1.1.0","hig-snapshot":"2025-02-02"}

Apple HIG: Interaction Patterns

Read .agents/apple-design-context.md (or the older .claude/apple-design-context.md) before asking questions. Use what it records and only ask for what is missing.

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.

Reference Index

Reference Topic Key content
charting-data.md Charting Data Data visualization patterns, accessible charts, interactive elements
collaboration-and-sharing.md Collaboration & Sharing Share sheets, activity views, collaborative editing, SharePlay
drag-and-drop.md Drag and Drop Drag sources, drop targets, spring loading, multi-item drag, visual feedback
entering-data.md Entering Data Text fields, pickers, steppers, input validation, keyboard types, autofill
feedback.md Feedback Alerts, action sheets, haptic patterns, sound feedback, visual indicators
file-management.md File Management Document browser, file providers, iCloud integration, document lifecycle
going-full-screen.md Going Full Screen Full-screen transitions, immersive content, exiting full screen
launching.md Launching Launch screens, state restoration, cold vs warm launch
live-viewing-apps.md Live Viewing Apps Live content display, real-time updates, Live Activities, Dynamic Island
loading.md Loading Activity indicators, progress views, skeleton screens, lazy loading, placeholders
managing-accounts.md Managing Accounts Sign in with Apple, passkeys, account creation, credential autofill, account deletion
managing-notifications.md Managing Notifications Permission requests, grouping, actionable notifications, provisional delivery
modality.md Modality Sheets, alerts, popovers, full-screen modals, when to use each
multitasking.md Multitasking iPad Split View, Slide Over, Stage Manager, responsive layout, size class transitions
offering-help.md Offering Help Contextual tips, onboarding hints, help menus, support links
onboarding.md Onboarding Welcome screens, feature highlights, progressive onboarding, skip options
playing-audio.md Playing Audio Audio sessions, background audio, Now Playing, audio routing, interruptions
playing-haptics.md Playing Haptics Core Haptics, UIFeedbackGenerator, haptic patterns, custom haptics
playing-video.md Playing Video Video player controls, picture-in-picture, AirPlay, full-screen video
printing.md Printing Print dialogs, page setup, AirPrint integration
ratings-and-reviews.md Ratings & Reviews SKStoreReviewController, timing, frequency limits, in-app feedback
searching.md Searching Search bars, suggestions, scoped search, results display, recents
settings.md Settings In-app vs Settings app, preference organization, toggles, defaults
undo-and-redo.md Undo and Redo Shake to undo, undo/redo stack, multi-level undo
workouts.md Workouts Workout sessions, live metrics, Always On display, summaries, HealthKit

Pattern Selection Guide

User Goal Recommended Pattern Avoid
First app experience Brief onboarding (max 3 screens) + progressive disclosure Long tutorials, mandatory sign-up
Waiting for content Skeleton screens or progress indicators Blocking spinners with no context
Confirming destructive action Undo support Excessive "Are you sure?" dialogs
Collecting user input Inline validation, smart defaults, autofill Modal forms for simple inputs
Requesting permissions Contextual, just-in-time with explanation Requesting all permissions at launch
Providing feedback Haptics + visual indicator Silent actions with no confirmation
Organizing preferences In-app settings for frequent items Burying all settings in system Settings app

Check existing code

If the project has source code, run npx hig-doctor . (or the hig_audit_file MCP tool on one file) and cite its findings (rule ID, line, HIG link) alongside this guidance. Findings are review evidence, not proof of HIG conformance.

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.

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)

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)