Animations
Last updated
Last updated
Motion provides the building blocks necessary to create stunning animations without much effort. Motion's animation API will make maintenance a breeze and changes even easier. To create an animation, use the animate method of a view or layer and pass in a list of MotionAnimation structs. MotionAnimation structs are configurable values that describe how to animate a property or group of properties.
In the above code example, a box view is created with a width of 100, height of 100, and an initial background color of blue. Following the general creation of the view, the Motion animate method is passed MotionAnimation structs that tell the view to animate to a red background color and rotate 180 degrees after a delay of 1 second. That's pretty much the general idea of creating animations.
Background Color
Corder Radius
Fade
Rotate
Size
Spring
Border Color & Border Width
Depth
Position
Scale
Spin
Translate