I have created a menuitem using
menuItemImage=[CCMenuItemImage itemFromNormalImage:@"image_old.png" selectedImage:@"image_old.png" target:self selector:@selector(play)];
I am using below code to change the CCMenuItemImage but it isn't working. It say's incompatible pointer type sending 'CCTextured2D' to parameter of normalimage.
[menuItemImage setNormalImage:[[CCTextureCache sharedTextureCache]addImage:@"image_new.png"]];
How to change menuItemImage runtime?
You can change the normalImage with the following code. I know this is not good practice but temporarily it works fine.
[menuItemImage setNormalImage:[CCSprite spriteWithFile:@"image_new.png"]];
I Hope it would work for you.