i think there’s 2 bugs in CCControlSwitch, and the bugs was found on my android device(htc desire s)
1.this bug can be found in the TestCpp project(CCControlSwitchTest). if you press the HOME key, you will go to desktop of your phone, and the TestCpp will be switched to the background. After that if you switch that TestCpp app to the foreground from background, this bug will be reproduced. All of the CCSprites you loaded will become WHITE BLOCKs (there textures were lost?). only the CCControlSwitch has this bug, other controls work well.
- you see, the CCControlSwitch::create function needs CCSprite params. if i pass CCSprites which created WITH FILE to CCControlSwitch::create, the CCControlSwitch will be loaded ok. But if i pass CCSprites which created WITH FRAME NAME to CCControlSwitch::create, the CCControlSwitch will be loaded badly. if a CCSprite was created with frame name, the CCSprite would have a big texture contained other images. when the CCSprite::getTexture was called by CCControlSwitch’s init functions, the CCControlSwitch wouldn’t get the right texture.