展示动态图片(播放一组图片)
创建做动画的图片,存储到数组中
NSMutableArray * animationImages = [NSMutableArray array];
for (int i = 0 ; i < 7 ; i ++) {
UIImage * p_w_picpath2 = [UIImage p_w_picpathWithContentsOfFile:[[NSBundle mainBundle] pathForResource:[NSString stringWithFormat:@"huoju_%d",i+1] ofType:@"tiff"]];
[animationImages addObject:p_w_picpath2];
}
p_w_picpathView.animationImages = animationImages;
设置播发完一组动态图片的时间
p_w_picpathView.animationDuration = 1;
设置重复的次数
p_w_picpathView.animationRepeatCount = 3;
[self.view addSubview:p_w_picpathView];
[p_w_picpathView release];
开始播放
[p_w_picpathView startAnimating];
[p_w_picpathView stopAnimating];
免责声明:本站发布的内容(图片、视频和文字)以原创、转载和分享为主,文章观点不代表本网站立场,如果涉及侵权请联系站长邮箱:is@yisu.com进行举报,并提供相关证据,一经查实,将立刻删除涉嫌侵权内容。