NSMutableArray *images = [NSMutableArray array];
for (int i = 1; i <= 3; i++) {
NSString *imageName = [NSString stringWithFormat:@"chat_audio_playing_%03d",i];
[images addObject:[UIImage imageNamed:imageName]];
}
[self.voiceImageView setAnimationImages:images];
[self.voiceImageView setAnimationDuration:.5];
[self.voiceImageView setAnimationRepeatCount:5];
[self.voiceImageView startAnimating];
转载于:https://www.cnblogs.com/lancely/p/5782686.html