Skip to content

Disable UIPanGesture on specific UIView #95

Description

@JMCPH

Would it be possible to disable pan gesture for a specific UIView inside a UIViewController?

As the UIPanGestureRecognizer is private, it's not possible to do the following:

func gestureRecognizer(_ gestureRecognizer: UIGestureRecognizer, shouldReceive touch: UITouch) -> Bool {
     if touch.view?.isDescendant(of: view) == true {
        return false
     }
     return true
}

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