(IOS)播放一张张连续的图片

时间:2020-06-16 14:58:17   收藏:0   阅读:98

// 加入现在有三张图片分别为animate_1、animate_2、animate_3

// 方法一

imageView.animationImages =@[[UIImage imageNamed:@"animate_1"], [UIImage imageNamed:@"animate_2"], [UIImage imageNamed:@"animate_3"]];

imageView.animationDuration =1.0;

// 方法二

imageView.image = [UIImage animatedImageNamed:@"animate_"duration:1.0];

// 方法二解释下,这个方法会加载animate_为前缀的,后边0-1024,也就是animate_0、animate_1一直到animate_1024

评论(0
© 2014 mamicode.com 版权所有 京ICP备13008772号-2  联系我们:gaon5@hotmail.com
迷上了代码!