What is CCARRAY_FOREACH in coccos2d?
问题 I see a macro CCARRAY_FOREACH in coccos2d, actually what does it? can we do alternative solution instead of it?i am using following code for spriteBatchNode? CCARRAY_FOREACH([spriteBatch children], sprite) { ................... } 回答1: it is a macro for looping through each object inside a CCArray... an alternative would be objective-c's foreach for (object in array) that goes like this: for (CCSprite *sprite in [spriteBatch children]) { ... } this is for NSArray and NSMutableArray but i think