# Implement Swiftui IOS

> Implement iOS and iPadOS interfaces with SwiftUI using native Apple HIG patterns. Use when Codex needs to write, refactor, or review SwiftUI screens, NavigationStack flows, TabView layouts, forms, settings sheets, lists, toolbars, accessibility modifiers, Dynamic Type support, SF Symbols, semantic colors, materials, and adaptive iPad layouts.

- Skill: `0xkoru/implement-swiftui-ios` (Agent Skill, multi-file: 3 files)
- Install (CLI): `npx skillmds@latest add 0xkoru/implement-swiftui-ios`
- Raw SKILL.md: https://api.skillmd.com/api/skills/0xkoru/implement-swiftui-ios/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Web & Frontend
- Author: 0xKoru (https://skillmd.com/u/0xkoru)
- Updated: 2026-09-22
- Page: https://skillmd.com/skills/0xkoru/implement-swiftui-ios

---


# Implement SwiftUI iOS

Use this skill when the desired output is SwiftUI code, not only a visual concept.

## Workflow

1. Inspect the existing app architecture before adding views. Follow local state, routing, dependency injection, style, and preview patterns.
2. Map the screen to native SwiftUI containers: `NavigationStack`, `TabView`, `List`, `Form`, `ScrollView`, `Grid`, `ToolbarItem`, `sheet`, `confirmationDialog`, and `alert`.
3. Use semantic platform APIs before custom styling: `foregroundStyle`, `tint`, `font`, `buttonStyle`, `controlSize`, `labelStyle`, `presentationDetents`, and system materials.
4. Implement accessibility while building: labels, hints only when useful, traits, sort priority, focus, minimum target size, Dynamic Type, Reduce Motion, and color contrast.
5. Add previews that exercise at least light/dark mode, large text, and small-screen layout when the project supports previews.
6. Verify with the app's build/test workflow or explain the blocker.

## SwiftUI Design Rules

- Prefer native controls over custom clones. Only custom-build controls when the product needs behavior the system does not provide.
- Use SF Symbols through `Image(systemName:)`. Pair icons with text unless the icon is universally recognized or has an accessibility label.
- Use semantic colors such as `.primary`, `.secondary`, `.tint`, `.background`, and platform materials. Avoid hardcoded colors unless creating a brand accent.
- Use `.dynamicTypeSize(...)` only to constrain layouts when necessary; do not disable accessibility sizes casually.
- Keep forms in `Form` or grouped `List` patterns. Avoid building settings as arbitrary stacks.
- Use `.toolbarTitleDisplayMode(.inline)` for compact modal settings; use large titles for content hubs.
- Make tappable rows obvious and keep destructive actions visibly distinct.

## References

Read `references/swiftui-ios-patterns.md` for implementation patterns and examples.

