UIImage播放序列帧

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];

    }

 

你可能感兴趣的:(UIImage播放序列帧)