From 2386f545e22312b89f3582be9079dc3b5921af5b Mon Sep 17 00:00:00 2001 From: Shadowfacts Date: Sun, 31 Mar 2024 15:44:15 -0400 Subject: [PATCH] Fix gallery button delay on Catalyst/Designed for iPad --- .../GalleryVC/Sources/GalleryVC/GalleryItemViewController.swift | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Packages/GalleryVC/Sources/GalleryVC/GalleryItemViewController.swift b/Packages/GalleryVC/Sources/GalleryVC/GalleryItemViewController.swift index 22ae5472f7..c28f14336d 100644 --- a/Packages/GalleryVC/Sources/GalleryVC/GalleryItemViewController.swift +++ b/Packages/GalleryVC/Sources/GalleryVC/GalleryItemViewController.swift @@ -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)