Fix reorder gesture

This commit is contained in:
Ali 2020-03-06 18:28:25 +04:00
parent a0cc0131c7
commit 1ddb57c98c
2 changed files with 4 additions and 2 deletions

View File

@ -898,11 +898,13 @@ private final class ReorderingGestureRecognizer: UIGestureRecognizer, UIGestureR
override func touchesEnded(_ touches: Set<UITouch>, with event: UIEvent) {
super.touchesEnded(touches, with: event)
self.delayTimer?.invalidate()
if self.state == .began || self.state == .changed {
self.delayTimer?.invalidate()
self.ended()
self.state = .failed
}
self.state = .failed
}
override func touchesCancelled(_ touches: Set<UITouch>, with event: UIEvent) {