Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training,
learning paths, books, tutorials, and more.

Animating the rotation of an element

While performing complex calculations or downloading data from the Internet, it is beneficial to present suitable information to the user. Of course, you can use the progress bar or just a text block, but it may be significantly more attractive to use the rotating image. In this recipe, you will learn how to create animation from two files: a background with a circle and a point rotating around the circle. What is more, you will see how to programmatically stop and restart the animation.

Getting ready

To step through this recipe, you need only the automatically generated project.

How to do it...

To prepare the example that animates rotation of an image, to create the effect of the rotating progress bar, perform ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training,
learning paths, books, interactive tutorials, and more.