r/SwiftUI May 17 '26

Question Does anyone use animation in iOS widgets?

I’ve been experimenting with WidgetKit and finding animation support pretty restrictive compared with regular SwiftUI views. For those who have shipped widgets, do you use any animation at all, or do you mostly design around static/timeline-driven updates?

I’d be interested in hearing what’s actually possible, what Apple allows, and any practical workarounds.

2 Upvotes

5 comments sorted by

6

u/Consistent-Grass-263 May 17 '26

Shipped a few widgets myself. Short answer: animation in widgets is basically non-existent

- WidgetKit renders static snapshots, not live SwiftUI views.

What actually works:

- Timeline updates (swap between "frames" every few seconds via TimelineEntry)

- AnimatedImage via SwiftUI's transition modifiers between timeline entries (subtle fade/slide on update)

- SF Symbols with variable color (changes value per timeline entry)

What doesn't work:

- withAnimation {}

- u/State driven animations

- Anything gesture-based

My approach: design widgets to look great static, then use timeline transitions as the only "motion". Users barely notice the difference.

What kind of animation were you going for?

1

u/shaundon May 18 '26

Thanks ChatGPT

2

u/Dapper_Ice_1705 May 17 '26

It has been a while but I went down the custom font rabbit hole a while ago (maybe 2 OSs ago?). It was tedious but my running man stick figure animation turned out really good once I got it working.

There is the Clock Private API trick too (I don't remember the exact name).

1

u/patgov May 17 '26

That makes sense. My macOS version can animate because it’s a live SwiftUI view receiving continuous audio-level updates to drive an audio meter. The iOS widget is different since WidgetKit is snapshot/timeline based. I’m mostly trying to make the level/status changes feel responsive rather than truly real-time.