RESideMenu icon indicating copy to clipboard operation
RESideMenu copied to clipboard

bouncesHorizontally always enable when first pan

Open GF-Huang opened this issue 10 years ago • 0 comments

in

- (void)panGestureRecognized:(UIPanGestureRecognizer *)recognizer {
    // ...
    if (recognizer.state == UIGestureRecognizerStateChanged) {
        // ...
        if (!self.bouncesHorizontally && self.visible) { // self.visible is "NO" when first pan(keep finger drap to right side) 
           if (self.contentViewContainer.frame.origin.x > self.contentViewContainer.frame.size.width / 2.0)
               point.x = MIN(0.0, point.x);

            if (self.contentViewContainer.frame.origin.x < -(self.contentViewContainer.frame.size.width / 2.0))
                point.x = MAX(0.0, point.x);
        }
    }
}

GF-Huang avatar Apr 22 '15 16:04 GF-Huang