Add a method to the custom Uiscroview.
Left side slide:
-(BOOL) Gesturerecognizershouldbegin: (Uigesturerecognizer *) Gesturerecognizer
{
Cgpoint velocity = [(Uipangesturerecognizer *) Gesturerecognizer velocityinview:self];
Cgpoint location = [Gesturerecognizer locationinview:self];
NSLog (@ "velocity.x:%f----location.x:%d", velocity.x, (int) location.x% (int) [UIScreen mainscreen].bounds.size.width );
if (velocity.x > 0.0f&& (int) location.x% (int) [UIScreen mainscreen].bounds.size.width<60) {
return NO;
}
return YES;
}
Right side slide:
-(BOOL) Gesturerecognizershouldbegin: (Uigesturerecognizer *) Gesturerecognizer
{
Cgpoint velocity = [(Uipangesturerecognizer *) Gesturerecognizer velocityinview:self];
Cgpoint location = [Gesturerecognizer locationinview:self];
NSLog (@ "velocity.x:%f----location.x:%d", velocity.x, (int) location.x% (int) [UIScreen mainscreen].bounds.size.width );
if (velocity.x > 0.0f&& (int) location.x% (int) [UIScreen mainscreen].bounds.size.width>[uiscreen MAINSCREEN].BOUNDS.SIZE.WIDTH-60) {
return NO;
}
return YES;
}
IOS Uiscrollview and slide-by-gesture conflict resolution