-1
-(id)init
{
  if ((self = [super init]))
  {

    [self setupTitle];
    self.touchEnabeled = YES;

  }
return self;
}

-(void)ccTouchesBegan:(NSSet *)touches withEvent:(UIEvent *)event
 {

[[CCDirector sharedDirector]
replaceScene:[CCTransitionFade transitionWithDuration:1.0 scene:[GameScene node]]];
CCSprite *start = (CCSprite *)
[self getChildByTag:1]; [start stopAllActions];
start.visible = NO;

 }

Cant Get self.touchEnabled = YES; working it gives an error ;

touchEnabled Not found on object type of 'TitleLayer'

John
  • 17
  • 6

2 Answers2

0

This property is called userInteractionEnabled since cocos2d v3.0.

If you're using older version of cocos2d try to fix the typo in your code. The right name for property is touchEnabled.

s1ddok
  • 4,615
  • 1
  • 18
  • 31
0

In older versions, the code is:

self.touchEnabled = YES;

Try just copying this and putting it in.

virgil debique
  • 357
  • 2
  • 11