Game Development Stack Exchange is a question and answer site for professional and independent game developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Actually i am working with cocos2d Game. I am using CCLayer for particular scene. now there are so many buttons means CCMenuitems are available. I want to disable that all menuitems having same tags.

share|improve this question
up vote 3 down vote accepted

I'm not sure what the best way to do this is but the way I would do is by putting all the children into an array. Then iterate trough the array:

WhateverYouNeed *thingInArray;
CCArray *theArray = [self children];
for thingInArray in theArray {
  if ([thingInArray tag] == whateverTheTagIs) 
    do some stuff to thingInArray
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.