Try using this code.
NSArray *animeImages = [NSArray arrayWithObjects: [UIImage imageNamed:@"tmp-0.png"], [UIImage imageNamed:@"tmp-1.png"], [UIImage imageNamed:@"tmp-2.png"], [UIImage imageNamed:@"tmp-3.png"], [UIImage imageNamed:@"tmp-4.png"], [UIImage imageNamed:@"tmp-5.png"], [UIImage imageNamed:@"tmp-6.png"], [UIImage imageNamed:@"tmp-7.png"], [UIImage imageNamed:@"tmp-8.png"], [UIImage imageNamed:@"tmp-9.png"], [UIImage imageNamed:@"tmp-10.png"], [UIImage imageNamed:@"tmp-11.png"], nil]; imageView.image = [UIImage animatedImageWithImages:animeImages duration:2.0];
Now you can play with this image and set its various properties, such as frame and hidden, etc., to make it work as an indicator of activity. The images transferred in the array are a breakdown of the animated gif. This can be easily done with any online tool like this .
source share