首页 > 其他 > 详细

UIImage播放序列帧

时间:2014-11-13 16:06:46      阅读:209      评论:0      收藏:0      [点我收藏+]

NSMutableArray *images = [NSMutableArray array];

    for (int i = 0; i<count ; i ++) {

        NSString *imageName = [NSString stringWithFormat:@"%@_%02d.jpg",action,i];

        NSString *path = [[NSBundle mainBundle] pathForResource:imageName ofType:nil];

        // NSLog(@"path=%@",path);

        // UIImage *image = [UIImage imageNamed:imageName];  // 有缓存

        UIImage *image = [[UIImage alloc] initWithContentsOfFile:path];  // 没有缓存

        [images addObject:image];

    }

    _tom.animationImages = images;

    _tom.animationDuration = 10 ;

 _tom.animationRepeatCount = 1;

    [_tom startAnimating];  

UIImage播放序列帧

原文:http://www.cnblogs.com/wealon/p/4094970.html

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