Skip to content

Conflict with form sheet pull down gesture #50

@igorkulman

Description

@igorkulman

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions