본문으로 건너뛰기
cccskills
무료GitHub에 공개

animation-patterns

SwiftUI animation patterns including springs, transitions, PhaseAnimator, KeyframeAnimator, SF Symbol effects, scroll-driven effects, mesh gradients, text renderers, and shader effects. Use when implementing, reviewing, or fixing animation or visual-effect code on iOS/macOS.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

설치 방법 보기

포함된 파일(6)

  • SKILL.md8.5 KB
  • core-animations.md14.0 KB
  • phase-keyframe-animators.md14.6 KB
  • symbol-effects.md4.8 KB
  • transitions.md12.9 KB
  • visual-effects.md7.2 KB

SKILL.md(원문)

설치하기 전에 에이전트에게 전달되는 지시 내용을 확인할 수 있습니다.

Animation Patterns

Correct API shapes and patterns for SwiftUI animations. Prevents the most common mistakes: mixed spring parameter generations, wrong PhaseAnimator/KeyframeAnimator closure signatures, and using matchedGeometryEffect where matchedTransitionSource is needed.

When This Skill Activates

Use this skill when the user:

  • Asks to add, fix, or review animation code
  • Mentions spring, bounce, or snappy animations
  • Wants view transitions (insertion/removal, hero, zoom)
  • Asks about PhaseAnimator or KeyframeAnimator
  • Wants SF Symbol effects (bounce, pulse, wiggle, breathe)
  • Mentions matchedGeometryEffect or matchedTransitionSource
  • Asks about reduce motion / animation accessibility
  • Wants to sequence or chain animations
  • Mentions withAnimation, animation completions, or Transaction
  • Wants scroll-driven effects (parallax, carousels, scrollTransition, visualEffect)
  • Mentions MeshGradient, TextRenderer, or Metal shader effects (colorEffect, distortionEffect, layerEffect)

Decision Tree

Choose the right reference file based on what the user needs:

What are you animating?
│
├─ A state change (opacity, position, color)
│  └─ → core-animations.md
│     ├─ withAnimation { } — explicit animation
│     ├─ .animation(_:value:) — implicit animation
│     └─ Spring configuration — .spring, .bouncy, .snappy, .smooth
│
├─ A multi-step / sequenced animation
│  └─ → phase-keyframe-animators.md (PhaseAnimator)
│     └─ Cycles through discrete phases automatically or on trigger
│
├─ A complex multi-property animation (scale + rotation + offset)
│  └─ → phase-keyframe-animators.md (KeyframeAnimator)
│     └─ Timeline-based keyframes with per-property tracks
│
├─ A view appearing / disappearing
│  └─ → transitions.md
│     ├─ .transition() — insertion/removal
│     ├─ .contentTransition() — text/symbol changes
│     └─ .asymmetric() — different in/out
│
├─ A hero / zoom navigation transition
│  └─ → transitions.md (matchedTransitionSource section)
│     ├─ iOS 18+: matchedTransitionSource + .navigationTransition(.zoom)
│     ├─ UIKit: preferredTransition = .zoom (capture stable IDs, never views)
│     └─ iOS 14+: matchedGeometryEffect (NOT for NavigationStack)
│
├─ A UIKit view driven by SwiftUI state or gestures
│  └─ → transitions.md (Bridging UIKit and SwiftUI Animations)
│     └─ UIView.animate(.spring(...)) / context.animate in updateUIView
│
├─ An SF Symbol animation
│  └─ → symbol-effects.md
│     └─ .symbolEffect(.bounce), .pulse, .wiggle, .breathe, .rotate
│
├─ A scroll-driven, geometry-driven, or shader effect
│  └─ → visual-effects.md
│     ├─ .scrollTransition — carousel scale/parallax/caption fades
│     ├─ .visualEffect — position-based effects without GeometryReader
│     ├─ MeshGradient — animatable multi-point gradients
│     ├─ TextRenderer — per-line / per-glyph text animation
│     └─ ShaderLibrary + .colorEffect / .distortionEffect / .layerEffect
│
└─ Spring physics / timing configuration
   └─ → core-animations.md (Spring Configurations section)

API Availability

APIMinimum VersionReference
withAnimationiOS 13core-animations.md
.animation(_:value:)iOS 13core-animations.md
.spring(response:dampingFraction:)iOS 13core-animations.md
.matchedGeometryEffectiOS 14transitions.md
.transition(.push(from:))iOS 16transitions.md
.contentTransition(.numericText())iOS 16transitions.md
PhaseAnimatoriOS 17phase-keyframe-animators.md
KeyframeAnimatoriOS 17phase-keyframe-animators.md
.spring(duration:bounce:)iOS 17core-animations.md
Spring presets (.bouncy, .snappy, .smooth)iOS 17core-animations.md
withAnimation(_:completionCriteria:_:completion:)iOS 17core-animations.md
.symbolEffect()iOS 17symbol-effects.md
.transition(.blurReplace)iOS 17transitions.md
.contentTransition(.symbolEffect(.replace))iOS 17transitions.md
Transition protocol / TransitionPhaseiOS 17transitions.md
TransactionKey, scoped .animation / .transaction variantsiOS 17core-animations.md
KeyframeTimeline, .mapCameraKeyframeAnimatoriOS 17phase-keyframe-animators.md
.scrollTransition, .visualEffectiOS 17visual-effects.md
Shaders: .colorEffect / .distortionEffect / .layerEffectiOS 17visual-effects.md
MeshGradientiOS 18visual-effects.md
TextRenderer / TextAttributeiOS 18visual-effects.md
.matchedTransitionSourceiOS 18transitions.md
.navigationTransition(.zoom) — push, sheet, fullScreenCoveriOS 18transitions.md
UIViewController.preferredTransition = .zoomiOS 18transitions.md
UIView.animate(_: Animation) / context.animateiOS 18transitions.md

