| name | ios-animation-code-review |
| description | Reviews iOS animation code for correctness, performance, accessibility, and Apple API best practices. Use when reviewing .swift files containing animation code — withAnimation, .animation(), PhaseAnimator, KeyframeAnimator, matchedGeometryEffect, navigationTransition, CABasicAnimation, CASpringAnimation, UIViewPropertyAnimator, UIDynamicAnimator, symbolEffect, scrollTransition, contentTransition, or custom Transition conformances. |
iOS Animation Code Review
Quick Reference
Output Format
Report each finding as:
[FILE:LINE] ISSUE_TITLE
Example: [AnimatedCard.swift:42] Missing Reduce Motion fallback for spring animation
All details, code suggestions, and rationale follow after the header line.
Review Checklist
When to Load References
- Incorrect spring setup or
withAnimation scope issues → swiftui-animation-patterns.md
- Hitches, dropped frames, or expensive animations in scroll views → performance.md
- Missing Reduce Motion handling or motion accessibility → accessibility.md
matchedGeometryEffect glitches or custom Transition bugs → transitions.md
Review Questions
- Does every animation have a Reduce Motion fallback that preserves the information conveyed? Is animation the only feedback channel, or are haptics/audio supplementing it?
- Is this custom animation necessary, or does the system already provide it (standard transitions, SF Symbol effects, Liquid Glass)?
- Could this animation cause frame drops — is it animating expensive properties (blur, shadow without path, mask) in a list or scroll view?
- Are all animations interruptible? Can the user act without waiting for completion? Does gesture-driven feedback follow spatial expectations?
- Is
withAnimation scoped to the minimal state change needed, or is it wrapping unrelated mutations?
- For
matchedGeometryEffect — are source and destination using the same ID and namespace, and is only one visible at a time?