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
- Clarity (명료성) - Content and functionality clearly visible and understandable
- Deference (존중) - UI helps content without competing with it
- Depth (깊이) - Visual layers and motion convey hierarchy and meaning
Flexible Extensions
- Simplicity - Remove unnecessary elements, focus on core features
- Consistency - Use system components, colors, and fonts
- 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
1---2name: ios-ui-design-guide3description: 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 compliance with Clarity, Deference, and Depth principles, system colors with Dark Mode support, 8pt grid spacing, SF Pro typography with Dynamic Type, and native iOS interaction patterns. Prevents common anti-patterns like fixed text sizes, Dark Mode neglect, and Safe Area violations.4---5
6# iOS UI Design Guide
7
8## Overview
9
10Build 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.
11
12## When to Use This Skill
13
14Activate this skill when:
15- Building iOS UI with SwiftUI or UIKit
16- Creating iOS app screens, views, or components
17- Working with iOS development (Swift, SwiftUI, Xcode)
18- Receiving requests like:
19 - "Create a login screen in SwiftUI"
20 - "Design an iOS settings view"
21 - "Build a profile card for iOS"
22 - "Make this iOS UI follow HIG"
23 - "Style this SwiftUI view"
24
25**Do NOT activate** for:
26- Web development
27- Android development
28- Backend/server code
29- Non-visual iOS tasks
30
31## Core Design Philosophy
32
33Follow Apple Human Interface Guidelines (HIG) three principles + Flexible extensions:
34
35### HIG Core Principles
36
371. **Clarity (명료성)** - Content and functionality clearly visible and understandable
382. **Deference (존중)** - UI helps content without competing with it
393. **Depth (깊이)** - Visual layers and motion convey hierarchy and meaning
40
41### Flexible Extensions
42
434. **Simplicity** - Remove unnecessary elements, focus on core features
445. **Consistency** - Use system components, colors, and fonts
456. **Accessibility-First** - Dynamic Type, VoiceOver, WCAG AA compliance, Dark Mode
46
47## Framework Priorities
48
49- **Primary**: SwiftUI (declarative, modern, recommended)
50- **Secondary**: UIKit (complex animations, legacy integration)
51
52## How to Use This Skill
53
54### Step 1: Load Relevant Reference
55
56Before implementing any iOS UI component, load the appropriate reference file:
57
58```
59Read references/design-principles.md - HIG core principles + Flexible extensions
60Read references/color-system.md - System colors, Dark Mode, semantic colors
61Read references/spacing-system.md - 8pt grid, Safe Area handling
62Read references/typography.md - SF Pro, Dynamic Type, text styles
63Read references/component-patterns.md - SwiftUI component best practices
64Read references/anti-patterns.md - Common iOS design mistakes
65```
66
67**Recommendation**: Start with `design-principles.md` for HIG philosophy, then load component-specific files as needed.
68
69### Step 2: Apply Component-Specific Patterns
70
71For each component type, reference the corresponding section in `component-patterns.md`:
72
73- **Button**: `component-patterns.md` → Button section
74- **List**: `component-patterns.md` → List section
75- **Form**: `component-patterns.md` → Form section
76- **Navigation**: `component-patterns.md` → Navigation section
77- **Card**: `component-patterns.md` → Card section
78- **Modal/Sheet**: `component-patterns.md` → Modal section
79- **Search**: `component-patterns.md` → Search section
80- **Image**: `component-patterns.md` → Image section
81
82### Step 3: Validate Against Anti-Patterns
83
84Before finalizing implementation, check `anti-patterns.md` to ensure the design avoids:
85
86- ❌ Fixed text sizes (no Dynamic Type support)
87- ❌ Dark Mode neglect (hardcoded colors like `.black`, `.white`)
88- ❌ Safe Area violations (content hidden by notch/home indicator)
89- ❌ Touch targets smaller than 44x44pt
90- ❌ Ignoring system components
91- ❌ Multiple Primary buttons
92
93### Step 4: Ensure System Consistency
94
95Apply the **8pt grid system** for all spacing:
96- Use only: 4pt (rare), 8pt, 12pt, 16pt, 20pt, 24pt, 32pt, 40pt, 48pt, 64pt
97- SwiftUI default `.padding()` = 16pt
98- Reference `spacing-system.md` for component-specific spacing
99
100Use **system colors** for automatic Dark Mode:
101- Labels: `.primary`, `.secondary`, `Color(.tertiaryLabel)`
102- Backgrounds: `Color(.systemBackground)`, `Color(.secondarySystemBackground)`
103- ONE accent color via `.accentColor()` or project settings
104- Reference `color-system.md` for detailed color usage
105
106Maintain **Dynamic Type support** (REQUIRED):
107- Text styles: `.largeTitle`, `.title`, `.title2`, `.title3`, `.headline`, `.body`, `.callout`, `.subheadline`, `.footnote`, `.caption`, `.caption2`
108- NEVER use fixed `.font(.system(size: 24))` without `relativeTo`
109- Reference `typography.md` for complete type scale
110
111## Resources
112
113### references/
114
115Documentation loaded into context as needed to inform design decisions:
116
117- **design-principles.md** - HIG principles (Clarity, Deference, Depth) + Flexible extensions (Simplicity, Consistency, Accessibility)
118- **color-system.md** - System colors, Dark Mode support, semantic colors, adaptive colors, custom colors with Asset Catalog
119- **spacing-system.md** - 8pt grid scale, Safe Area handling, SwiftUI padding modifiers, component spacing
120- **typography.md** - SF Pro font, Dynamic Type (REQUIRED), text styles, font weights, accessibility
121- **component-patterns.md** - SwiftUI patterns for Button, List, Form, Navigation, Card, Modal, Search, Image, Progress, Badge
122- **anti-patterns.md** - Common iOS mistakes: fixed text, Dark Mode neglect, Safe Area violations, touch targets, system component neglect
123
124## Quick Decision Tree
125
126```
127iOS UI Component Request
128│
129├─ What component? → Load component-patterns.md section
130│
131├─ What spacing? → Use 8pt grid (spacing-system.md)
132│
133├─ What colors? → System colors + Dark Mode (color-system.md)
134│
135├─ What typography? → Dynamic Type text styles (typography.md)
136│
137├─ SwiftUI or UIKit? → SwiftUI first (unless specific UIKit need)
138│
139└─ Validation → Check anti-patterns.md
140```
141
142## Examples
143
144**Good Request Flow**:
145```
146User: "Create a login form in SwiftUI"
147→ Read references/component-patterns.md (Form section)
148→ Read references/spacing-system.md (Form spacing)
149→ Apply: TextField with .body font (Dynamic Type), 8pt spacing, system colors
150→ Validate against anti-patterns.md
151→ Implement with Form { Section { TextField, SecureField, Button } }
152```
153
154**Component Implementation Checklist**:
155- ✅ Spacing uses 8pt multiples
156- ✅ Dynamic Type support (.title, .body, etc.)
157- ✅ System colors (auto Dark Mode)
158- ✅ Safe Area respected
159- ✅ Touch targets minimum 44x44pt
160- ✅ SwiftUI system components used
161- ✅ Single Primary button
162- ✅ Accessibility (VoiceOver labels)
163
164## SwiftUI Code Examples
165
166### ✅ Good: HIG-Compliant Button
167
168```swift
169Button("확인") {
170 saveData()
171}
172.buttonStyle(.borderedProminent)
173.controlSize(.large)
174```
175
176### ✅ Good: Adaptive Colors
177
178```swift
179VStack {
180 Text("제목")
181 .font(.headline)
182 .foregroundColor(.primary) // Auto Dark Mode
183
184 Text("설명")
185 .font(.body)
186 .foregroundColor(.secondary)
187}
188.padding()
189.background(Color(.systemBackground))
190```
191
192### ❌ Bad: Fixed Sizes, No Dark Mode
193
194```swift
195Text("제목")
196 .font(.system(size: 24)) // ❌ No Dynamic Type
197 .foregroundColor(.black) // ❌ No Dark Mode
198
199VStack { }
200 .ignoresSafeArea() // ❌ Content hidden by notch
201```
202
203## Platform-Specific Considerations
204
205### Safe Area (CRITICAL)
206- Always respect Safe Area for content
207- Use `.ignoresSafeArea()` only for backgrounds
208- Test on iPhone with notch/Dynamic Island
209
210### Dark Mode (REQUIRED)
211- Test in both Light and Dark modes
212- Use system colors (never `.black`, `.white` directly)
213- Define custom colors in Asset Catalog with Light/Dark variants
214
215### Dynamic Type (REQUIRED)
216- Test with largest accessibility text size
217- Use system text styles (`.body`, `.headline`, etc.)
218- Avoid fixed `.lineLimit()` that breaks with large text
219
220### Preview Multiple Configurations
221
222```swift
223struct MyView_Previews: PreviewProvider {
224 static var previews: some View {
225 Group {
226 MyView()
227 .preferredColorScheme(.light)
228 .previewDisplayName("Light Mode")
229
230 MyView()
231 .preferredColorScheme(.dark)
232 .previewDisplayName("Dark Mode")
233
234 MyView()
235 .environment(\.sizeCategory, .accessibilityExtraExtraLarge)
236 .previewDisplayName("Large Text")
237 }
238 }
239}
240```
241
242## Reference Documentation
243
244- [Apple Human Interface Guidelines](https://developer.apple.com/design/human-interface-guidelines/)
245- [SwiftUI Documentation](https://developer.apple.com/documentation/swiftui/)
246- [SF Symbols](https://developer.apple.com/sf-symbols/)