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

- For this chapter challenge, we're going to put together some of the concepts we've been talking about and see if we can drive them home. You're first task is going to be to create a repeating, rotating keyframe animation for the clock image. Now to get this done, you'll need two things. First go into animation helper and declare a new static var animatable property. And we're going to call this one rotation. Now the key path for this is transform.rotation. The second thing you'll need is rotation values and if you're not up to date on your geometry, these can be a bit frustrating. So let's just put these in a comment at the top of the loading view controller. We'll just say rotation values, and this has to be in an array, so the first value is 0.0 as we know, second value's going to be .pi/2.0, third value's going to be double.pi times 3/2, and the last value will be double.pi times 2. Your second task is to make a new group animation and add in the createKeyFrameColorAnimation, the…

Contents