Selaa lähdekoodia

MediaCategoryViewController: Set longPressGesture.minimumPressDuration to 0.2

Change default value (0.5) to 0.2 in order to make
reordering trigger feel less erratic.

Closes #674
Edgar Fouillet 5 vuotta sitten
vanhempi
commit
51e5f96195
1 muutettua tiedostoa jossa 1 lisäystä ja 0 poistoa
  1. 1 0
      Sources/MediaCategories/MediaCategoryViewController.swift

+ 1 - 0
Sources/MediaCategories/MediaCategoryViewController.swift

@@ -527,6 +527,7 @@ private extension MediaCategoryViewController {
         collectionView?.backgroundColor = PresentationTheme.current.colors.background
         collectionView?.alwaysBounceVertical = true
         longPressGesture = UILongPressGestureRecognizer(target: self, action: #selector(self.handleLongGesture(gesture:)))
+        longPressGesture.minimumPressDuration = 0.2
         collectionView?.addGestureRecognizer(longPressGesture)
         if #available(iOS 11.0, *) {
             collectionView?.contentInsetAdjustmentBehavior = .always