Edit: I am editing my initial question (see below for history) as I am getting new information.
I figured out that when the swipe motion starts from inside the button bounds, we never receive TouchesEnded
or TouchesCancelled
, only TouchesMoved
. However, if I can react on WillEnddragging
, it would be great. Is it possible to cancel a gesture on WillEndDragging
and also pass this cancel down the children chain?
History:
I am using Xamarin Forms and I have the following issue I have custom controls part of native scrolling views, like ScrollView or CollectionView, that remain in "clicked" state after the finger enters them but then initiates a scroll gesture.
I had a similar issue on UWP in the past and managed to solve it with the UIElement.PointerCaptureLost event.
Sorry if I am wasting your time on trivial stuff, but I am really stuck and I greatly appreciate your help.
I have tried different approaches suggested, including setting DelaysContentTouches
to NO, and playing around with CanCancelContentTouches
and overriding TouchesShouldCancelInContentView
to always return NO, in a ScrollView custom renderer.
I have had a read of Allow UIScrollView and its subviews to both respond to a touch and UIScrollView sending touches to subviews
Maybe the accepted answer here helps, but I am not sure how to get the tag of my custom view.
What I am expecting is my custom controls to receive the cancelled touch event (or something similar) as happens in both Android and Windows