Skip to content

How can I enable sloppy swipe while UIScrollView scrolling #18

@yukitoto

Description

@yukitoto

I use bellow code, but sloppy swipe not work while UIScrollView scrolling

cf. #13

@interface SloppyScrollView : UIScrollView
@EnD

- (BOOL)gestureRecognizerShouldBegin:(UIPanGestureRecognizer *)gestureRecognizer {
    CGPoint velocity = [gestureRecognizer velocityInView:self];
    if(velocity.x > 0 && self.contentOffset.x == 0) {
        return NO;
    }
    return YES;
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions