ios之image加载帧动画

序列帧动画概念和序列帧动画实现

方式1:
-[UIImage animatedImageWithImages:动画图片数组 duration:持续时间]; // 可以获取一个能做动画的UIImage对象"gif图片"
方式2:
self.imageView.animationImages = array; // 装图片的数组(需要做动画的图片数组)
self.imageView.animationDuration = 2; // 动画时间
self.imageView.animationRepeatCount = 1; // 重复次数 0 表示重复
[self.imageView startAnimating]; // 开始序列帧动画

图片浏览器-两种加载plist的方式 方式1,通过文件路径加载(本地) NSString *path = [[NSBundle mainBundle] pathForResource:@"images.plist" ofType:nil]; NSArray *images = [NSArray arrayWithContentsOfFile:path]; 方法2,通过文件 URL 加载(本地/网络)统一资源定位符 - NSURL *url = [[NSBundle mainBundle] URLForResource:@"images.plist" withExtension:nil]; - NSArray *images = [NSArray arrayWithContentsOfURL:url];

 

posted @ 2017-05-09 16:12  哇哈爽  阅读(696)  评论(0编辑  收藏  举报