소스 검색

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
 {
-    [self setEditing:YES animated:YES];
+    if (sender.state == UIGestureRecognizerStateBegan && !self.isEditing)
+        [self setEditing:YES animated:YES];
 }
 
 #pragma mark - UI implementation