Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Correctly implement the UIGestureRecognizer state machine#2004

Draft
filipnavara wants to merge 5 commits into
CommunityToolkit:main from
filipnavara:apple-touch-state-machine
Draft

Correctly implement the UIGestureRecognizer state machine #2004
filipnavara wants to merge 5 commits into
CommunityToolkit:main from
filipnavara:apple-touch-state-machine

Conversation

@filipnavara

@filipnavara filipnavara commented Jul 7, 2024

Copy link
Copy Markdown
Contributor

Description of Change

Apple has an extensive documentation on implementing custom gesture recognizers. For discrete gesture recognizers, like the one implemented in TouchBehavior, you are supposed to communicate the state back as Possible / Failure / Recognized. This affects interaction with other gesture recognizers.

Previously the State was never set and left at the default Possible value (initial value and default after Reset). This causes simultaneous gesture recognizers on parent views to fire even if TouchBehavior recognized the gesture.

As a side effect of fixing the state machine, we no longer need to manually prevent simultaneous touches with ShouldReceiveTouch behavior override and we can revert ShouldRecognizeSimultaneously to its default behavior of returning false.

Linked Issues

PR Checklist

  • Has a linked Issue, and the Issue has been approved(bug) or Championed (feature/proposal)
  • Has tests (if omitted, state reason in description)
  • Has samples (if omitted, state reason in description)
  • Rebased on top of main at time of PR
  • Changes adhere to coding standard
  • Documentation created or updated: https://github.com/MicrosoftDocs/CommunityToolkit/pulls

Additional information

@dotnet-policy-service dotnet-policy-service Bot added stale The author has not responded in over 30 days help wanted This proposal has been approved and is ready to be implemented labels Aug 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

Copilot code review Copilot Awaiting requested review from Copilot Copilot will automatically review once the pull request is marked ready for review

At least 1 approving review is required to merge this pull request.

Assignees

No one assigned

Labels

help wanted This proposal has been approved and is ready to be implemented stale The author has not responded in over 30 days

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

AltStyle によって変換されたページ (->オリジナル) /