Rob
Rob

Reputation: 7216

Animation with Trail

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

Answers (2)

Randall
Randall

Reputation: 14839

You can use CAEmitterLayers to do particle effects. iOS 5 only though.

http://developer.apple.com/library/mac/#documentation/GraphicsImaging/Reference/CAEmitterLayer_class/Reference/Reference.html

Upvotes: 1

windson
windson

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

Related Questions