浏览代码

iOS: Fix long press gesture continuous call to editmode

Signed-off-by: Jean-Baptiste Kempf <jb@videolan.org>
Soomin Lee 8 年之前
父节点
当前提交
7e4ae0fa4c
共有 1 个文件被更改,包括 2 次插入1 次删除
  1. 2 1
      Sources/VLCLibraryViewController.m

+ 2 - 1
Sources/VLCLibraryViewController.m

@@ -1215,7 +1215,8 @@ static NSString *kUsingTableViewToShowData = @"UsingTableViewToShowData";
 
 
 - (void)_collectionViewHandleLongPressGesture:(UIGestureRecognizer *) sender
 - (void)_collectionViewHandleLongPressGesture:(UIGestureRecognizer *) sender
 {
 {
-    [self setEditing:YES animated:YES];
+    if (sender.state == UIGestureRecognizerStateBegan && !self.isEditing)
+        [self setEditing:YES animated:YES];
 }
 }
 
 
 #pragma mark - UI implementation
 #pragma mark - UI implementation