用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/Dev-Toolbelt/dev-team-agents --skill ios-hig命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
正在显示 SKILL.md
基于 SOC 职业分类
| name | ios-hig |
| description | Apple Human Interface Guidelines for iOS and iPadOS. Load for iOS or iPadOS design tasks. |
Load this skill when any of the following are present:
| Signal | Location |
|---|---|
| iOS target in cross-platform project | React Native, Flutter, or pubspec.yaml with iOS support |
| Native iOS/iPadOS project | .xcodeproj, .xcworkspace, Info.plist, Swift source files |
| SwiftUI or UIKit usage | import SwiftUI, import UIKit in source files |
| Design task for iOS | User mentions "iOS design", "HIG", "Apple guidelines", or "SwiftUI design" |
iOS users expect apps to feel like a natural extension of the operating system. Deviation from platform patterns — even aesthetically — creates friction. When in doubt, prefer the native pattern over a custom one.
Choose the navigation model that matches the information architecture. Never mix models without a clear reason.
tint color; inactive uses outlined variant + secondaryLabel color… only as a last resort.large style at the root level, .inline for deeper levels| Style | Usage |
|---|---|
Sheet (.sheet) | Lightweight tasks that don't require full context switch |
Full-screen cover (.fullScreenCover) | Immersive tasks (camera, onboarding, video); user cannot swipe to dismiss |
| Popover (iPad) | Contextual information anchored to a control; auto-adapts to sheet on iPhone |
NavigationSplitView for two- or three-column layouts on iPadregular text → regular symbol| Style | Usage |
|---|---|
Filled (.borderedProminent) | Primary action; one per screen |
Tinted (.bordered with tint) | Secondary action; safe to use multiple times |
Gray (.bordered) | Tertiary or neutral actions |
Plain (.plain) | Low-emphasis, inline, or destructive actions |
.contentShape(Rectangle()) to expand hit area without changing visual size.destructive role — renders in red and triggers a confirmation if neededToggle (Switch): for immediate binary settings — changes apply instantly without a "Save" buttonPicker: use .segmented style for 2–4 mutually exclusive short options; use .menu style for longer listsStepper: for incrementing/decrementing numeric values within a known rangeSlider: for continuous values where precision is less critical than range explorationDatePicker: always use the system date picker — never build a custom oneTextField: single-line; set keyboardType, textContentType, and autocorrectionDisabled appropriatelySecureField: for passwords — never use TextField for passwordsTextEditor: multi-line; add a character count label when there is a limitonTapGesture on the background)Apple's system font family is SF Pro (iOS/macOS) and SF Pro Rounded (friendly contexts). Use it via Dynamic Type — never specify a fixed font size.
| Style | Default Size | Usage |
|---|---|---|
largeTitle | 34pt | Hero page titles (used sparingly) |
title1 | 28pt | Primary screen headings |
title2 | 22pt | Secondary headings |
title3 | 20pt | Tertiary headings |
headline | 17pt semibold | List row primaries, emphasized labels |
body | 17pt | Primary body text |
callout | 16pt | Secondary body, sidebars |
subheadline | 15pt | Supporting labels |
footnote | 13pt | Secondary descriptions, timestamps |
caption1 | 12pt | Image captions, form helper text |
caption2 | 11pt | Smallest visible labels |
Rules:
.font(.body), .font(.headline), etc. — never Font.system(size: 17)@ScaledMetric or ViewThatFitscaption2 (11pt) — never use sizes below this.safeAreaInset() (SwiftUI) or safeAreaLayoutGuide (UIKit) — never hard-code pixel offsets34pt on notched devices)listRowInsets preserves the standard left inset unless deliberately removedLazyVGrid / LazyHGrid (SwiftUI) or UICollectionViewCompositionalLayout (UIKit) for grid layouts — never manual frame placementiOS automatically switches between light and dark appearances. Designs must support both.
.primary, .secondary, .background, .secondaryBackground, .grouped Background, .separator, .label, .secondaryLabelColor.white for backgrounds or Color.black for text — use semantic equivalents.background(.ultraThinMaterial)), or grouping to separate layersultraThinMaterial, thinMaterial, regularMaterial, thickMaterial, ultraThickMaterial) adapt to both appearances automaticallyaccessibilityLabel (what it is) and, when needed, an accessibilityHint (what happens when activated).accessibilityHidden(true)accessibilityValue for current state and accessibilityAdjustableAction for sliders/pickers@Environment(\.accessibilityReduceMotion) var reduceMotion@Environment(\.accessibilityDifferentiateWithoutColor) and @Environment(\.colorSchemeContrast).contentShape(Rectangle())The same app must adapt its layout based on the available space — not serve a different design.
| Aspect | iPhone (Compact) | iPad (Regular) |
|---|---|---|
| Navigation | Tab Bar + Navigation Stack | Split View or Tab Bar |
| Modals | Full-width sheets | Popovers, centered sheets |
| Content columns | Single column | Two or three columns |
| Keyboard | Full-screen, pushes content | Floating or docked; content shifts |
| Pointer (iPadOS) | N/A | Support hover effects (.hoverEffect()) |
@Environment(\.horizontalSizeClass) to branch layout — compact = iPhone / iPad portrait in some cases; regular = iPad landscape and most iPad orientationsUIDevice.current.userInterfaceIdiom) to branch layout — use size class; it handles Split View and Stage Manager correctlyThese behaviors are deeply ingrained in iOS users. Deviating causes immediate friction:
onDelete in SwiftUI).contextMenu)UIActivityViewController / ShareLink — never build a custom share UIUIAlertController / .alert() for OS-level confirmations — never custom modal dialogs for destructive actions