Cocos2D provides a simple way to cache you Animations using CCAnimationCache class.
The CCAnimationCache is implemented as a singleton which can be accessed using the [CCAnimationCache sharedAnimationCache] method.This approach is particularly useful if the animation steps are common across more than one sprites.
- [[CCAnimationCache sharedAnimationCache] addAnimation:animationToCache name:@"NameOfAnimation"];
- CCAnimation *myAnimation =[[CCAnimationCache sharedAnimationCache]
- animationByName:@"NameOfAnimation"];