Alex Does Things Poorly

Alex does a variety of things poorly - swift, data science, datavis, ML, drawing, AR, unity, etc, etc.

4 July 2021

SwiftUI Animations

by alex

It’s the Fourth of July, but I managed to squeeze in some 100 Days of SwiftUI work today.

We went over animation basics in SwiftUI, which was the first time in this 100 Days journey that the content was almost entirely new to me.

Doing explicit animations using withAnimation() was the most UIKit-like, similar to UIView’s .animateWithDuration() method. It seems like sort of a global animation handler, probably useful for coordinating multiple animations or transitions.

Newer to me was the SwiftUI modifier .animation() and more generally animating on bindings, which seems really werid. I’m sure it will make sense eventually.

Otherwise, it was a short day as the wife and I were on a drive for the holiday.

tags: swift - swiftui