浏览代码

playlist table cell: don't add long touch zooming gesture on iOS 6

Felix Paul Kühne 11 年之前
父节点
当前提交
31205a7666
共有 1 个文件被更改,包括 9 次插入7 次删除
  1. 9 7
      Sources/VLCPlaylistTableViewCell.m

+ 9 - 7
Sources/VLCPlaylistTableViewCell.m

@@ -102,13 +102,15 @@
     [super setEditing:editing animated:animated];
     [self _updatedDisplayedInformationForKeyPath:@"editing"];
 
-    if (editing) {
-        if (_longPress)
-            [self removeGestureRecognizer:_longPress];
-    } else {
-        if (!_longPress)
-            _longPress = [[UILongPressGestureRecognizer alloc] initWithTarget:self action:@selector(longTouchGestureAction:)];
-        [self addGestureRecognizer:_longPress];
+    if (SYSTEM_RUNS_IOS7_OR_LATER) {
+        if (editing) {
+            if (_longPress)
+                [self removeGestureRecognizer:_longPress];
+        } else {
+            if (!_longPress)
+                _longPress = [[UILongPressGestureRecognizer alloc] initWithTarget:self action:@selector(longTouchGestureAction:)];
+            [self addGestureRecognizer:_longPress];
+        }
     }
 }