In my Box2d game i try to use uiswipegesture to get the swipe gesture up and when i do in test project it works fine but when i implement in box2d game it does not called swipe action here is the code
{UISwipeGestureRecognizer *swipeGestureup = [[UISwipeGestureRecognizer alloc] initWithTarget:self action:@selector(oneFingerSwipeUp)];
[swipeGestureup setDirection: UISwipeGestureRecognizerDirectionUp ];
[[[CCDirector sharedDirector] openGLView] addGestureRecognizer:swipeGestureup];
[swipeGestureup release];}
and method is
-(void)oneFingerSwipeUp:(id)sender{
NSLog(@"swipe auction called");
[player jump];
}
1 Answer