Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

chen8002004

macrumors newbie
Original poster
It is very easy to create an animation and to destroy it when animation complete.
Code:
	CALayer *newLayer=[CALayer layer];
	CAKeyframeAnimation *animationSequence = [CAKeyframeAnimation animationWithKeyPath: @"contents”];
	animationSequence.removedOnCompletion = YES;
	[newLayer addAnimation:animationSequence forKey:@"contents"];
	[parentLayer addSublayer:newLayer];

However, is there any good way to destroy the layer (newLayer) when animations inside the layer complete?
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.