flowkey / UIKit-cross-platform

Cross-platform Swift implementation of UIKit, mostly for Android
MIT License
594 stars 40 forks source link

Fix GestureRecognizers not filtering `touchesEnded` events properly #305

Closed janek closed 4 years ago

janek commented 4 years ago

Type of change: Bug fix

Motivation (current vs expected behavior)

When a user drags around a view with an active UIGestureRecognizer, that recognizer should cancel the touches sent to this view by default (and let them pass if cancelsTouchesInView was explicitly set to false).

This PR improves the handling of UITouch's internal hasBeenCancelledByAGestureRecognizer variable to ensure that happens.

Please check if the PR fulfills these requirements

codecov[bot] commented 4 years ago

Codecov Report

Merging #305 into master will not change coverage. The diff coverage is 100%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #305   +/-   ##
=======================================
  Coverage   51.97%   51.97%           
=======================================
  Files          87       87           
  Lines        3161     3161           
=======================================
  Hits         1643     1643           
  Misses       1518     1518
Impacted Files Coverage Δ
Sources/UITouch.swift 100% <ø> (ø) :arrow_up:
Sources/UIWindow.swift 71.05% <ø> (-0.75%) :arrow_down:
Sources/UIGestureRecognizer.swift 88.57% <100%> (+0.33%) :arrow_up:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 2bb5fc3...f50e5e8. Read the comment docs.