From the course: Advanced iOS App Development: Core Animation

Unlock the full course today

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

Chapter challenge

Chapter challenge - iOS Tutorial

From the course: Advanced iOS App Development: Core Animation

Start my 1-month free trial

Chapter challenge

- [Instructor] For this challenge, your task is to animate the dashboard view controller's gradient locations using a custom CA action. What location values you animate the gradient to are completely up to you, so have a little fun and experiment. Yo can find the default gradient locations in view will appear. This animateable property takes in an array of doubles which corresponds to the color spread in the gradient layer. So by adjusting these or animating them, it'll look like the gradient is sort of moving or shimmering. Now, we'll also need a new keyPath, so let's go into the Animation Helper, and we'll say static var gradient locations, and the keyPath for this is just locations. That's it. You're all set. If you get stuck, go back and revisit the first video of this module, and happy coding.

Contents