Reputation: 7216
I'm trying to make an animation that leaves a trail behind it for the iPhone. Any ideas how to do that?
THank you!
Upvotes: 2
Views: 320
Reputation: 14839
You can use CAEmitterLayers to do particle effects. iOS 5 only though.
Upvotes: 1
Reputation: 667
The Cocoa Touch framework does not have any in-built features that let you do this, that I know of.
If you want to make one yourself, you would have to construct the animation frame-by-frame. Each frame would be a snapshot of what the screen would look like at that point in the animation. They can displayed one after the other with UIImageView
.
NSArray *frames = [NSArray arrayWithObjects:frame1, frame2,...., nil];
UIImageView *animateFrames = [UIImageView alloc] init];
animateFrames.animationImages = frames;
animateFrames.animationDuration = DESIRED_DURATION;
animateFrames.repeatCount = 1;
[animateFrames startAnimating];
Upvotes: 0