I also tried to make this work, but I found a simpler and more efficient way to manage it.
so, for example, if you want to find napkins on the left, I would follow.
Declare two variables in the interface of your class
CGPoint firstTouch; CGPoint lastTouch;
In the init method of implementing your class, enable touch
self.isTouchEnabled = YES;
3. Add these methods to your class
-(void)ccTouchesBegan:(NSSet *)touches withEvent:(UIEvent *)event { NSSet *allTouches = [event allTouches]; UITouch * touch = [[allTouches allObjects] objectAtIndex:0]; CGPoint location = [touch locationInView: [touch view]]; location = [[CCDirector sharedDirector] convertToGL:location];
the doStuff method is what is called if the left swipe occurred.
source share