Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prevent pan gesture recognizer to start when panning is disabled #124

Merged
merged 1 commit into from
Dec 12, 2019

Conversation

Valgrin
Copy link
Contributor

@Valgrin Valgrin commented Dec 12, 2019

Prevent pan gesture recognizer to start when panning is disabled

It also allow scrolling when the better segmented control is placed inside a scroll view and the panning is disabled on the segmented control

@gmarm
Copy link
Owner

gmarm commented Dec 12, 2019

Looks nice.

Is the check at

guard !panningDisabled else { return }
still needed?

Or will your addition prevent the method from being triggered entirely? If so, can you remove the guard statement?

@Valgrin
Copy link
Contributor Author

Valgrin commented Dec 12, 2019

The check is indeed not needed anymore.

The addition will prevent the method from being triggered entirely. Let me do the change.

It also allow scrolling when the better segmented control is placed inside a scroll view and the panning is disabled on the segmented control
@gmarm gmarm merged commit 3fa5b92 into gmarm:master Dec 12, 2019
@gmarm
Copy link
Owner

gmarm commented Dec 12, 2019

Cool, thanks for taking the time to add this @Valgrin !

@Valgrin
Copy link
Contributor Author

Valgrin commented Dec 12, 2019

Thank you @gmarm for your reactivity!

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

Successfully merging this pull request may close these issues.

None yet

2 participants