Skip to content
ios-ui-design-guide logo

iOS UI Design Guide

ios-ui-design-guide

Apply iOS/SwiftUI design principles following Apple Human Interface Guidelines when building any iOS UI component. Only execute this when the current project is an iOS project and involves UI-related work. Use this skill for SwiftUI views, UIKit components, or iOS app development. Ensures HIG com...

SKILL.md

Full skill instructions

iOS UI Design Guide

Overview

Build native iOS interfaces that look professional and follow Apple Human Interface Guidelines (HIG) by applying systematic design principles. This skill provides comprehensive guidelines for SwiftUI-first development with color system, spacing, typography, and component-specific patterns optimized for iOS.

When to Use This Skill

Activate this skill when:

  • Building iOS UI with SwiftUI or UIKit
  • Creating iOS app screens, views, or components
  • Working with iOS development (Swift, SwiftUI, Xcode)
  • Receiving requests like:
    • "Create a login screen in SwiftUI"
    • "Design an iOS settings view"
    • "Build a profile card for iOS"
    • "Make this iOS UI follow HIG"
    • "Style this SwiftUI view"

Do NOT activate for:

  • Web development
  • Android development
  • Backend/​server code
  • Non-visual iOS tasks

Core Design Philosophy

Follow Apple Human Interface Guidelines (HIG) three principles + Flexible extensions:

HIG Core Principles

  1. Clarity (명료성) - Content and functionality clearly visible and understandable
  2. Deference (존중) - UI helps content without competing with it
  3. Depth (깊이) - Visual layers and motion convey hierarchy and meaning

Flexible Extensions

  1. Simplicity - Remove unnecessary elements, focus on core features
  2. Consistency - Use system components, colors, and fonts
  3. Accessibility-First - Dynamic Type, VoiceOver, WCAG AA compliance, Dark Mode

Framework Priorities

  • Primary: SwiftUI (declarative, modern, recommended)
  • Secondary: UIKit (complex animations, legacy integration)

How to Use This Skill

Step 1: Load Relevant Reference

Before implementing any iOS UI component, load the appropriate reference file:

Read references/​design-principles.md - HIG core principles + Flexible extensions
Read references/​color-system.md - System colors, Dark Mode, semantic colors
Read references/​spacing-system.md - 8pt grid, Safe Area handling
Read references/​typography.md - SF Pro, Dynamic Type, text styles
Read references/​component-patterns.md - SwiftUI component best practices
Read references/​anti-patterns.md - Common iOS design mistakes

Recommendation: Start with design-principles.md for HIG philosophy, then load component-specific files as needed.

Step 2: Apply Component-Specific Patterns

For each component type, reference the corresponding section in component-patterns.md:

  • Button: component-patterns.md → Button section
  • List: component-patterns.md → List section
  • Form: component-patterns.md → Form section
  • Navigation: component-patterns.md → Navigation section
  • Card: component-patterns.md → Card section
  • Modal/​Sheet: component-patterns.md → Modal section
  • Search: component-patterns.md → Search section
  • Image: component-patterns.md → Image section

Step 3: Validate Against Anti-Patterns

Before finalizing implementation, check anti-patterns.md to ensure the design avoids:

  • ❌ Fixed text sizes (no Dynamic Type support)
  • ❌ Dark Mode neglect (hardcoded colors like .black, .white)
  • ❌ Safe Area violations (content hidden by notch/​home indicator)
  • ❌ Touch targets smaller than 44x44pt
  • ❌ Ignoring system components
  • ❌ Multiple Primary buttons

Step 4: Ensure System Consistency

Apply the 8pt grid system for all spacing:

  • Use only: 4pt (rare), 8pt, 12pt, 16pt, 20pt, 24pt, 32pt, 40pt, 48pt, 64pt
  • SwiftUI default .padding() = 16pt
  • Reference spacing-system.md for component-specific spacing

Use system colors for automatic Dark Mode:

  • Labels: .primary, .secondary, Color(.tertiaryLabel)
  • Backgrounds: Color(.systemBackground), Color(.secondarySystemBackground)
  • ONE accent color via .accentColor() or project settings
  • Reference color-system.md for detailed color usage

Maintain Dynamic Type support (REQUIRED):

  • Text styles: .largeTitle, .title, .title2, .title3, .headline, .body, .callout, .subheadline, .footnote, .caption, .caption2
  • NEVER use fixed .font(.system(size: 24)) without relativeTo
  • Reference typography.md for complete type scale

Resources

references/

Documentation loaded into context as needed to inform design decisions:

  • design-principles.md - HIG principles (Clarity, Deference, Depth) + Flexible extensions (Simplicity, Consistency, Accessibility)
  • color-system.md - System colors, Dark Mode support, semantic colors, adaptive colors, custom colors with Asset Catalog
  • spacing-system.md - 8pt grid scale, Safe Area handling, SwiftUI padding modifiers, component spacing
  • typography.md - SF Pro font, Dynamic Type (REQUIRED), text styles, font weights, accessibility
  • component-patterns.md - SwiftUI patterns for Button, List, Form, Navigation, Card, Modal, Search, Image, Progress, Badge
  • anti-patterns.md - Common iOS mistakes: fixed text, Dark Mode neglect, Safe Area violations, touch targets, system component neglect

Quick Decision Tree

iOS UI Component Request
│
├─ What component? → Load component-patterns.md section
│
├─ What spacing? → Use 8pt grid (spacing-system.md)
│
├─ What colors? → System colors + Dark Mode (color-system.md)
│
├─ What typography? → Dynamic Type text styles (typography.md)
│
├─ SwiftUI or UIKit? → SwiftUI first (unless specific UIKit need)
│
└─ Validation → Check anti-patterns.md

Examples

Good Request Flow:

User: "Create a login form in SwiftUI"
→ Read references/​component-patterns.md (Form section)
→ Read references/​spacing-system.md (Form spacing)
→ Apply: TextField with .body font (Dynamic Type), 8pt spacing, system colors
→ Validate against anti-patterns.md
→ Implement with Form { Section { TextField, SecureField, Button } }

Component Implementation Checklist:

  • ✅ Spacing uses 8pt multiples
  • ✅ Dynamic Type support (.title, .body, etc.)
  • ✅ System colors (auto Dark Mode)
  • ✅ Safe Area respected
  • ✅ Touch targets minimum 44x44pt
  • ✅ SwiftUI system components used
  • ✅ Single Primary button
  • ✅ Accessibility (VoiceOver labels)

SwiftUI Code Examples

✅ Good: HIG-Compliant Button

Button("확인") {
    saveData()
}
.buttonStyle(.borderedProminent)
.controlSize(.large)

✅ Good: Adaptive Colors

VStack {
    Text("제목")
        .font(.headline)
        .foregroundColor(.primary)  // Auto Dark Mode

    Text("설명")
        .font(.body)
        .foregroundColor(.secondary)
}
.padding()
.background(Color(.systemBackground))

❌ Bad: Fixed Sizes, No Dark Mode

Text("제목")
    .font(.system(size: 24))  // ❌ No Dynamic Type
    .foregroundColor(.black)  // ❌ No Dark Mode

VStack { }
    .ignoresSafeArea()  // ❌ Content hidden by notch

Platform-Specific Considerations

Safe Area (CRITICAL)

  • Always respect Safe Area for content
  • Use .ignoresSafeArea() only for backgrounds
  • Test on iPhone with notch/​Dynamic Island

Dark Mode (REQUIRED)

  • Test in both Light and Dark modes
  • Use system colors (never .black, .white directly)
  • Define custom colors in Asset Catalog with Light/​Dark variants

Dynamic Type (REQUIRED)

  • Test with largest accessibility text size
  • Use system text styles (.body, .headline, etc.)
  • Avoid fixed .lineLimit() that breaks with large text

Preview Multiple Configurations

struct MyView_Previews: PreviewProvider {
    static var previews: some View {
        Group {
            MyView()
                .preferredColorScheme(.light)
                .previewDisplayName("Light Mode")

            MyView()
                .preferredColorScheme(.dark)
                .previewDisplayName("Dark Mode")

            MyView()
                .environment(\.sizeCategory, .accessibilityExtraExtraLarge)
                .previewDisplayName("Large Text")
        }
    }
}

Reference Documentation

More skills from majiayu000

xiaohongshu logo
majiayu000/claude-arsenal

xiaohongshu

xiaohongshu

286 148
View
agent-task-conductor logo
majiayu000/claude-skill-registry

agent-task-conductor

Conduct multi-agent task orchestration and workflow coordination.

663 1
View
conductor-setup logo
majiayu000/claude-skill-registry

conductor-setup

Initialize project with Conductor artifacts (product definition,

663 1
View
animation-designer logo
majiayu000/claude-skill-registry

animation-designer

Expert in web animations, transitions, and motion design using Framer Motion and CSS

663 1
View
diagramming logo
majiayu000/claude-skill-registry

diagramming

Creates Mermaid and ASCII diagrams for flowcharts, architecture, ERDs, state machines, mindmaps, and more. Use when user mentions diagram, flowchart, mermaid, ASCII diagram, text diagram, terminal diagram, visualize, C4, mindmap, architecture diagram, sequence diagram, ERD, or needs visual docume...

663 1
View
h3-pg logo
majiayu000/claude-skill-registry-data

h3-pg

PostgreSQL bindings for H3 hexagonal grid system. Use when working with H3 cells in Postgres, including spatial indexing, geometry/geography integration, and raster analysis.

23 1
View
conductor-development logo
majiayu000/claude-skill-registry

conductor-development

Context-Driven Development skill for projects using Conductor. Use this skill when you detect a `conductor/` directory in the project, when working on tasks defined in a `plan.md` file, or when the user asks about tracks, specs, or plans. Automatically applies TDD workflow, tracks task completion...

663 1
View
conductor-status logo
majiayu000/claude-skill-registry

conductor-status

Display project status, active tracks, and next actions

663 1
View
dockerization logo
majiayu000/claude-skill-registry

dockerization

Official Stakpak application containerization standard operating procedure, a step-by-step guidline to properly dockerize applications. This is a rule book curated by the Stakpak Team.

663 1
View

Popular AI tools

Kaiber logo
Video

Kaiber

Generate, edit, and beat-sync AI video with leading models in one workspace.

Paid
View
Vimcal logo
Productivity

Vimcal

The world's fastest calendar for remote work

Free
View

Transform Your Design with AI Designer by ImgCreator.ai

Freemium
View
Akool AI logo
Content & writing

Akool AI

Revolutionizing Video Production with AI-Powered Creativity

Paid
View

Extend an image past the frame and let AI fill the new aspect ratio.

Freemium
View
StarByFace logo
Security

StarByFace

Discover your celebrity doppelgänger with StarByFace!

Free
View
C

ChainClarity explains 700+ crypto whitepapers in plain English, with layered summaries, comparisons, research tools, alerts, and a $4.99 Pro plan.

Freemium
View
Opus Clip logo
Coding & apps

Opus Clip

Opus.ai: Revolutionize Your Web Experience

Free
View