Skip to content

Instantly share code, notes, and snippets.

@sdabet
Last active December 15, 2015 07:59
Show Gist options
  • Save sdabet/5227318 to your computer and use it in GitHub Desktop.
Save sdabet/5227318 to your computer and use it in GitHub Desktop.
Override registerWithTouchDispatcher to disable touch swallowing
-(id) init {
if(self = [super init]) {
self.touchEnabled = YES;
}
return self;
}
/* Need to override because we don't want to swallow touches */
-(void) registerWithTouchDispatcher {
[[[CCDirector sharedDirector] touchDispatcher] addTargetedDelegate:self priority:0 swallowsTouches:NO];
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment