lxy 1 gadu atpakaļ
vecāks
revīzija
daf528a1f7

+ 13 - 7
LenzCameraNativeModuleForRN/Classes/inner/PCSBaseViewController/PCSPreviewViewController.m

@@ -52,18 +52,23 @@
     self.imageView.image = model.previewImage;
     if (model.mode == SDK_CAPTURE_MODE_MOVIE) {
         self.videoImageView.hidden = NO;
+        self.imageView.userInteractionEnabled = NO;
     } else {
         self.videoImageView.hidden = YES;
+        self.imageView.userInteractionEnabled = YES;
+
     }
 }
 
 - (void)tapAction {
-    YBIBImageData *data = [YBIBImageData new];
-    data.imagePath = _model.path;
-    YBImageBrowser *browser = [YBImageBrowser new];
-    browser.dataSourceArray = @[data];
-    browser.defaultToolViewHandler.topView.hidden = YES;
-    [browser show];
+    if (_model.mode != SDK_CAPTURE_MODE_MOVIE) {
+        YBIBImageData *data = [YBIBImageData new];
+        data.imagePath = _model.path;
+        YBImageBrowser *browser = [YBImageBrowser new];
+        browser.dataSourceArray = @[data];
+        browser.defaultToolViewHandler.topView.hidden = YES;
+        [browser show];
+    }
 }
 
 - (void)setIsPlayer:(BOOL)isPlayer {
@@ -101,7 +106,6 @@
         _imageView = [[UIImageView alloc]init];
         _imageView.layer.cornerRadius = 8;
         _imageView.layer.masksToBounds = YES;
-//        _imageView.backgroundColor = [UIColor blackColor];
         _imageView.contentMode = UIViewContentModeScaleAspectFit;
         _imageView.userInteractionEnabled = YES;
         UITapGestureRecognizer *tap= [[UITapGestureRecognizer alloc]initWithTarget:self action:@selector(tapAction)];
@@ -115,6 +119,8 @@
         _videoImageView = [[UIImageView alloc]init];
         _videoImageView.image =  [UIImage loadNamed:@"icon_video"];
         _videoImageView.hidden = YES;
+//        UITapGestureRecognizer *tap = [[UITapGestureRecognizer alloc]initWithTarget:self action:@selector(playerAction)];
+//        [_videoImageView addGestureRecognizer:tap];
     }
     return _videoImageView;
 }