This is how i did it. locationRect and locationrect2 is the portion where you want the gesture to be enabled.
- (BOOL)gestureRecognizerShouldBegin:(UIGestureRecognizer *)gestureRecognizer
{
CGRect locationRect;
CGRect locationRect2;
locationRect = CGRectMake(0, 0,60, self.view.frame.size.height);
locationRect2 = CGRectMake(self.view.frame.size.width-60, 0,60,self.view.frame.size.height);
CGPoint p = [gestureRecognizer locationInView:self.view];
if (CGRectContainsPoint(locationRect, p) || CGRectContainsPoint(locationRect2, p)) {
return YES;
} else {
return NO;
}
}