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.

  1. [[CCAnimationCache sharedAnimationCache] addAnimation:animationToCache name:@"NameOfAnimation"];
  2.  
  3.  
  4. CCAnimation *myAnimation = [[CCAnimationCache sharedAnimationCache]
  5. animationByName:@"NameOfAnimation"];