Skip to content

Add support for multiple gestures of the same type with different parameters #295

@HealsCodes

Description

@HealsCodes

I'm having a hard time adding two separate :tap gestures to my view.
The goal is to trigger different actions if the view was tapped with one or two fingers.
I know in pure Cocoa-Touch this is possible by adding different recognizers and making use of requestRecognizerToFail() to differentiate.

I think there should be a way in RMQ to do this:

rmq.on(:tap, fingers_required: 1) { |sender, event| puts "one finger tap" }
rmq.on(:tap, fingers_required: 2, taps_required: 2) { |sender, event| puts "two finger double tap" }

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions