Post

CS193P Lecture07-ViewModifier Animation

CS193P Lecture07-ViewModifier Animation
  1. by animation a Shape
  2. animation via their ViewModifiers
1
2
3
4
5
6
protocol ViewModifier {
   typealias Content // the type of the View passed to body(content:)
   func body(content: Content) -> some View {
      return some View that almost certainly contains the View 
   }
}

Important takeaways about Animation

Only changes can be animated. Changes to what?

  1. ViewModifier arguments
  2. Shapes
  3. The “existence” (or not) of a View in the UI
    (the comings and goings of Views)

Anmation is showing the user changes that have already happened (i.e. the recent past).

This post is licensed under CC BY 4.0 by the author.