Prechádzať zdrojové kódy

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

Felix Paul Kühne 11 rokov pred
rodič
commit
31205a7666
1 zmenil súbory, kde vykonal 9 pridanie a 7 odobranie
  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];
+        }
     }
 }