Alex Does Things Poorly

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

5 July 2021

More SwiftUI Animations

by alex

Two small wins today:

We covered more animation with SwiftUI today, and most of it was brand new to me. One hiccup I ran into: the SwiftUI preview canvas in Xcode beta 13 doesn’t seem to render transition insertions correctly, but does render removal transitions correctly. Everything works OK in the simulator so maybe it’s either a problem with the preview canvas or a beta bug? Either way, minor details.

I don’t think I’ll be using animations a ton at work, it’s never seemed like a priority for us. We call that kind of stuff “sizzle.” The implication being that it’s not calories or sustenance, it’s just shiny surface details. I don’t entirely agree, but it makes sense for a research & science project.

However, when it comes to my tech art practice, movement and animation are gonna be very useful tools. Eventually I’d like to explore drawing (a la Processing or the Nature of Code) inside the SwiftUI Canvas.

Another minor quirk: why is there a canvas in Xcode for previewing your SwiftUI layout and a Canvas view type for immediate drawing in SwiftUI? Did they have to be named the same thing?

tags: swift - swiftui