Skip to content

Commit

Permalink
Closes #186
Browse files Browse the repository at this point in the history
Improve support for popup content view scrollview subviews. The gesture recognizer delegate is now properly consulted when scroll view gestures trigger interaction.
  • Loading branch information
LeoNatan committed Oct 15, 2017
1 parent a1f80f8 commit 9ff6045
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -558,7 +558,11 @@ - (void)_popupBarPresentationByUserPanGestureHandler_changed:(UIPanGestureRecogn
UIScrollView* possibleScrollView = (id)pgr.view;
if([possibleScrollView isKindOfClass:[UIScrollView class]])
{
if(_dismissGestureStarted == NO && possibleScrollView.contentOffset.y > - (possibleScrollView.contentInset.top + LNPopupBarDeveloperPanGestureThreshold))
id<UIGestureRecognizerDelegate> delegate = _popupContentView.popupInteractionGestureRecognizer.delegate;

if(([delegate respondsToSelector:@selector(gestureRecognizer:shouldRequireFailureOfGestureRecognizer:)] && [delegate gestureRecognizer:_popupContentView.popupInteractionGestureRecognizer shouldRequireFailureOfGestureRecognizer:pgr] == YES) ||
([delegate respondsToSelector:@selector(gestureRecognizer:shouldRecognizeSimultaneouslyWithGestureRecognizer:)] && [delegate gestureRecognizer:_popupContentView.popupInteractionGestureRecognizer shouldRecognizeSimultaneouslyWithGestureRecognizer:pgr] == NO) ||
(_dismissGestureStarted == NO && possibleScrollView.contentOffset.y > - (possibleScrollView.contentInset.top + LNPopupBarDeveloperPanGestureThreshold)))
{
return;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,7 @@ - (void)_common_uLFSBAIO
if(self.popupContentViewController)
{
dispatch_async(dispatch_get_main_queue(), ^{
[UIView animateWithDuration:5.0 delay:0.0 usingSpringWithDamping:500 initialSpringVelocity:0.0 options: UIViewAnimationOptionLayoutSubviews | UIViewAnimationOptionAllowUserInteraction | UIViewAnimationOptionAllowAnimatedContent animations:^{
[UIView animateWithDuration:UIApplication.sharedApplication.statusBarOrientationAnimationDuration delay:0.0 usingSpringWithDamping:500 initialSpringVelocity:0.0 options: UIViewAnimationOptionLayoutSubviews | UIViewAnimationOptionAllowUserInteraction | UIViewAnimationOptionAllowAnimatedContent animations:^{
[self.popupContentViewController _uLFSBAIO];
[self._ln_popupController_nocreate _repositionPopupCloseButton];
} completion:nil];
Expand Down

0 comments on commit 9ff6045

Please sign in to comment.