首页 > 其他 > 详细

展示动态图片(播放一组图片)

时间:2014-09-05 03:22:11      阅读:260      评论:0      收藏:0      [点我收藏+]

//展示动态图片(播放一组图片)
    //创建做动画的图片,存储到数组中
    NSMutableArray * animationImages = [NSMutableArray array];
    for (int i = 0 ; i < 7 ; i ++) {
        UIImage * image1 = [UIImage imageWithContentsOfFile:[[NSBundle mainBundle] pathForResource:[NSString stringWithFormat:@"huoju_%d",i+1] ofType:@"tiff"]];
        [animationImages addObject:image1];
    }
    imageView.animationImages = animationImages;
    
    //设置播发完一组动态图片的时间
    imageView.animationDuration = 1;
    //设置重复的次数
    imageView.animationRepeatCount = 3;
    [self.view addSubview:imageView];
    [imageView release];
    
    //开始播放
    [imageView startAnimating];
  //  [imageView stopAnimating];

展示动态图片(播放一组图片)

原文:http://qccccc.blog.51cto.com/6004423/1548912

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!