I have a CAEmitterCell
:
CAEmitterCell * spriteCell = [CAEmitterCell emitterCell];
spriteCell.contents = (id) [[UIImage imageNamed:@"emitterSprite.png"] CGImage];
I would like the sprite to be an animated png sequence (or so) instead of a single image.
The only technique I know makes use of an UIImageView
:
NSMutableArray *animatedImagesArray = [NSMutableArray new];
imageView = [[UIImageView alloc] initWithFrame:CGRectMake(...)];
for (int i = 1; i <= 10; i++)
{[animatedImagesArray addObject:[UIImage imageNamed:[NSString stringWithFormat:@"sequenceNo-%d%@", i, @".png"]]];}
imageView.animationImages = animatedImagesArray;
[view addSubview:imageView];
CAEmitterCell.contents
doesn't seem to accept UIImageView
. Is there a way to achieve this ?