Prioritise UITapGestureRecognizer on interop views with Cooperative
interop mode. Prioritise UIScreenEdgePanGestureRecognizer on ascendant views.
#1695
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Before that change taps on interop views with cooperative mode would be discarded by compose, which expects non-discrete gesture holding on a point before failing and redirecting touches sequence to the interop view.
The requirement of holding ultimately made the tap gesture impossible due to its requirement of being a short press/release sequence, which contradicts the compose heuristics.
This scenario is fixed in this PR by allowing precedence of
UITapGestureRecognizer
over other recognisers.Since most of the native
tap
/double tap
interactions are built on top ofUITapGestureRecognizer
it should improve the UX for default interop properties with stable constructor setting the interaction mode to beCooperative
.Coincidentally this change inspired a cheap fix for interactive pop bugs.
Resolves https://youtrack.jetbrains.com/issue/CMP-6683
Fixes https://youtrack.jetbrains.com/issue/CMP-6622/Gestures-dont-work-on-native-ios-view-embedded-with-UIKitView-for-compose-1.7.0-beta01
Demo:
Screen.Recording.2024-11-25.at.14.18.25.mov
Testing
UINavigationController
should not get stuck in an awkward state preventing the gesture.This should be tested by QA
Release Notes
Fixes - iOS
UIKitInteropInteractionMode.Cooperative
interaction mode.UINavigationController
should recognize correctly.