title: cocos2d sprite frame cache unable to change
body: <p>in my game i want to make several themes. (like doodle jump)
  the frame names are the same in different themes and i think i just need to change the plist files. </p>
  
  <p>in the Helper.m:</p>
  
  <pre><code>+(void) addCache {
  
  ThemeTypes themeType = [Helper getCurrentThemeType];
  
  if (themeType == ThemeTypeDefaultTheme) {
      [[CCSpriteFrameCache sharedSpriteFrameCache] addSpriteFramesWithFile:@"block.plist"];
  }
  else if (themeType == ThemeTypeJungleTheme) {
      [[CCSpriteFrameCache sharedSpriteFrameCache] addSpriteFramesWithFile:@"jungle1.plist"];
      [[CCSpriteFrameCache sharedSpriteFrameCache] addSpriteFramesWithFile:@"jungle2.plist"];
  }
  else if (themeType == ThemeTypeXmasTheme) {
      [[CCSpriteFrameCache sharedSpriteFrameCache] addSpriteFramesWithFile:@"xmas1.plist"];
      [[CCSpriteFrameCache sharedSpriteFrameCache] addSpriteFramesWithFile:@"xmas2.plist"];
  }
  else if (themeType == ThemeTypeWhiteTheme) {
      [[CCSpriteFrameCache sharedSpriteFrameCache] addSpriteFramesWithFile:@"blockwhite.plist"];
  }
  else if (themeType == ThemeTypeOuterSpaceTheme) {
      [[CCSpriteFrameCache sharedSpriteFrameCache] addSpriteFramesWithFile:@"outer1.plist"];
  }
  else if (themeType == ThemeTypeSkyTheme) {
      [[CCSpriteFrameCache sharedSpriteFrameCache] addSpriteFramesWithFile:@"sky1.plist"];
      [[CCSpriteFrameCache sharedSpriteFrameCache] addSpriteFramesWithFile:@"sky2.plist"];
  }
  else {
  
  }
  }
  
  
  +(void) purgeCache {
      [[CCSpriteFrameCache sharedSpriteFrameCache] removeSpriteFrames];
      [CCSpriteFrameCache purgeSharedSpriteFrameCache];
  }
  
  +(void) refreshCache {
      [Helper purgeCache];
      [Helper addCache];
  }
  </code></pre>
  
  <p>in appdelegate, i will call 'addcache', then in my ShopScene, when choosing a theme, 'refresh cache' will get called. </p>
  
  <p>this code is in my BlockCache ('normal block' is a kind of block in game')</p>
  
  <pre><code>    CCSpriteFrame* frame = [[CCSpriteFrameCache sharedSpriteFrameCache] spriteFrameByName:@"normal.png"];
      batch = [CCSpriteBatchNode batchNodeWithTexture:frame.texture];
      [self addChild:batch];
  </code></pre>
  
  <p>(note that @"normal.png" exist in every plist files. use the same name. </p>
  
  <p>but after changing the theme, the 'block cache' still use the original images. however, the background etc uses the correct one (I use bg = [CCSprite spriteWithSpriteFrameName: ] method</p>
  
  <p>UPDATE: after choosing the theme, i kill the game, and then relaunch it, it works fine. which means the call from Appdelegate is fine, but i can't change the cache during run time. </p>