iOS-播放帧动画

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];
posted @ 2016-08-18 09:16  lancely  阅读(266)  评论(0编辑  收藏  举报