From the course: Learning iOS Animations with UIKit

Unlock the full course today

Join today to access over 22,400 courses taught by industry experts or purchase this course individually.

Using calculation modes

Using calculation modes - iOS Tutorial

From the course: Learning iOS Animations with UIKit

Start my 1-month free trial

Using calculation modes

- [Instructor] Just like view animations and transitions, key frame animations have their own option effects. Let's go to the top of our bounce image view with key frames and into the options parameter for our overarching key frame animation. Right now we've only got repeat so we're going to add a comma and use dot notation to start looking at each option. Now all of our options start with calculation so we can see here that we have five modes. CalculationModeCubic, Paced, Linear, Discreet and CubicPaced. Now let's start with Linear since this deal with how to interpolate or move between each key frame. Let's save this and run and see how our animation changes. All right now we won't see too much difference with the linear calculation mode because our animation is already fairly smooth and even. However let's replace calculationModeLinear with calculationModeDiscreet. Now Discreet is simply going to jump from key frame to key frame without any easing at all. So in essence Discreet and…

Contents