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

Conflict with form sheet pull down gesture #50

Open
igorkulman opened this issue Nov 1, 2019 · 0 comments
Open

Conflict with form sheet pull down gesture #50

igorkulman opened this issue Nov 1, 2019 · 0 comments

Comments

@igorkulman
Copy link
Contributor

I have TouchDrawView in a VC that is presented as form sheet, the default behavior now on iOS 13. Trying to draw lines going roughly from top to bottom invokes the VC dismissal gesture instead of the actual drawing:

Nov-01-2019 18-54-53

According to https://stackoverflow.com/questions/56718552/disable-gesture-to-pull-down-form-page-sheet-modal-presentation the TouchDrawView should override gestureRecognizerShouldBegin and return false.

I did some experiments and adding

extension TouchDrawView {

    open override func gestureRecognizerShouldBegin(_ gestureRecognizer: UIGestureRecognizer) -> Bool {
        return !(gestureRecognizer is UIPanGestureRecognizer)
    }
}

seems to work OK, but I am not sure it is the best way to go.

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

No branches or pull requests

1 participant