RESideMenu
RESideMenu copied to clipboard
bouncesHorizontally always enable when first pan
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);
}
}
}