Request to expose TouchUITapGestureRecognizer and provide a way to cancel TouchBehavior #3048
maonaoda
started this conversation in
New Feature Discussions
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
sealed class TouchUITapGestureRecognizer : UIGestureRecognizerMaui/src/CommunityToolkit.Maui/Behaviors/PlatformBehaviors/Touch/TouchBehavior.macios.cs
Line 91 in c1d2ee3
Request to expose
TouchUITapGestureRecognizerand provide a way to cancelTouchBehaviorBackground
In our iOS app, we override the system back gesture using a custom
UIScreenEdgePanGestureRecognizerto implement customized navigation behavior.However, when the current page uses CommunityToolkit.Maui
TouchBehavior, a gesture conflict occurs between:UIScreenEdgePanGestureRecognizer, andTouchBehavior.This conflict makes it difficult to reliably handle the iOS edge-swipe back gesture when
TouchBehavioris attached to a view.Problem
Currently, there is no public way to detect or cancel an active
TouchBehaviorinteraction.Internally,
TouchBehaviorrelies onTouchUITapGestureRecognizer, but this class is not public, and there is no exposed API that allows the application to cancel the touch interaction when another gesture (such asUIScreenEdgePanGestureRecognizer) takes priority.As a result:
TouchBehaviorProposal
I would like to request:
TouchUITapGestureRecognizera public class, andTouchBehavior.For example, an API similar to the following:
This would allow applications to:
TouchBehaviorexplicitly when a higher-priority UIKit gesture is recognizedUIScreenEdgePanGestureRecognizerBenefits
I believe this would be a valuable improvement for apps that need fine-grained control over gesture coordination on iOS.
Beta Was this translation helpful? Give feedback.
All reactions