iOS Frontend Expert
Overview
Build production-grade iOS UI with pragmatic engineering rigor. Ship features that are visually polished, accessible, testable, and maintainable.
Workflow
- •Clarify the feature contract.
- •Choose SwiftUI, UIKit, or hybrid based on constraints.
- •Define a thin view layer and explicit state ownership.
- •Implement the minimum vertical slice first.
- •Add accessibility, localization, and dynamic type support before polish.
- •Add interaction polish, loading/error states, and performance fixes.
- •Add or update tests.
- •Summarize tradeoffs and follow-up risks.
Stack Selection
- •Prefer SwiftUI for new screens, rapid iteration, and composable design-system views.
- •Prefer UIKit for advanced collection layout control, mature legacy modules, or API gaps.
- •Use hybrid composition when migration risk is high or feature velocity requires incremental adoption.
- •Keep interop boundaries explicit and small.
- •Load
references/swiftui-patterns.mdfor SwiftUI-specific implementation details. - •Load
references/uikit-interop.mdfor wrappers, hosting, and migration patterns.
Implementation Rules
Architecture
- •Keep views dumb and deterministic.
- •Move business decisions into view models or domain services.
- •Expose UI state as explicit enums or structs.
- •Model loading, content, empty, and error as first-class states.
State and Data Flow
- •Keep one source of truth per feature boundary.
- •Minimize derived state duplication.
- •Isolate side effects behind injected protocols.
- •Cancel stale async tasks when view lifecycle changes.
UI Composition
- •Build small reusable components with clear inputs.
- •Keep custom modifiers and style tokens centralized.
- •Support dynamic type and content-size changes by default.
- •Avoid hard-coded spacing and colors when tokens exist.
Interaction Quality
- •Animate meaningful transitions only.
- •Preserve interaction continuity across loading and pagination.
- •Handle skeleton, retry, and offline states intentionally.
- •Keep hit targets and gesture conflicts ergonomic.
Accessibility and Localization
- •Add accessibility labels, hints, and traits for custom controls.
- •Validate VoiceOver order and discoverability.
- •Validate color contrast and non-color affordances.
- •Externalize all user-facing strings.
- •Anticipate longer localized strings and right-to-left layouts.
Performance
- •Keep expensive computation out of
bodyand layout passes. - •Avoid unnecessary view invalidations and identity churn.
- •Use lazy containers for large scrolling datasets.
- •Measure before optimizing and document bottlenecks.
Testing Expectations
- •Add unit tests for view model state transitions.
- •Add snapshot or visual regression checks for core states when available.
- •Add UI tests for primary flow and critical error paths.
- •Keep test fixtures stable and representative.
- •Verify dark mode only if the product supports it.
Output Contract
When executing this skill:
- •State assumptions and unresolved product constraints.
- •Present a concrete implementation plan before large refactors.
- •Deliver shippable code, not pseudo-implementations.
- •Report validation status for build/tests and any gaps.
- •List follow-up hardening tasks if scope was constrained.
Reference Files
- •Load
references/swiftui-patterns.mdwhen implementing SwiftUI layouts, state handling, animation, and preview strategy. - •Load
references/uikit-interop.mdwhen embedding UIKit in SwiftUI, embedding SwiftUI in UIKit, or migrating legacy screens. - •Load
references/qa-checklist.mdwhen preparing a feature for merge, release, or code review.