|
@@ -1195,12 +1195,17 @@
|
|
|
[self.stitchImageView.layer addAnimation:self.loadingAnimation forKey:@"loadingAnimation"];
|
|
|
}
|
|
|
self.flashButton.hidden = isSaveIng;
|
|
|
- self.panoramOrientationGuideView.hidden = isSaveIng;
|
|
|
+ if (self.mode == SDK_CAPTURE_MODE_INTELLEGENCE_PANORAMA) {
|
|
|
+ self.panoramOrientationGuideView.hidden = YES;
|
|
|
+ self.ai_fullView.hidden = YES;
|
|
|
+ } else {
|
|
|
+ self.panoramOrientationGuideView.hidden = isSaveIng;
|
|
|
+ self.ai_fullView.hidden = isSaveIng;
|
|
|
+ }
|
|
|
self.panoramaGuideView.hidden = isSaveIng;
|
|
|
self.modeList.hidden = isSaveIng;
|
|
|
self.savePhotoButton.hidden = isSaveIng;
|
|
|
self.takePhotoButton.hidden = isSaveIng;
|
|
|
- self.ai_fullView.hidden = isSaveIng;
|
|
|
// self.switchButton.hidden = isSaveIng;
|
|
|
self.discardPhotoButton.hidden = isSaveIng;
|
|
|
self.backButton.hidden = !isSaveIng;
|
|
@@ -1432,7 +1437,7 @@
|
|
|
break;
|
|
|
case SDK_CAPTURE_MODE_INTELLEGENCE_PANORAMA: {
|
|
|
self.switchButton.hidden = YES;
|
|
|
- self.panoramaGuideView.hidden = YES;
|
|
|
+ self.panoramaGuideView.hidden = NO;
|
|
|
self.panoramOrientationGuideView.hidden = YES;
|
|
|
self.previewLayer.frame = self.view.layer.bounds;
|
|
|
}
|
|
@@ -1706,6 +1711,29 @@
|
|
|
});
|
|
|
}
|
|
|
if(![self.currentOperationNode respondsToSelector:@selector(enable)] || self.currentOperationNode.enable){
|
|
|
+
|
|
|
+ if (self.mode == SDK_CAPTURE_MODE_INTELLEGENCE_PANORAMA) {
|
|
|
+// [LenStitcher videoResetPath];
|
|
|
+// LenzResourceItemModel *itemModel = [[LenzResourceItemModel alloc]init];
|
|
|
+// [self.resourceModel.aiPanoramArray addObject:itemModel];
|
|
|
+
|
|
|
+ OperationNodeAIPanorama *aiPan = nil;
|
|
|
+ if ([self.currentOperationNode isKindOfClass:[OperationNodeAIPanorama class]]) {
|
|
|
+ aiPan = self.currentOperationNode;
|
|
|
+ if (!aiPan.isRecording) {
|
|
|
+ aiPan.AIType = OperationAITypeTap;
|
|
|
+ }
|
|
|
+ }
|
|
|
+// [self startMotion];
|
|
|
+// if (self.isVideoStitchStopedWhenRecording) {
|
|
|
+//
|
|
|
+//
|
|
|
+//
|
|
|
+// return;
|
|
|
+// }
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
[self.currentOperationNode takePhotoButtonTouched];
|
|
|
|
|
|
if (self.mode == SDK_CAPTURE_MODE_PANORAMA && !self.isVideoStitchStopedWhenRecording) {
|
|
@@ -1716,37 +1744,33 @@
|
|
|
|
|
|
// self.videoStitchSemaphore = dispatch_semaphore_create(1);
|
|
|
}
|
|
|
- if (self.mode == SDK_CAPTURE_MODE_INTELLEGENCE_PANORAMA && !self.isVideoStitchStopedWhenRecording) {
|
|
|
- [LenStitcher videoResetPath];
|
|
|
- LenzResourceItemModel *itemModel = [[LenzResourceItemModel alloc]init];
|
|
|
- [self.resourceModel.panoramArray addObject:itemModel];
|
|
|
-
|
|
|
- OperationNodeAIPanorama *aiPan = nil;
|
|
|
- if ([self.currentOperationNode isKindOfClass:[OperationNodeAIPanorama class]]) {
|
|
|
- aiPan = self.currentOperationNode;
|
|
|
- aiPan.AIType = OperationAITypeTap;
|
|
|
- }
|
|
|
- [self startMotion];
|
|
|
-
|
|
|
- }
|
|
|
+// if (self.mode == SDK_CAPTURE_MODE_INTELLEGENCE_PANORAMA) {
|
|
|
+//
|
|
|
+// OperationNodeAIPanorama *aiPan = nil;
|
|
|
+// if ([self.currentOperationNode isKindOfClass:[OperationNodeAIPanorama class]]) {
|
|
|
+// aiPan = self.currentOperationNode;
|
|
|
+// aiPan.AIType = OperationAITypeTap;
|
|
|
+// }
|
|
|
+//
|
|
|
+// }
|
|
|
}
|
|
|
|
|
|
}
|
|
|
- (void)longPressGes:(UILongPressGestureRecognizer *)ges {
|
|
|
switch (ges.state) {
|
|
|
case UIGestureRecognizerStateBegan:
|
|
|
-
|
|
|
- break;
|
|
|
- case UIGestureRecognizerStateEnded: {
|
|
|
+ {
|
|
|
if (self.mode == SDK_CAPTURE_MODE_INTELLEGENCE_PANORAMA) {
|
|
|
|
|
|
OperationNodeAIPanorama *aiPan = nil;
|
|
|
if ([self.currentOperationNode isKindOfClass:[OperationNodeAIPanorama class]]) {
|
|
|
- [LenStitcher videoResetPath];
|
|
|
// self.videoStitchSemaphore = dispatch_semaphore_create(1);
|
|
|
-
|
|
|
+ [LenStitcher videoResetPath];
|
|
|
+ LenzResourceItemModel *itemModel = [[LenzResourceItemModel alloc]init];
|
|
|
+ [self.resourceModel.aiPanoramArray addObject:itemModel];
|
|
|
+ [self startMotion];
|
|
|
aiPan = self.currentOperationNode;
|
|
|
- self.touchTime = 0;
|
|
|
+// self.touchTime = 0;
|
|
|
aiPan.AIType = OperationAITypeLongPress;
|
|
|
[self.currentOperationNode takePhotoButtonTouched];
|
|
|
}
|
|
@@ -1754,11 +1778,13 @@
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ break;
|
|
|
+ case UIGestureRecognizerStateEnded:
|
|
|
+
|
|
|
break;
|
|
|
default:
|
|
|
break;
|
|
|
}
|
|
|
- NSLog(@"111");
|
|
|
}
|
|
|
- (void)takePhotoButtonTouchDownInside:(id)sender{
|
|
|
|
|
@@ -1797,8 +1823,9 @@
|
|
|
|
|
|
[alertController dismissViewControllerAnimated:NO completion:^{}];
|
|
|
} rightButtonCallBack:^(QuitMultipleModeAlertViewController * _Nonnull alertController) {
|
|
|
+ [self updateViewStatusWhenStitchSave:NO];
|
|
|
[alertController dismissViewControllerAnimated:NO completion:^{
|
|
|
- [self dismissViewControllerAnimated:YES completion:^{}];
|
|
|
+// [self dismissViewControllerAnimated:YES completion:^{}];
|
|
|
}];
|
|
|
}];
|
|
|
} else {
|
|
@@ -1993,9 +2020,10 @@
|
|
|
{
|
|
|
if (self.resourceModel.aiPanoramArray.count > 0) {
|
|
|
self.numberOfImagesLabel.hidden = NO;
|
|
|
- self.numberOfImagesLabel.text = [NSString stringWithFormat:@"已拼接%ld张", self.resourceModel.aiPanoramArray.count];
|
|
|
+ self.numberOfImagesLabel.text = [NSString stringWithFormat:@"已拍摄%ld张", self.resourceModel.aiPanoramArray.count];
|
|
|
} else {
|
|
|
- self.numberOfImagesLabel.hidden = YES;
|
|
|
+ self.numberOfImagesLabel.text = @"单击拍摄,长按拼接";
|
|
|
+ self.numberOfImagesLabel.hidden = NO;
|
|
|
}
|
|
|
}
|
|
|
break;
|
|
@@ -2453,6 +2481,7 @@
|
|
|
}];
|
|
|
self.resourceModel.aiPanoramArray = array;
|
|
|
}
|
|
|
+ [self updateViewStatus];
|
|
|
[self.stitchkLock unlock];
|
|
|
return;
|
|
|
}
|
|
@@ -2464,11 +2493,11 @@
|
|
|
}
|
|
|
|
|
|
self.isVideoStitchStopedWhenRecording = NO;
|
|
|
- base.isRecording = NO;
|
|
|
-
|
|
|
+// base.isRecording = NO;
|
|
|
dispatch_async(dispatch_get_main_queue(), ^{
|
|
|
+ [base takePhotoButtonTouched];
|
|
|
[self stopMotion];
|
|
|
-// [self takePhotoButtonTouchUpInside:[NSObject new]];
|
|
|
+ [self takePhotoButtonTouchUpInside:[NSObject new]];
|
|
|
[self removeLastStich];
|
|
|
[self updateViewStatusWhenStitchFail];
|
|
|
[self.panoramaGuideView clearImage];
|