From the course: Learning iOS Animations with UIKit

Unlock the full course today

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

View animation options

View animation options - iOS Tutorial

From the course: Learning iOS Animations with UIKit

Start my 1-month free trial

View animation options

- [Instructor] Now that we've got our loading screen animating cleanly, we can start to make use of UIView animation options to give them a bit more life. When we're using the animate method, we have access to two categories of options. Repeating animations, and applying force or momentum, which we call easing. Now, since the repeating category has only two options, let's start with those. In the animateGraphic animation, let's add the repeat option to the array perimeter. We'll say dot repeat, and let's run this and see what it looks like. So as expected, this is going to loop our graphic animation indefinitely, but only from the beginning. If we wanted to play it back and forth, we would need to add the autoreverse option, so let's try that out. Going to stop this playing, add a comma after repeat, and add in autoreverse. Save and run that again. We should see something a little bit different. There we go, it's pulsing in and out. A special note here, autoreverse can only be used as…

Contents