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.
To prepare the example that animates rotation of an image, to create the effect of the rotating progress bar, perform the following steps:
Add the
ProgressBackground.png
andProgressForeground.png
files to theAssets
directory. Here is an example of such files (background on the left and foreground on the right):Add such images to the page and define a storyboard...