I am trying to have two distinct actions: single tap and double tap (two quick taps). What happens though is that both actions get called. Is there a way around this?
A new function for the gesture recognizer objects, named
requireToFail(), will be available in the next release.
You will be able to add the following code in the
WillShow event of the container of the two tap gestures:
TapGesture1 is the single-tap and
TapGesture2 is the double-tap)
Hi @andrea, the solution you proposed worked for weeks but it no longer works in the simulator right now for me.
This is what I do. Again it works on a real iOS device, if I comment those lines or 4 out of 5, it will work, though the action will take almost a second to react.
forward.requireToFail(inspect) forward.requireToFail(back) forward.requireToFail(later) forward.requireToFail(previous) forward.requireToFail(next)
the `requireToFail` is not working correctly in our simulator if used for more than one gesture recognized, this bug will be fixed in the next release. It should work fine on a real iOS device.
There could be a delay for the action to be invoked depending on the gesture recognizer added as `requireToFail` because the first gesture recognizer must wait for the other gesture to fail before changing to the recognized state.