Hello
I have quite a conundrum. I have controls that have Single and Double tap events. On Android they work flawlessly. But on IOS I can never get the double tap to work because the single tap happens so fast.
I know there has to be a way to handle this, and there has to be someone that has done this.
Any help would be much appreciate.
Answers
Sorry, I couldn't reproduce this problem on our side.
Could you please post the code snippets here so that we can help you bettter?
Xamarin forums are migrating to a new home on Microsoft Q&A!
We invite you to post new questions in the Xamarin forums’ new home on Microsoft Q&A!
For more information, please refer to this sticky post.
@jezh its super easy to replicate, take the code below and run on IOS and see if you an get the double click action to run or run without the single click action happening. I did find a way to do so...but I am not convinced its 100% effective
For some reason the code did not show up
LOL i dont know why its not showing up.
But to replicate, create a single tap, and double tap gesture recognizer
Try to get the double tap to work on IOS.....
I tested above code which is similar to yours,when I click twice in a row,both event
TapGestureRecognizer_Tapped
andTapGestureRecognizer_Tapped_1
will been triggered not the casenever get the double tap
you mentioned.@jezh I can assure you, on IOS, you cannot get the double tap to work without the single tap happening......and more often that not you cant get the double tap to work because the single tap happens. I am not making this up....its very simple....
<BoxView.GestureRecognizers>
</BoxView.GestureRecognizers>
I Dont know how you got the code to show up on this? anyway on IOS 10, you cannot get the double tap to work because of the single tap. You can put a delay....but then both are fired. I removed all my code because of this. Super annoying. Each action I have opens popup. Single Tap opens one type and the double tap opened a different type. I would either constantly get the single tap popup or i would get both.
I tested on emulator IOS 14.4, and I have updated the Visual studio and nuget
xamarin form
nuget to the latest version.You can try it.
I am testing on actual devices not an emulator and I have udpated. Maybe their is a language barrier problem or misunderstanding. If you have a control, that has a single tap that calls a method and a double tap that calls a method...on IOS you cannot get the double tap. Atleast not on the Samsung devices I am testing. I can 100% assure you. I have read multiple places online of people having the same issue and many people saying its not a good idea to do
What specific device are you testing on, and what is the version of the device?
You can try not listening the tapevent in the model. In other words, not use the
Command
andCommandParameter
.@jezh I am using MVVM....thus I would need a command parameter. It cold be because its on a frame as well. Its an Iphone 11. I will try using methods and see if that makes a difference...though I am using MVVM...but at least I can update on here. I have already removed all the double tap instances on my app.
Waitting for your good news.