AgentSkillsCN

ios-hig-reference

Apple 人机界面指南速查手册。适用于需要 iOS 设计指南、HIG 规则,或 Apple 设计最佳实践时使用。

SKILL.md
--- frontmatter
name: ios-hig-reference
description: Apple Human Interface Guidelines quick reference. Use when needing iOS design guidelines, HIG rules, or Apple design best practices.
version: 1.0.0

iOS HIG Reference

Quick reference for Apple Human Interface Guidelines (iOS/iPadOS).

When to Use

  • Need iOS design guidelines
  • Looking up HIG requirements
  • Checking Apple design best practices
  • Understanding iOS design patterns

Core Principles

Clarity

  • Content takes priority
  • Legible text at every size
  • Precise, purposeful icons
  • Subtle, appropriate adornments

Deference

  • UI supports content, never competes
  • Fluid motion for understanding
  • Translucency hints at more content

Depth

  • Visual layers convey hierarchy
  • Realistic motion creates understanding
  • Touch and discoverability through depth

Foundations

Colors

TypeLightDarkUsage
systemBackgroundWhiteBlackPrimary background
secondarySystemBackgroundGray6Gray5Grouped content
labelBlackWhitePrimary text
secondaryLabelGrayGraySecondary text
separatorGray4Gray4Dividers
systemBlue#007AFF#0A84FFLinks, actions

Typography

StyleSizeWeightUsage
largeTitle34ptRegularScreen titles
title28ptRegularSection headers
title222ptRegularSubsections
title320ptRegularMinor headers
headline17ptSemiboldEmphasis
body17ptRegularMain content
callout16ptRegularSecondary info
subheadline15ptRegularCaptions
footnote13ptRegularSmall text
caption12ptRegularLabels
caption211ptRegularTiny labels

Spacing & Layout

  • Margins: 16pt (compact), 20pt (regular)
  • Content spacing: 8pt (tight), 16pt (standard), 24pt (loose)
  • Touch targets: Minimum 44×44pt
  • Button spacing: 12-24pt between tappable elements

Components

Navigation

Tab Bar

  • 2-5 items only
  • Primary destinations, not actions
  • Icons + labels
  • Selected state clearly indicated

Navigation Bar

  • Title centered or large
  • Back button on left
  • Actions on right (max 2-3)

Controls

Buttons

  • Filled: Primary actions
  • Bordered: Secondary actions
  • Plain: Tertiary actions
  • Minimum height: 44pt

Text Fields

  • Clear button when content present
  • Placeholder text for hints
  • Appropriate keyboard type
  • Secure entry for passwords

Toggles

  • Immediate effect (no save needed)
  • Green = on, gray = off
  • Label describes on-state

Lists

Standard

  • Disclosure indicator → navigates to detail
  • Checkmark → selection
  • Detail disclosure → shows info

Swipe Actions

  • Trailing: destructive (delete)
  • Leading: constructive (archive, favorite)

Accessibility

Requirements

FeatureRequirement
VoiceOverLabels for all interactive elements
Dynamic TypeSupport 200% text scaling
Color Contrast4.5:1 (normal), 7:1 (small text)
MotionRespect reduce motion preference
Touch44×44pt minimum targets

VoiceOver Labels

swift
// Icon-only button
Button { } label: { Image(systemName: "trash") }
    .accessibilityLabel("Delete")

// Combined elements
HStack { Image(...); Text(...) }
    .accessibilityElement(children: .combine)

// Decorative
Image("decoration")
    .accessibilityHidden(true)

SF Symbols

Rendering Modes

ModeUsage
MonochromeSingle color, default
HierarchicalDepth through opacity
Palette2-3 custom colors
MulticolorPredefined colors

Common Symbols

CategorySymbols
Navigationhouse, magnifyingglass, person, gear
Actionsplus, minus, xmark, checkmark
Statusstar, heart, bookmark, bell
Mediaplay, pause, forward, backward
Editingpencil, trash, square.and.arrow.up

Dark Mode

Must Support

  • All custom colors need light/dark variants
  • Images may need separate dark versions
  • Avoid pure black (#000) — use system colors
  • Test vibrancy and materials

Quick Links

Related Skills

  • ios-swiftui-generator — Generate HIG-compliant code
  • ios-design-review — Validate HIG compliance