|
@@ -52,18 +52,23 @@
|
|
self.imageView.image = model.previewImage;
|
|
self.imageView.image = model.previewImage;
|
|
if (model.mode == SDK_CAPTURE_MODE_MOVIE) {
|
|
if (model.mode == SDK_CAPTURE_MODE_MOVIE) {
|
|
self.videoImageView.hidden = NO;
|
|
self.videoImageView.hidden = NO;
|
|
|
|
+ self.imageView.userInteractionEnabled = NO;
|
|
} else {
|
|
} else {
|
|
self.videoImageView.hidden = YES;
|
|
self.videoImageView.hidden = YES;
|
|
|
|
+ self.imageView.userInteractionEnabled = YES;
|
|
|
|
+
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
- (void)tapAction {
|
|
- (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 {
|
|
- (void)setIsPlayer:(BOOL)isPlayer {
|
|
@@ -101,7 +106,6 @@
|
|
_imageView = [[UIImageView alloc]init];
|
|
_imageView = [[UIImageView alloc]init];
|
|
_imageView.layer.cornerRadius = 8;
|
|
_imageView.layer.cornerRadius = 8;
|
|
_imageView.layer.masksToBounds = YES;
|
|
_imageView.layer.masksToBounds = YES;
|
|
-// _imageView.backgroundColor = [UIColor blackColor];
|
|
|
|
_imageView.contentMode = UIViewContentModeScaleAspectFit;
|
|
_imageView.contentMode = UIViewContentModeScaleAspectFit;
|
|
_imageView.userInteractionEnabled = YES;
|
|
_imageView.userInteractionEnabled = YES;
|
|
UITapGestureRecognizer *tap= [[UITapGestureRecognizer alloc]initWithTarget:self action:@selector(tapAction)];
|
|
UITapGestureRecognizer *tap= [[UITapGestureRecognizer alloc]initWithTarget:self action:@selector(tapAction)];
|
|
@@ -115,6 +119,8 @@
|
|
_videoImageView = [[UIImageView alloc]init];
|
|
_videoImageView = [[UIImageView alloc]init];
|
|
_videoImageView.image = [UIImage loadNamed:@"icon_video"];
|
|
_videoImageView.image = [UIImage loadNamed:@"icon_video"];
|
|
_videoImageView.hidden = YES;
|
|
_videoImageView.hidden = YES;
|
|
|
|
+// UITapGestureRecognizer *tap = [[UITapGestureRecognizer alloc]initWithTarget:self action:@selector(playerAction)];
|
|
|
|
+// [_videoImageView addGestureRecognizer:tap];
|
|
}
|
|
}
|
|
return _videoImageView;
|
|
return _videoImageView;
|
|
}
|
|
}
|