Take the 2-minute tour ×
Game Development Stack Exchange is a question and answer site for professional and independent game developers. It's 100% free, no registration required.

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
add comment

1 Answer 1

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
add comment

Your Answer

 
discard

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.