Top 5 Mistakes — Quick Reference

#MistakeFixDetails
1spring(response:bounce:) — mixing parameter generationsUse either spring(response:dampingFraction:) (iOS 13) or spring(duration:bounce:) (iOS 17)core-animations.md
2.animation(.spring()) without value: parameterAlways pass value: — the no-value variant is deprecated (iOS 15)core-animations.md
3Wrong PhaseAnimator closure signaturePhaseAnimator(phases) { content, phase in } — not { phase in }phase-keyframe-animators.md
4Using matchedGeometryEffect for NavigationStack transitionsUse matchedTransitionSource + .navigationTransition(.zoom) on iOS 18+transitions.md
5Using withAnimation for SF Symbol effectsUse .symbolEffect() modifier insteadsymbol-effects.md

Review Checklist

When reviewing animation code, verify:

  • Reduce motion — animations respect AccessibilityMotionEffect or UIAccessibility.isReduceMotionEnabled; provide non-motion alternatives
  • Duration limits — no animation exceeds ~0.5s for UI feedback; longer only for decorative/ambient effects
  • Spring vs linear — springs for interactive/physical motion; linear/easeInOut only for opacity fades or progress indicators
  • No deprecated APIs — .animation(.spring()) without value: is deprecated; .animation(nil) is replaced by withTransaction
  • Correct spring generation — parameter names match the same API generation (never mix response with bounce)
  • Completion handlers — using withAnimation(_:completionCriteria:_:completion:) (iOS 17+), not inventing .onAnimationCompleted
  • Transition scope — .transition() only affects views inside if/switch controlled by state; not for views that are always present
  • Per-frame closures stay cheap — KeyframeAnimator content closures, visualEffect closures, TextRenderer.draw, and Animatable view bodies run every frame; no allocation, formatting, or layout math inside

Reference Files

FileContent
core-animations.mdwithAnimation, springs, completions, transactions + TransactionKey, timing curves, Animatable mechanics, fluid-interface principles (momentum projection, rubber-banding, hysteresis)
phase-keyframe-animators.mdPhaseAnimator, KeyframeAnimator, KeyframeTimeline, MapKit camera keyframes, custom animations
transitions.mdView transitions, custom Transition protocol, matched geometry, navigation/zoom transitions (SwiftUI + UIKit), interruptibility, UIKit↔SwiftUI bridging, gesture-driven springs
symbol-effects.mdSF Symbol effects, accessibility
visual-effects.mdscrollTransition, visualEffect, MeshGradient, TextRenderer, shader effects (colorEffect/distortionEffect/layerEffect), effect pipelines, semantic alignment guides

리뷰

아직 리뷰가 없습니다. 사용해 본 소감을 남겨 주세요.

댓글

로그인 없이 쓸 수 있습니다. 사용 후기, 질문, 작동하지 않은 환경 등을 편하게 남겨 주세요.

아직 댓글이 없습니다. 첫 댓글을 남겨 보세요.

보내면 바로 공개됩니다. 이메일 주소나 전화번호 같은 개인 정보는 쓰지 마세요. URL은 2개까지입니다.

0 / 1,000자

이 양식은 reCAPTCHA로 보호되며 Google 개인정보처리방침 및 서비스 약관이 적용됩니다.

같은 저장소의 스킬

Run a structured accessibility audit on an iOS/macOS app — automated XCUITest audits, Accessibility Inspector, manual VoiceOver/Dynamic Type passes, and App Store Accessibility Nutrition Label evaluation. Use before release, when preparing Nutrition Label declarations, or for EU Accessibility Act compliance.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

rshankras/claude-code-apple-skills8162026년 7월 24일 업데이트

Generate accessibility infrastructure for VoiceOver, Dynamic Type, and accessibility features. Use when improving app accessibility, adding accessibility labels and hints, or auditing compliance.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

rshankras/claude-code-apple-skills8162026년 7월 24일 업데이트

Generates an Apple-compliant account deletion flow with multi-step confirmation UI, optional data export, configurable grace period, Keychain cleanup, and server-side deletion request. Use when user needs account deletion, right-to-delete, or Apple App Review compliance for account removal.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

rshankras/claude-code-apple-skills8162026년 7월 24일 업데이트

Privacy-preserving ad measurement with AdAttributionKit (SKAdNetwork's successor) — install and re-engagement attribution, conversion-value strategy under crowd anonymity, and end-to-end postback testing. Use when running paid acquisition beyond Apple Ads, measuring re-engagement campaigns, designing conversion values, or migrating from SKAdNetwork.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

rshankras/claude-code-apple-skills8162026년 7월 24일 업데이트

alarmkit

무료

AlarmKit integration for scheduling alarms and timers with custom UI, Live Activities, and snooze support. Use when implementing alarm or timer features in iOS 26+ apps.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

rshankras/claude-code-apple-skills8162026년 7월 24일 업데이트

Interpret app metrics and make data-driven decisions. Covers DAU/MAU, retention, LTV, ARPU, App Store Connect analytics, AARRR funnel analysis, cohort analysis, and diagnostic decision trees. Use when user wants to understand their metrics, diagnose problems, or build a data-driven growth plan.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

rshankras/claude-code-apple-skills8162026년 7월 24일 업데이트

rshankras의 스킬 모두 보기

이 스킬의 문제 신고