Spring & Custom Timing Curves
Tune motion with springs and easing.
Spring & Custom Timing Curves is a free SwiftUI Academy lesson on CoddyKit — lesson 4 of 4. You can read the complete lesson below for free — then practise it hands-on in the browser with a built-in code editor and a 24/7 AI tutor. It is part of the SwiftUI Academy learning path, one of 4 lessons in the course, and your progress syncs across the web and the CoddyKit app.
The Feel of Motion
How an animation accelerates and settles shapes its personality. The timing curve decides whether motion feels snappy, smooth, or bouncy.
Linear Is Constant
A linear curve moves at one steady speed start to finish. It can feel mechanical, so it suits progress bars more than UI.
.animation(.linear, value: x)Ease In and Out
The easeInOut curve starts slow, speeds up, then slows to a gentle stop, the most natural choice for most UI.
.animation(.easeInOut, value: x)Ease In vs Ease Out
Use easeIn to start gently and easeOut to stop gently, picking which end of the motion feels softer.
Meet Springs
A spring animation models real physics, overshooting slightly and settling, which feels lively and responsive.
.animation(.spring, value: x)Tune the Bounce
The bounce parameter sets how springy the motion is. Zero is smooth; higher values add a playful overshoot.
.spring(duration: 0.5, bounce: 0.3)Response and Damping
Springs can also be tuned with response for speed and damping for how quickly the bounce dies out.
.interpolatingSpring(
stiffness: 170, damping: 15)Custom Bezier Curves
For full control, timingCurve lets you define a custom bezier with your own control points and duration.
.timingCurve(0.2, 0.8, 0.2, 1,
duration: 0.5)Add a Delay
Chain .delay onto any animation to wait before it begins, perfect for staggering several elements.
.animation(.spring.delay(0.1), value: x)Repeat the Motion
Use repeatForever or repeatCount to loop an animation, ideal for pulsing dots and loading hints.
.easeInOut.repeatForever(
autoreverses: true)Speed It Up or Down
The .speed modifier scales an animation faster or slower without rewriting its curve or duration.
.animation(.default.speed(2), value: x)Quick Check
Which curve gives the most natural everyday UI motion?
Recap: Curves and Springs
You explored timing curves from linear to easeInOut, lively springs with bounce, custom beziers, delays, and repeats. Now your motion has personality. 🚀
Frequently asked questions
Is the “Spring & Custom Timing Curves” lesson free?
Yes — the full text of “Spring & Custom Timing Curves” is free to read here on the web, and the SwiftUI Academy course includes 4 lessons in total. To practise it interactively (a built-in code editor and a 24/7 AI tutor) and unlock the rest of the SwiftUI Academy course, upgrade to CoddyKit PRO.
What will I learn in “Spring & Custom Timing Curves”?
Tune motion with springs and easing. You practise SwiftUI Academy with hands-on code you run directly in the browser, and a 24/7 AI tutor answers your questions as you work through the lesson.
Do I need any experience to start SwiftUI Academy?
No prior experience is required. SwiftUI Academy on CoddyKit is structured for beginners through advanced learners; this is — lesson 4 of 4, so you can start here or from the beginning and move at your own pace.
How long does the “Spring & Custom Timing Curves” lesson take?
Most CoddyKit lessons take about 5–10 minutes. Each one is bite-sized and interactive, so you make steady progress and pick up exactly where you left off across the web and the app.
Can I write and run code in this SwiftUI Academy lesson?
Yes. Every SwiftUI Academy lesson includes a built-in code editor, so you write and run real code right in your browser and get instant AI feedback — no local setup required.
All lessons in this course
- Implicit Animations
- Explicit Animations with withAnimation
- Insertion & Removal Transitions
- Spring & Custom Timing Curves