瀏覽代碼

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 年之前
父節點
當前提交
51e5f96195
共有 1 個文件被更改,包括 1 次插入0 次删除
  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