Member-only story

SwiftUI: Implicit vs Explicit Animations

fatbobman ( 东坡肘子)
3 min readMar 20, 2025

--

TL;DR: Implicit animations in SwiftUI use modifiers like .animation, automatically applying effects to state changes. Explicit animations, using withAnimation or withTransaction, offer centralized control and can override implicit behaviors. Combine both for tailored animation management.

Background

SwiftUI provides two animation mechanisms: implicit animations and explicit animations. Many developers find it challenging to understand their differences and application scenarios. This article compares the two through examples, analyzing their use cases and considerations.

Stay ahead with the latest updates and deep insights on Swift, SwiftUI, Core Data, and SwiftData. Subscribe to Fatbobman’s Swift Weekly to get exclusive articles, tips, and curated resources delivered straight to your inbox every week.

For even more valuable content and in-depth tutorials, visit my blog at fatbobman.com — your go-to destination for all things Swift and Apple development.

Implicit Animations

--

--

fatbobman ( 东坡肘子)
fatbobman ( 东坡肘子)

Written by fatbobman ( 东坡肘子)

Blogger | Sharing articles at https://fatbobman.com | Publisher of a weekly newsletter on Swift at http://weekly.fatbobman.com

No responses yet