Fix gallery button delay on Catalyst/Designed for iPad

This commit is contained in:
Shadowfacts 2024-03-31 15:44:15 -04:00
parent 908c4ee085
commit 2386f545e2
1 changed files with 2 additions and 0 deletions

View File

@ -198,6 +198,8 @@ class GalleryItemViewController: UIViewController {
doubleTap = UITapGestureRecognizer(target: self, action: #selector(viewDoublePressed))
doubleTap.delegate = self
doubleTap.numberOfTapsRequired = 2
// This is needed to prevent a delay between tapping a button on and the action firing on Catalyst and Designed for iPad
doubleTap.delaysTouchesEnded = false
// this requirement is needed to make sure the double tap is ever recognized
singleTap.require(toFail: doubleTap)
view.addGestureRecognizer(singleTap)