Skip to content
This repository has been archived by the owner on Jan 18, 2022. It is now read-only.

Panning restriction #21

Closed
wants to merge 1 commit into from
Closed

Conversation

arturgrigor
Copy link

If you want to pan the view, the first touch needs to be contained in the panningArea, just like Google is doing with the YouTube iOS app.

… the panningArea, just like Google is doing with the YouTube iOS app.
Copy link

@Paulophmp Paulophmp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok

@niyog7
Copy link

niyog7 commented Oct 25, 2019

Okk

@nerdymuslim
Copy link

ok

Copy link

@gabeduckham gabeduckham left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok

@@ -638,6 +640,10 @@ - (void)panePanned:(UIPanGestureRecognizer *)gestureRecognizer
}
case UIGestureRecognizerStateChanged: {
CGPoint panLocationInPaneView = [gestureRecognizer locationInView:self.paneView];

// If you want to pan the view, the first touch needs to be contained in this area
if (! CGRectContainsPoint(self.panningArea, self.paneStartLocation)) return;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Else

Copy link

@abdul-shajin abdul-shajin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet