Browse Source

需求2.0

lxy 1 year ago
parent
commit
5b1ae2fd4f

+ 2 - 2
Example/LenzCameraNativeModuleForRN/LENZViewController.m

@@ -100,8 +100,8 @@
     NSMutableDictionary *dict = [NSMutableDictionary dictionary];
     dict[@"dataRetainedMode"] = @"retain";
     NSArray *array = @[
-    @{@"flashMode": @"auto", @"isRemake":@(0),@"mode":@"continuous", @"quality":@(100),@"type":@"back"  },
-    @{@"flashMode": @"auto", @"isRemake":@(0),@"mode":@"single", @"quality":@(100),@"type":@"back"  },
+//    @{@"flashMode": @"auto", @"isRemake":@(0),@"mode":@"continuous", @"quality":@(100),@"type":@"back"  },
+//    @{@"flashMode": @"auto", @"isRemake":@(0),@"mode":@"single", @"quality":@(100),@"type":@"back"  },
     @{@"flashMode": @"auto", @"isRemake":@(1),@"mode":@"video", @"quality":@(100),@"type":@"back", @"videoQuality":@(480)},
     @{@"flashMode": @"auto", @"isRemake":@(1),@"mode":@"panorama", @"quality":@(100),@"type":@"back", @"videoQuality":@(1080)},
     @{@"flashMode": @"auto", @"isRemake":@(1),@"mode":@"panoramaPlus", @"quality":@(100),@"type":@"back", @"videoQuality":@(480)}

+ 17 - 45
Example/Pods/Pods.xcodeproj/project.pbxproj

@@ -15,6 +15,7 @@
 			dependencies = (
 			);
 			name = TensorFlowLite;
+			productName = TensorFlowLite;
 		};
 		C5B80886873124CEC429CA0591705280 /* OpenCV2 */ = {
 			isa = PBXAggregateTarget;
@@ -24,6 +25,7 @@
 			dependencies = (
 			);
 			name = OpenCV2;
+			productName = OpenCV2;
 		};
 /* End PBXAggregateTarget section */
 
@@ -61,6 +63,8 @@
 		27FB6D5E61CEEF9662F22FEE4A3B4BE5 /* VC.storyboard in Sources */ = {isa = PBXBuildFile; fileRef = 52BB4930B3A773F6833C87F4E518D1CB /* VC.storyboard */; };
 		280438A07252996B505A49E128B8C1D9 /* OperationNodePanorama.m in Sources */ = {isa = PBXBuildFile; fileRef = CC1E8A339EEB246A8A4B279954316526 /* OperationNodePanorama.m */; };
 		285E5A17EE462D4A1A85C685FDAB4C93 /* LenzDataManager.m in Sources */ = {isa = PBXBuildFile; fileRef = D785BBEA22031EFDAFA81BFFB1F4AF9E /* LenzDataManager.m */; };
+		290E68592A0DC72B0012A1FE /* PCSDeviceOrientationManager.h in Headers */ = {isa = PBXBuildFile; fileRef = 290E68572A0DC72B0012A1FE /* PCSDeviceOrientationManager.h */; };
+		290E685A2A0DC72B0012A1FE /* PCSDeviceOrientationManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 290E68582A0DC72B0012A1FE /* PCSDeviceOrientationManager.m */; };
 		2C267418FF64CF535B50A41839BF3B7C /* SVRadialGradientLayer.m in Sources */ = {isa = PBXBuildFile; fileRef = DF49707D0225F15883F4B82A11B0581D /* SVRadialGradientLayer.m */; };
 		2C813C52CD7844028859DFA9BF21F8BF /* OperationNodeMovie.m in Sources */ = {isa = PBXBuildFile; fileRef = 61BFBD445E4773577F009B98A0C9F00E /* OperationNodeMovie.m */; };
 		2CB5F2C4AF5D8B06C8B58A4D9E2B5CB4 /* YYTextParser.m in Sources */ = {isa = PBXBuildFile; fileRef = FFF6810117FEEF2711F6E9B5437B1204 /* YYTextParser.m */; };
@@ -94,7 +98,6 @@
 		50567A917EA0A48D6F9DF7F98BDD0A47 /* QuitMultipleModeAlertViewController.h in Headers */ = {isa = PBXBuildFile; fileRef = 6C92C83A8B9B067C252530E3C9CF4ED4 /* QuitMultipleModeAlertViewController.h */; settings = {ATTRIBUTES = (Project, ); }; };
 		5074624ED734885134212D8E86DF7978 /* UIView+JKAdd.h in Headers */ = {isa = PBXBuildFile; fileRef = 6A8E430D8C35488AC558374EE4BA1474 /* UIView+JKAdd.h */; settings = {ATTRIBUTES = (Project, ); }; };
 		50AA7506D7AEF6916DE9E346B070D49E /* YYTextContainerView.m in Sources */ = {isa = PBXBuildFile; fileRef = B556EF7B503F64AD5CEC85E2A13C5007 /* YYTextContainerView.m */; };
-		50D2E0DCD17C9A17AB8A1CF65FF5A70B /* PCSSessionWrapper.h in Headers */ = {isa = PBXBuildFile; fileRef = 4E1905F2890898F5477C5019D7DFD454 /* PCSSessionWrapper.h */; settings = {ATTRIBUTES = (Project, ); }; };
 		51655225AD2B10D7D9FA62FDF67268FB /* UIView+YYText.m in Sources */ = {isa = PBXBuildFile; fileRef = 46E835F262CEBF51D5A0A8E520A1C160 /* UIView+YYText.m */; };
 		566A0BD4D87F4167E16C6C6F552A265B /* QuitMultipleModeAlertViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = C2115105D1E5CAEB68E18DD1273FDC3B /* QuitMultipleModeAlertViewController.m */; };
 		56999FB9D57B1CDF220628D3EF230266 /* YYTextLayout.m in Sources */ = {isa = PBXBuildFile; fileRef = 58A56A8842D5A1FEE1A038D18A8C697A /* YYTextLayout.m */; };
@@ -102,7 +105,6 @@
 		5A01C67D8035538914014C27435949FB /* YYTextMagnifier.m in Sources */ = {isa = PBXBuildFile; fileRef = 798329F7930D5E2D0BAF2A4392ECD383 /* YYTextMagnifier.m */; };
 		5C65312243C01C32249E9EF470D3F576 /* PCSTools.m in Sources */ = {isa = PBXBuildFile; fileRef = 0B9F19843D637C93ED4EBCB461D9D66C /* PCSTools.m */; };
 		5DE003B558DD544DEB2DF108B45540B2 /* PhotoListCellModel.h in Headers */ = {isa = PBXBuildFile; fileRef = 8EA39441D89E3C66B56878E98C94C01D /* PhotoListCellModel.h */; settings = {ATTRIBUTES = (Project, ); }; };
-		609B2534A1D55B97140F82334EAAF074 /* PCSSessionWrapper.m in Sources */ = {isa = PBXBuildFile; fileRef = CB54B514636CC00FD3A2B6DA70EA4A19 /* PCSSessionWrapper.m */; };
 		61B755544F3CF8C98AD23BE26FDFD640 /* OperationNodeMultiple.m in Sources */ = {isa = PBXBuildFile; fileRef = 94EE88B7988390139D81189286DCED7A /* OperationNodeMultiple.m */; };
 		6657624793EFD42547A5DD697DF45621 /* NSArray+MASAdditions.m in Sources */ = {isa = PBXBuildFile; fileRef = 5582002E4734B8D4F2CF285ACDADD796 /* NSArray+MASAdditions.m */; };
 		67494A117D518450878B615352E646E6 /* PCSSDF-prefix-header.h in Headers */ = {isa = PBXBuildFile; fileRef = 4AD57B242CFB55F585BD5596FC7ABD87 /* PCSSDF-prefix-header.h */; settings = {ATTRIBUTES = (Project, ); }; };
@@ -402,6 +404,8 @@
 		270894F48E0EFD20CBE625C4C518C545 /* PCSButton.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = PCSButton.m; sourceTree = "<group>"; };
 		28ECFDA64C4A2EC421FAF5FC2BA27142 /* autocalib.hpp */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.cpp.h; name = autocalib.hpp; path = opencv2.framework/Versions/A/Headers/stitching/detail/autocalib.hpp; sourceTree = "<group>"; };
 		28F972AC7A75FA6A834F1398B95B240A /* logger.defines.hpp */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.cpp.h; name = logger.defines.hpp; path = opencv2.framework/Versions/A/Headers/core/utils/logger.defines.hpp; sourceTree = "<group>"; };
+		290E68572A0DC72B0012A1FE /* PCSDeviceOrientationManager.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = PCSDeviceOrientationManager.h; sourceTree = "<group>"; };
+		290E68582A0DC72B0012A1FE /* PCSDeviceOrientationManager.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = PCSDeviceOrientationManager.m; sourceTree = "<group>"; };
 		295D21E3A53E31CD670E1455FF043490 /* ImageCacheLRU.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = ImageCacheLRU.m; sourceTree = "<group>"; };
 		29B829673F9D5AB2BD30E5304DB7EEA6 /* miniflann.hpp */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.cpp.h; name = miniflann.hpp; path = opencv2.framework/Versions/A/Headers/flann/miniflann.hpp; sourceTree = "<group>"; };
 		2A3C694AF3328B029D5744E8AD11D789 /* QuitMultipleModeAlertViewController.xib */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = file.xib; path = QuitMultipleModeAlertViewController.xib; sourceTree = "<group>"; };
@@ -419,7 +423,7 @@
 		2E7E70EE65C8B436ADCE623518B16FE6 /* Masonry.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = Masonry.h; path = Masonry/Masonry.h; sourceTree = "<group>"; };
 		2ECA98A2345101089E1662579080E586 /* operators.hpp */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.cpp.h; name = operators.hpp; path = opencv2.framework/Versions/A/Headers/gapi/operators.hpp; sourceTree = "<group>"; };
 		2ED480DA74C09C19BD2DC140F029FFAF /* version.hpp */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.cpp.h; name = version.hpp; path = opencv2.framework/Versions/A/Headers/core/version.hpp; sourceTree = "<group>"; };
-		31A8E6611A0E3EDAE295AE10D3954A13 /* LenzSDK.podspec */ = {isa = PBXFileReference; explicitFileType = text.script.ruby; includeInIndex = 1; indentWidth = 2; lastKnownFileType = text; path = LenzSDK.podspec; sourceTree = "<group>"; tabWidth = 2; xcLanguageSpecificationIdentifier = xcode.lang.ruby; };
+		31A8E6611A0E3EDAE295AE10D3954A13 /* LenzSDK.podspec */ = {isa = PBXFileReference; explicitFileType = text.script.ruby; includeInIndex = 1; indentWidth = 2; path = LenzSDK.podspec; sourceTree = "<group>"; tabWidth = 2; xcLanguageSpecificationIdentifier = xcode.lang.ruby; };
 		3212932ADFECD0AA6DDCCE1AC7015693 /* NSAttributedString+YYText.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = "NSAttributedString+YYText.m"; path = "YYText/Utility/NSAttributedString+YYText.m"; sourceTree = "<group>"; };
 		321F26B9FE4C35D5697DD119365010EB /* PCSAutherView.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = PCSAutherView.h; sourceTree = "<group>"; };
 		323E11B6F2B40B2A30076A06EFA4ADE9 /* MASConstraintMaker.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = MASConstraintMaker.h; path = Masonry/MASConstraintMaker.h; sourceTree = "<group>"; };
@@ -476,7 +480,7 @@
 		48282D0FCEB41CD6BE0B733B9E3276F2 /* YYTextAsyncLayer.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = YYTextAsyncLayer.h; path = YYText/Utility/YYTextAsyncLayer.h; sourceTree = "<group>"; };
 		48C54F1C97D437C71404C5679FD34D98 /* LenzSDK-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "LenzSDK-dummy.m"; sourceTree = "<group>"; };
 		48FE8ED54770D374D2F85AF0995815B4 /* color_detail.hpp */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.cpp.h; name = color_detail.hpp; path = opencv2.framework/Versions/A/Headers/core/cuda/detail/color_detail.hpp; sourceTree = "<group>"; };
-		492ADF58A3C187F270A845FE2446FD93 /* moire_mobilenetv2_79.tflite */ = {isa = PBXFileReference; includeInIndex = 1; path = moire_mobilenetv2_79.tflite; sourceTree = "<group>"; };
+		492ADF58A3C187F270A845FE2446FD93 /* moire_mobilenetv2_79.tflite */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = file; path = moire_mobilenetv2_79.tflite; sourceTree = "<group>"; };
 		49440A3483B1BDF65FF91971D889E7DE /* filesystem.hpp */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.cpp.h; name = filesystem.hpp; path = opencv2.framework/Versions/A/Headers/core/utils/filesystem.hpp; sourceTree = "<group>"; };
 		4ACC936729FB445B6079C9113BFB0915 /* SVProgressHUD-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "SVProgressHUD-dummy.m"; sourceTree = "<group>"; };
 		4AD57B242CFB55F585BD5596FC7ABD87 /* PCSSDF-prefix-header.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "PCSSDF-prefix-header.h"; path = "LenzCameraNativeModuleForRN/Classes/PCSSDF-prefix-header.h"; sourceTree = "<group>"; };
@@ -487,7 +491,6 @@
 		4C988D03DBBEF4A7C669CD67B41B6E17 /* MovieListCellModel.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = MovieListCellModel.h; sourceTree = "<group>"; };
 		4CCE262AAF8560D058C87F8ED4C393EE /* async_promise.hpp */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.cpp.h; name = async_promise.hpp; path = opencv2.framework/Versions/A/Headers/core/detail/async_promise.hpp; sourceTree = "<group>"; };
 		4DAC96EA958C80B473A50698F178D1EF /* Pods-LenzCameraNativeModuleForRN_Example-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "Pods-LenzCameraNativeModuleForRN_Example-dummy.m"; sourceTree = "<group>"; };
-		4E1905F2890898F5477C5019D7DFD454 /* PCSSessionWrapper.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = PCSSessionWrapper.h; sourceTree = "<group>"; };
 		4E4772D9ED8D1C541CAAE9F38D5D1F4C /* MovieListViewController.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = MovieListViewController.h; sourceTree = "<group>"; };
 		4ED6F71CA8E3F8CF21B9C2771949FFD2 /* PhotoListViewController.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = PhotoListViewController.m; sourceTree = "<group>"; };
 		4F7139EF51E2179A638847803A3F5362 /* va_intel.hpp */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.cpp.h; name = va_intel.hpp; path = opencv2.framework/Versions/A/Headers/core/va_intel.hpp; sourceTree = "<group>"; };
@@ -642,7 +645,7 @@
 		9CB0CB14031C9B76B03091D5BBF88BC2 /* LenzSDKConstant.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = LenzSDKConstant.h; sourceTree = "<group>"; };
 		9CFC1E8A4E3A321EE1F437991322D520 /* opencl_info.hpp */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.cpp.h; name = opencl_info.hpp; path = opencv2.framework/Versions/A/Headers/core/opencl/opencl_info.hpp; sourceTree = "<group>"; };
 		9D93C2C6B8FFB9FD7E2B99FC0F170A8E /* LenzStitchSDK.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = LenzStitchSDK.framework; sourceTree = "<group>"; };
-		9D940727FF8FB9C785EB98E56350EF41 /* Podfile */ = {isa = PBXFileReference; explicitFileType = text.script.ruby; includeInIndex = 1; indentWidth = 2; lastKnownFileType = text; name = Podfile; path = ../Podfile; sourceTree = SOURCE_ROOT; tabWidth = 2; xcLanguageSpecificationIdentifier = xcode.lang.ruby; };
+		9D940727FF8FB9C785EB98E56350EF41 /* Podfile */ = {isa = PBXFileReference; explicitFileType = text.script.ruby; includeInIndex = 1; indentWidth = 2; name = Podfile; path = ../Podfile; sourceTree = SOURCE_ROOT; tabWidth = 2; xcLanguageSpecificationIdentifier = xcode.lang.ruby; };
 		9E71193FBE9AF461922EBB18D9FEECD9 /* gmat.hpp */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.cpp.h; name = gmat.hpp; path = opencv2.framework/Versions/A/Headers/gapi/gmat.hpp; sourceTree = "<group>"; };
 		9EFE421426409088E0EB26625771165B /* defines.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = defines.h; path = opencv2.framework/Versions/A/Headers/flann/defines.h; sourceTree = "<group>"; };
 		9F27C16288C79B3F70E10E117CC75C19 /* intrin_neon.hpp */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.cpp.h; name = intrin_neon.hpp; path = opencv2.framework/Versions/A/Headers/core/hal/intrin_neon.hpp; sourceTree = "<group>"; };
@@ -730,7 +733,6 @@
 		CB2A62C8153944112A66474C51452439 /* imgcodecs.hpp */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.cpp.h; name = imgcodecs.hpp; path = opencv2.framework/Versions/A/Headers/imgcodecs/imgcodecs.hpp; sourceTree = "<group>"; };
 		CB2EE50749970B2B9265477CC624EAB9 /* Pods-LenzCameraNativeModuleForRN_Example.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-LenzCameraNativeModuleForRN_Example.debug.xcconfig"; sourceTree = "<group>"; };
 		CB482258EAA5F2B676C2CF1214CCA699 /* saturate.hpp */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.cpp.h; name = saturate.hpp; path = opencv2.framework/Versions/A/Headers/core/saturate.hpp; sourceTree = "<group>"; };
-		CB54B514636CC00FD3A2B6DA70EA4A19 /* PCSSessionWrapper.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = PCSSessionWrapper.m; sourceTree = "<group>"; };
 		CBA4B3D16CA92D4444B7E3A6B8017B1E /* sse_utils.hpp */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.cpp.h; name = sse_utils.hpp; path = opencv2.framework/Versions/A/Headers/core/sse_utils.hpp; sourceTree = "<group>"; };
 		CBB4B5116A4FF8B9FE4CFA95D75CF6DE /* opencl_core.hpp */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.cpp.h; name = opencl_core.hpp; path = opencv2.framework/Versions/A/Headers/core/opencl/runtime/opencl_core.hpp; sourceTree = "<group>"; };
 		CC1E8A339EEB246A8A4B279954316526 /* OperationNodePanorama.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = OperationNodePanorama.m; sourceTree = "<group>"; };
@@ -910,7 +912,6 @@
 				C66FEEEB5C9AB8BA4D84C055B0A72D47 /* VerticalButton.h */,
 				A61E40B4EC8B12E481DF288A8056A416 /* VerticalButton.m */,
 			);
-			name = Button;
 			path = Button;
 			sourceTree = "<group>";
 		};
@@ -920,7 +921,6 @@
 				790E702C63C46563EC782E05661FC13B /* LenzCachedResourceModel.h */,
 				FB7F504F8A524512D202DA7F25483C6C /* LenzCachedResourceModel.m */,
 			);
-			name = DBModels;
 			path = DBModels;
 			sourceTree = "<group>";
 		};
@@ -978,7 +978,6 @@
 				F0091361036E037214A58062DD16AFF7 /* YYTextWeakProxy.m */,
 				8F47308E62B7B139E1B38ED2DFBA8AD6 /* Support Files */,
 			);
-			name = YYText;
 			path = YYText;
 			sourceTree = "<group>";
 		};
@@ -1000,7 +999,6 @@
 				CF80620DC46E1071703B82C65C4F8691 /* UIImage+ext.h */,
 				65DA86D1D31C68B1C53FA936955FD971 /* UIImage+ext.m */,
 			);
-			name = Exts;
 			path = Exts;
 			sourceTree = "<group>";
 		};
@@ -1013,7 +1011,6 @@
 				C2115105D1E5CAEB68E18DD1273FDC3B /* QuitMultipleModeAlertViewController.m */,
 				2A3C694AF3328B029D5744E8AD11D789 /* QuitMultipleModeAlertViewController.xib */,
 			);
-			name = Alert;
 			path = Alert;
 			sourceTree = "<group>";
 		};
@@ -1023,7 +1020,6 @@
 				65824B0596404B72CF94D81BDEF094BF /* UIColor+JKAdd.h */,
 				CC22AD979B43CF8299D53467D031F41B /* UIColor+JKAdd.m */,
 			);
-			name = color;
 			path = color;
 			sourceTree = "<group>";
 		};
@@ -1050,7 +1046,6 @@
 				8EA39441D89E3C66B56878E98C94C01D /* PhotoListCellModel.h */,
 				8AD3E1CA688A587B432DA2756E0A3EFF /* PhotoListCellModel.m */,
 			);
-			name = Cell;
 			path = Cell;
 			sourceTree = "<group>";
 		};
@@ -1063,7 +1058,6 @@
 				C68370FBDFD7E1E2D62446A5A107EEE4 /* PCSPreviewViewController.m */,
 				938A119FE066FC2C0EE909E618058B24 /* GestureHandler */,
 			);
-			name = PCSBaseViewController;
 			path = PCSBaseViewController;
 			sourceTree = "<group>";
 		};
@@ -1081,7 +1075,6 @@
 				A8CAE5AEA0F4BC141EF8BF5692057E13 /* Resources */,
 				578582C15A1258A86F99A3E149B47BC0 /* Support Files */,
 			);
-			name = SVProgressHUD;
 			path = SVProgressHUD;
 			sourceTree = "<group>";
 		};
@@ -1110,7 +1103,6 @@
 				CAB30AB909BF7A2AD291C417675CB9EB /* Transition */,
 				C42023FCFE81BFC742AC9E9701D2A6AB /* UIView+tool */,
 			);
-			name = UI;
 			path = UI;
 			sourceTree = "<group>";
 		};
@@ -1132,7 +1124,6 @@
 				78CA6FD07D5923CCDAB3C2A758EF5AE7 /* PCSModeList.h */,
 				BCD73FA80170708A746797CA594F6B28 /* PCSModeList.m */,
 			);
-			name = ModeListView;
 			path = ModeListView;
 			sourceTree = "<group>";
 		};
@@ -1157,7 +1148,6 @@
 				C070A2948DBF6ACF51ABB9A525AC0C17 /* ImageCacheLRU.h */,
 				295D21E3A53E31CD670E1455FF043490 /* ImageCacheLRU.m */,
 			);
-			name = LRU;
 			path = LRU;
 			sourceTree = "<group>";
 		};
@@ -1194,18 +1184,18 @@
 				DA24CF5A186722511685D53E515B3CB8 /* TimerLabel.h */,
 				B6F94606FA87D8B2445674226E49FD82 /* TimerLabel.m */,
 			);
-			name = Label;
 			path = Label;
 			sourceTree = "<group>";
 		};
-		8F4495DC8A7707DCB486C332023D415C /* CameraManager */ = {
+		8F4495DC8A7707DCB486C332023D415C /* Manager */ = {
 			isa = PBXGroup;
 			children = (
 				6D863BA832EE9AD30846CA7A323A33B3 /* CameraManager.h */,
 				80AD5EA8FE43A2A7559A4C137E94A9F1 /* CameraManager.m */,
+				290E68572A0DC72B0012A1FE /* PCSDeviceOrientationManager.h */,
+				290E68582A0DC72B0012A1FE /* PCSDeviceOrientationManager.m */,
 			);
-			name = CameraManager;
-			path = CameraManager;
+			path = Manager;
 			sourceTree = "<group>";
 		};
 		8F47308E62B7B139E1B38ED2DFBA8AD6 /* Support Files */ = {
@@ -1234,7 +1224,6 @@
 				2F8AE3020802E6C5E0534D5250B56F89 /* Cell */,
 				F71D6BF42B7421257000118549DC4623 /* CollectionViewCell */,
 			);
-			name = PhotoListController;
 			path = PhotoListController;
 			sourceTree = "<group>";
 		};
@@ -1244,7 +1233,6 @@
 				40ADBC8E9327EC12F7F669F1D5083A90 /* BaseViewTapGestureDelegate.h */,
 				74B0C7B38FE7DBC6EF188F881134FE16 /* BaseViewTapGestureDelegate.m */,
 			);
-			name = GestureHandler;
 			path = GestureHandler;
 			sourceTree = "<group>";
 		};
@@ -1254,7 +1242,6 @@
 				D2F4D8F00D7D1C4152E06D38B8FE340A /* PanoramaOrientationView.h */,
 				5D9F54A1478D4F68C029CCCB6BB7CC15 /* PanoramaOrientationView.m */,
 			);
-			name = PanoramaOrientaionView;
 			path = PanoramaOrientaionView;
 			sourceTree = "<group>";
 		};
@@ -1304,7 +1291,6 @@
 				A2C97AFCBD52302896DCE3AC8ABFBE5D /* Frameworks */,
 				F75E56D91EC0B21B205D165DDB5F1B5B /* Support Files */,
 			);
-			name = TensorFlowLite;
 			path = TensorFlowLite;
 			sourceTree = "<group>";
 		};
@@ -1600,7 +1586,6 @@
 				EFF942BBE0F3DD7A22178A31416D2DDF /* Frameworks */,
 				78E3D5CA530FE0BBE26EF4F634B54B85 /* Support Files */,
 			);
-			name = OpenCV2;
 			path = OpenCV2;
 			sourceTree = "<group>";
 		};
@@ -1612,7 +1597,6 @@
 				8B4EA76A793A36B9A7E2A62BC2290475 /* Renderer.h */,
 				11995773E721362D45D960C7F36F5FEE /* Renderer.m */,
 			);
-			name = Renderer;
 			path = Renderer;
 			sourceTree = "<group>";
 		};
@@ -1624,7 +1608,6 @@
 				6A8E430D8C35488AC558374EE4BA1474 /* UIView+JKAdd.h */,
 				7CAD41A57A8B36805097520423BF764A /* UIView+JKAdd.m */,
 			);
-			name = "UIView+tool";
 			path = "UIView+tool";
 			sourceTree = "<group>";
 		};
@@ -1634,7 +1617,6 @@
 				E8448C1CD71F60B17168F38D5EFCB996 /* CustomModalViewTransition.h */,
 				C28F183D9772C443C261382978D5FE59 /* CustomModalViewTransition.m */,
 			);
-			name = Transition;
 			path = Transition;
 			sourceTree = "<group>";
 		};
@@ -1655,14 +1637,12 @@
 			children = (
 				8FE3BD74EAD7C908B20106186733CE20 /* LenzHeader.h */,
 				71D82F32955C03B4BE062D50CBDD63C5 /* Localizable.strings */,
-				4E1905F2890898F5477C5019D7DFD454 /* PCSSessionWrapper.h */,
-				CB54B514636CC00FD3A2B6DA70EA4A19 /* PCSSessionWrapper.m */,
 				D97B06C519D5FD968D64BBFA38380A55 /* PCSTools.h */,
 				0B9F19843D637C93ED4EBCB461D9D66C /* PCSTools.m */,
 				2B69F1B64B862CC6F2EFDFF117AA6BED /* SDKParameters.m */,
 				52BB4930B3A773F6833C87F4E518D1CB /* VC.storyboard */,
 				0FAC576D59D3720018CBD128C53C00D8 /* Alert */,
-				8F4495DC8A7707DCB486C332023D415C /* CameraManager */,
+				8F4495DC8A7707DCB486C332023D415C /* Manager */,
 				DBBF3BB8A44E655709A90F67E98E2B20 /* DB */,
 				0F14168F4FCBC5A2EA0AAC55DBCC860E /* Exts */,
 				6D432D89D83C5D2F48D64486104B742D /* LRU */,
@@ -1720,7 +1700,6 @@
 				A682665B0F2F184E8E8A631EADACC029 /* ViewController+MASAdditions.m */,
 				AA5651695ECA2551FE4073E9ED3512A9 /* Support Files */,
 			);
-			name = Masonry;
 			path = Masonry;
 			sourceTree = "<group>";
 		};
@@ -1740,7 +1719,6 @@
 				D785BBEA22031EFDAFA81BFFB1F4AF9E /* LenzDataManager.m */,
 				01C8A734F4C6A1A32CD88C14DDB9C99D /* DBModels */,
 			);
-			name = DB;
 			path = DB;
 			sourceTree = "<group>";
 		};
@@ -1778,7 +1756,6 @@
 				55AE0A7F12C1B365E94D377198CA213C /* OperationNodeVideoBase.m */,
 				FFD8745AD0ACB02BADC27DFADBA337D9 /* PCSMotionManager */,
 			);
-			name = OperationNode;
 			path = OperationNode;
 			sourceTree = "<group>";
 		};
@@ -1788,7 +1765,6 @@
 				57E8904661BEB271AF282CB3E969BB7D /* MoviePlayerViewController.h */,
 				D21E243D3A634A857B5E73A166EBB150 /* MoviePlayerViewController.m */,
 			);
-			name = MoviePlayerViewController;
 			path = MoviePlayerViewController;
 			sourceTree = "<group>";
 		};
@@ -1809,7 +1785,6 @@
 				46F6CF30AA683165DC263A6F4A36351F /* PhotoCell.m */,
 				4C4DFBA4A4268406E16254384F37E4B8 /* PhotoCell.xib */,
 			);
-			name = CollectionViewCell;
 			path = CollectionViewCell;
 			sourceTree = "<group>";
 		};
@@ -1842,7 +1817,6 @@
 				54F7F53531C9AF5E2E79AD7D9A3407E1 /* PanoramaGuideView.h */,
 				382201D83F462FFB7A51D4EA89AB1F1B /* PanoramaGuideView.m */,
 			);
-			name = PanoramaGuideView;
 			path = PanoramaGuideView;
 			sourceTree = "<group>";
 		};
@@ -1866,7 +1840,6 @@
 				CE15512E5F5FB68201632B7707388F8E /* PCSMotionManager.h */,
 				58BF6761F644CCA3A7432CCD6AC62619 /* PCSMotionManager.m */,
 			);
-			name = PCSMotionManager;
 			path = PCSMotionManager;
 			sourceTree = "<group>";
 		};
@@ -1956,6 +1929,7 @@
 				760493D274A9E392B31BEBE5AA0C1253 /* MovieListCellModel.h in Headers */,
 				CCB2FF8B221F0B5FF75BFC167B86F43A /* MovieListViewController.h in Headers */,
 				7C7444C5E16A668CBA57BF77AB2081E0 /* MoviePlayerViewController.h in Headers */,
+				290E68592A0DC72B0012A1FE /* PCSDeviceOrientationManager.h in Headers */,
 				4A4D5B4398AA8842C481BA810C366551 /* NSString+Localization.h in Headers */,
 				6F7E1DA85CE6BA0F5A37535B45444C45 /* OperationNodeAIPanorama.h in Headers */,
 				8814415DB5B65CA206DF7B0DF90F8AF2 /* OperationNodeMovie.h in Headers */,
@@ -1975,7 +1949,6 @@
 				096AC833B02EE6665001C38162C9DCB9 /* PCSPreviewViewController.h in Headers */,
 				F18890AB5B28633B7A72C413558239BB /* PCSRoundButton.h in Headers */,
 				67494A117D518450878B615352E646E6 /* PCSSDF-prefix-header.h in Headers */,
-				50D2E0DCD17C9A17AB8A1CF65FF5A70B /* PCSSessionWrapper.h in Headers */,
 				13FFFFED0ABC6DFA5773992D4B78A254 /* PCSThemeColorManager.h in Headers */,
 				AF5DF97297858FDF56B74EA9AB537F73 /* PCSTools.h in Headers */,
 				3934266CBA9FE57C6CD5C08D53916425 /* PhotoAlbumListViewController.h in Headers */,
@@ -2275,7 +2248,6 @@
 				C722F1286E53582414771A11397942F0 /* PCSMotionManager.m in Sources */,
 				1F3825ACAAB9A5615C1374E9621DF543 /* PCSPreviewViewController.m in Sources */,
 				9AEB0DF19C7D2D6C3BCB0E08C9FC6D0C /* PCSRoundButton.m in Sources */,
-				609B2534A1D55B97140F82334EAAF074 /* PCSSessionWrapper.m in Sources */,
 				B4D7B82D12DEDD2575499CE0BDDEE929 /* PCSThemeColorManager.m in Sources */,
 				5C65312243C01C32249E9EF470D3F576 /* PCSTools.m in Sources */,
 				0457B2F5E5FA69A917BD55A6BE132310 /* PhotoAlbumListViewController.m in Sources */,
@@ -2285,6 +2257,7 @@
 				8C0FD0EC7361FAB1D8CDCA33C1397314 /* PhotoCollectionViewCell.m in Sources */,
 				AE3E6DE2DD4E44743EE245C937A2FD86 /* PhotoCollectionViewCell.xib in Sources */,
 				0605FDB23FE0151491E4E0C40CF838D5 /* PhotoListCellModel.m in Sources */,
+				290E685A2A0DC72B0012A1FE /* PCSDeviceOrientationManager.m in Sources */,
 				DF196A4951C976043102E787FE526122 /* PhotoListViewController.m in Sources */,
 				1E001BE5D56553A9411E49FFE8B7967A /* PreviewSingleViewController.m in Sources */,
 				566A0BD4D87F4167E16C6C6F552A265B /* QuitMultipleModeAlertViewController.m in Sources */,
@@ -2679,8 +2652,7 @@
 				MTL_FAST_MATH = YES;
 				PRODUCT_NAME = "$(TARGET_NAME)";
 				STRIP_INSTALLED_PRODUCT = NO;
-				SWIFT_COMPILATION_MODE = wholemodule;
-				SWIFT_OPTIMIZATION_LEVEL = "-O";
+				SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
 				SWIFT_VERSION = 5.0;
 				SYMROOT = "${SRCROOT}/../build";
 			};

+ 0 - 0
LenzCameraNativeModuleForRN/Classes/inner/CameraManager/CameraManager.h → LenzCameraNativeModuleForRN/Classes/inner/Manager/CameraManager.h


+ 11 - 1
LenzCameraNativeModuleForRN/Classes/inner/CameraManager/CameraManager.m → LenzCameraNativeModuleForRN/Classes/inner/Manager/CameraManager.m

@@ -39,6 +39,10 @@
     
     for (AVCaptureDeviceFormat *format in supportedFormats) {
         CMVideoDimensions dimensions = CMVideoFormatDescriptionGetDimensions((CMVideoFormatDescriptionRef)[format formatDescription]);
+        
+        NSLog(@"~~~~~~: H: %d, W:%D, r:%f", dimensions.width, dimensions.height, (CGFloat)dimensions.width/(CGFloat)dimensions.height);
+        
+        
         if (((CGFloat)dimensions.width/(CGFloat)dimensions.height) == radio && dimensions.height == desiredHeight) {
             bestFormat = format;
             break;
@@ -53,9 +57,15 @@
             CMVideoDimensions bestVideoDimensions = CMVideoFormatDescriptionGetDimensions((CMVideoFormatDescriptionRef)[bestFormat formatDescription]);
             if (((CGFloat)dimensions.width/(CGFloat)dimensions.height) == radio &&
                 (dimensions.height == 720 || dimensions.height == 1080 || dimensions.height == 2160)) {
-                if (bestVideoDimensions.height <= dimensions.height) {
+//                if (bestVideoDimensions.height <= dimensions.height) {
+//                    bestFormat = format;
+//                }
+                
+                if (dimensions.height == 1080) {
                     bestFormat = format;
                 }
+                
+                
             }
         }
     }

+ 44 - 0
LenzCameraNativeModuleForRN/Classes/inner/Manager/PCSDeviceOrientationManager.h

@@ -0,0 +1,44 @@
+//
+//  PCSDeviceOrientationManager.h
+//  LenzSDK
+//
+//  Created by lr on 2023/5/12.
+//
+
+#import <Foundation/Foundation.h>
+
+NS_ASSUME_NONNULL_BEGIN
+
+typedef NS_ENUM(NSInteger,TgDirection) {
+    TgDirectionUnkown,
+    TgDirectionPortrait,
+    TgDirectionDown,
+    TgDirectionRight,
+    TgDirectionLeft,
+};
+
+@protocol PCSDeviceOrientationDelegate <NSObject>
+
+- (void)directionChange:(TgDirection)direction;
+
+@end
+
+@interface PCSDeviceOrientationManager : NSObject
+
+
+@property (nonatomic) id<PCSDeviceOrientationDelegate> delegate;
+@property (nonatomic) TgDirection currentDirection;
+
+- (instancetype)initWithDelegate:(id<PCSDeviceOrientationDelegate>) delegate;
+/**
+ 开启监听
+ */
+- (void)startMonitor;
+/**
+ 结束监听,请stop
+ */
+- (void)stop;
+
+@end
+
+NS_ASSUME_NONNULL_END

+ 102 - 0
LenzCameraNativeModuleForRN/Classes/inner/Manager/PCSDeviceOrientationManager.m

@@ -0,0 +1,102 @@
+//
+//  PCSDeviceOrientationManager.m
+//  LenzSDK
+//
+//  Created by lr on 2023/5/12.
+//
+
+#import "PCSDeviceOrientationManager.h"
+#import <CoreMotion/CoreMotion.h>
+
+static const float sensitive = 0.77;
+
+
+@interface PCSDeviceOrientationManager () {
+    
+    CMMotionManager *_motionManager;
+}
+@end
+
+@implementation PCSDeviceOrientationManager
+
+
+- (instancetype)initWithDelegate:(id<PCSDeviceOrientationDelegate>)delegate {
+    self = [super init];
+    if (self) {
+        
+        _delegate = delegate;
+    }
+    return self;
+}
+- (void)startMonitor {
+    
+    [self start];
+}
+
+- (void)stop {
+    [_motionManager stopDeviceMotionUpdates];
+}
+
+
+//陀螺仪 每隔一个间隔做轮询
+- (void)start{
+    
+    if (_motionManager == nil) {
+        
+        _motionManager = [[CMMotionManager alloc] init];
+    }
+    _motionManager.deviceMotionUpdateInterval = 1/40.f;
+    if (_motionManager.deviceMotionAvailable) {
+        
+        [_motionManager startDeviceMotionUpdatesToQueue:[NSOperationQueue currentQueue]
+                                            withHandler: ^(CMDeviceMotion *motion, NSError *error){
+                                                [self performSelectorOnMainThread:@selector(deviceMotion:) withObject:motion waitUntilDone:YES];
+                                            }];
+    }
+}
+- (void)deviceMotion:(CMDeviceMotion *)motion{
+    
+    double x = motion.gravity.x;
+    double y = motion.gravity.y;
+
+    if (y < 0 ) {
+        if (fabs(y) > sensitive) {
+            if (self.currentDirection != TgDirectionPortrait) {
+                self.currentDirection = TgDirectionPortrait;
+                if ([self.delegate respondsToSelector:@selector(directionChange:)]) {
+                    [self.delegate directionChange:self.currentDirection];
+                }
+            }
+        }
+    }else {
+        if (y > sensitive) {
+            if (self.currentDirection != TgDirectionDown) {
+                self.currentDirection = TgDirectionDown;
+                if ([self.delegate respondsToSelector:@selector(directionChange:)]) {
+                    [self.delegate directionChange:self.currentDirection];
+                }
+            }
+        }
+    }
+    if (x < 0 ) {
+        if (fabs(x) > sensitive) {
+            if (self.currentDirection != TgDirectionLeft) {
+                self.currentDirection = TgDirectionLeft;
+                if ([self.delegate respondsToSelector:@selector(directionChange:)]) {
+                    [self.delegate directionChange:self.currentDirection];
+                }
+            }
+        }
+    }else {
+        if (x > sensitive) {
+            if (self.currentDirection != TgDirectionRight) {
+                self.currentDirection = TgDirectionRight;
+                if ([self.delegate respondsToSelector:@selector(directionChange:)]) {
+                    [self.delegate directionChange:self.currentDirection];
+                }
+            }
+        }
+    }
+}
+
+@end

+ 250 - 16
LenzCameraNativeModuleForRN/Classes/inner/PCSBaseViewController/PCSBaseViewController.m

@@ -50,6 +50,7 @@
 #import "PCSPreviewViewController.h"
 #import "SVProgressHUD.h"
 #import "PCSAutherView.h"
+#import "PCSDeviceOrientationManager.h"
 
 #import <LenzTensorFlowSDK/LenzTensorFlow.h>
 
@@ -62,7 +63,8 @@
                                     UIViewControllerTransitioningDelegate,
                                     AVCaptureVideoDataOutputSampleBufferDelegate,
                                     PhotoListViewControllerDelegate,
-                                    PanoramaOrientationViewDelegate>
+                                    PanoramaOrientationViewDelegate,
+                                    PCSDeviceOrientationDelegate>
 
 @property (nonatomic, assign) CGFloat accX;
 
@@ -133,6 +135,9 @@
 
 @property (nonatomic) dispatch_queue_t videoQueue;
 @property (nonatomic) BOOL isDuringTakePhoto;
+@property (nonatomic) PCSDeviceOrientationManager *orientationManager;
+@property (nonatomic) TgDirection currentTgDirection;
+@property (nonatomic) UIView *svContentView;
 
 @end
 
@@ -175,6 +180,11 @@
     self.motionManager = [[CMMotionManager alloc]init];
     self.motionManager.deviceMotionUpdateInterval = 1/5;
     
+    
+    self.orientationManager = [[PCSDeviceOrientationManager alloc] initWithDelegate:self];
+    [self.orientationManager startMonitor];
+    
+    
     [self.view addSubview:self.panoramaGuideView];
     [self panoramaOrientationViewslt:(PanoramaOrientationViewLeft)];
     self.panoramaGuideView.hidden = YES;
@@ -389,6 +399,21 @@
         make.width.mas_offset(200);
         make.height.mas_offset(200);
     }];
+    
+    self.svContentView = [[UIView alloc]init];
+    self.svContentView.backgroundColor = [UIColor clearColor];
+    self.svContentView.userInteractionEnabled = NO;
+    [self.view addSubview:self.svContentView];
+
+    [self.svContentView mas_makeConstraints:^(MASConstraintMaker *make) {
+        make.edges.mas_equalTo(self.view);
+    }];
+    [SVProgressHUD setContainerView:self.svContentView];
+    
+    self.currentTgDirection = TgDirectionPortrait;
+    self.panoramaGuideView.dir = self.currentTgDirection;
+    self.panoramaGuideView.orginDir = self.panoramOrientationGuideView.selectedItemIndex;
+
 }
 - (PCSAutherView *)authView {
     if (!_authView) {
@@ -1329,7 +1354,7 @@
         [Renderer shared].cameraPass.texture = nil;
     });
     [self stopMotion];
-    [self.panoramaGuideView showImageWith:nil dir:self.panoramOrientationGuideView.selectedItemIndex];
+    [self.panoramaGuideView showImageWith:nil];
     [self updateViewStatus];
 
 }
@@ -1529,9 +1554,9 @@
 }
 
 #pragma mark - orientation
-- (UIInterfaceOrientationMask)supportedInterfaceOrientations{
-    return UIInterfaceOrientationMaskPortrait;
-}
+//- (UIInterfaceOrientationMask)supportedInterfaceOrientations{
+//    return UIInterfaceOrientationMaskPortrait;
+//}
 
 
 - (void)updateUIByMode{
@@ -1544,9 +1569,24 @@
         [self.currentOperationNode updateUI];
     }
     [self updatePreViewLayer];
-
+    [self updateUIByDir];
 }
 
+- (void)updateUIByDir {
+    if (self.mode == SDK_CAPTURE_MODE_PANORAMA) {
+        [self updatePanormaViewWith:self.currentTgDirection];
+    } else {
+        [self.modeLabel mas_remakeConstraints:^(MASConstraintMaker *make) {
+            make.centerX.mas_equalTo(self.view);
+            make.centerY.mas_equalTo(self.flashButton);
+        }];
+        self.modeLabel.transform = CGAffineTransformMakeRotation(0);
+        [self.timerLabel mas_remakeConstraints:^(MASConstraintMaker *make) {
+            make.edges.mas_equalTo(self.modeLabel);
+        }];
+        self.timerLabel.transform = CGAffineTransformMakeRotation(0);
+    }
+}
 
 - (void)updatePreViewLayer {
     CGFloat width = [UIScreen mainScreen].bounds.size.width;
@@ -1573,7 +1613,7 @@
             self.switchButton.hidden = NO;
             self.panoramaGuideView.hidden = YES;
             self.panoramOrientationGuideView.hidden = YES;
-            self.previewLayer.frame = CGRectMake(0, (height - width*16/9)/2, width, width*16/9);
+            self.previewLayer.frame = CGRectMake(0, 0, width, height);
 
         }
             
@@ -1698,6 +1738,195 @@
 }
 
 
+#pragma mark - DeviceOrigatrion Delegate
+
+- (void)directionChange:(TgDirection)direction {
+    self.currentTgDirection = direction;
+
+    if (self.mode != SDK_CAPTURE_MODE_PANORAMA) {
+        return;
+    }
+    if (self.isStitchBigImage) {
+        return;
+    }
+    self.panoramaGuideView.dir = self.currentTgDirection;
+    self.panoramaGuideView.orginDir = self.panoramOrientationGuideView.selectedItemIndex;
+    [self updatePanormaViewWith:direction];
+}
+
+- (void)updatePanormaViewWith:(TgDirection)direction {
+    CGFloat height = [UIScreen mainScreen].bounds.size.height;
+    CGFloat width = [UIScreen mainScreen].bounds.size.width;
+
+    switch (direction) {
+        case TgDirectionPortrait:{
+            
+            [self panoramaOrientationViewslt:self.panoramOrientationGuideView.selectedItemIndex];
+            [self.modeLabel mas_remakeConstraints:^(MASConstraintMaker *make) {
+                make.centerX.mas_equalTo(self.view);
+                make.centerY.mas_equalTo(self.flashButton);
+            }];
+            self.modeLabel.transform = CGAffineTransformMakeRotation(0);
+            [self.timerLabel mas_remakeConstraints:^(MASConstraintMaker *make) {
+                make.edges.mas_equalTo(self.modeLabel);
+            }];
+            self.timerLabel.transform = CGAffineTransformMakeRotation(0);
+            self.svContentView.transform = CGAffineTransformMakeRotation(0);
+
+        }
+            break;
+        case TgDirectionDown:{
+
+            if (self.panoramOrientationGuideView.selectedItemIndex == PanoramaOrientationViewLeft) {
+                [self panoramaOrientationViewslt:PanoramaOrientationViewRight];
+            } else if (self.panoramOrientationGuideView.selectedItemIndex == PanoramaOrientationViewRight) {
+                [self panoramaOrientationViewslt:PanoramaOrientationViewLeft];
+            } else if (self.panoramOrientationGuideView.selectedItemIndex == PanoramaOrientationViewUp) {
+                [self panoramaOrientationViewslt:PanoramaOrientationViewDown];
+            } else if (self.panoramOrientationGuideView.selectedItemIndex == PanoramaOrientationViewDown) {
+                [self panoramaOrientationViewslt:PanoramaOrientationViewUp];
+            }
+            
+            [self.modeLabel mas_remakeConstraints:^(MASConstraintMaker *make) {
+                make.centerX.mas_equalTo(self.view);
+                make.centerY.mas_equalTo(self.flashButton);
+            }];
+            self.modeLabel.transform = CGAffineTransformMakeRotation(0);
+            [self.timerLabel mas_remakeConstraints:^(MASConstraintMaker *make) {
+                make.edges.mas_equalTo(self.modeLabel);
+            }];
+            self.timerLabel.transform = CGAffineTransformMakeRotation(0);
+            self.svContentView.transform = CGAffineTransformMakeRotation(0);
+
+        }
+
+            break;
+        case TgDirectionRight:{
+
+            if (self.panoramOrientationGuideView.selectedItemIndex == PanoramaOrientationViewLeft) {
+                [self panoramaOrientationViewslt:PanoramaOrientationViewDown];
+                [self.modeLabel mas_remakeConstraints:^(MASConstraintMaker *make) {
+                    make.top.mas_equalTo((height - 40)/2);
+                    make.height.mas_offset(22);
+                    make.right.mas_offset(-(width-80));
+                }];
+                self.modeLabel.transform = CGAffineTransformMakeRotation(-M_PI/2);
+                [self.timerLabel mas_remakeConstraints:^(MASConstraintMaker *make) {
+                    make.edges.mas_equalTo(self.modeLabel);
+                }];
+                self.timerLabel.transform = CGAffineTransformMakeRotation(-M_PI/2);
+                self.svContentView.transform = CGAffineTransformMakeRotation(-M_PI/2);
+
+            } else if (self.panoramOrientationGuideView.selectedItemIndex == PanoramaOrientationViewRight) {
+                [self panoramaOrientationViewslt:PanoramaOrientationViewUp];
+                [self.modeLabel mas_remakeConstraints:^(MASConstraintMaker *make) {
+                    make.top.mas_equalTo((height - 40)/2);
+                    make.height.mas_offset(22);
+                    make.right.mas_offset(-(width-80));
+                }];
+                self.modeLabel.transform = CGAffineTransformMakeRotation(-M_PI/2);
+                [self.timerLabel mas_remakeConstraints:^(MASConstraintMaker *make) {
+                    make.edges.mas_equalTo(self.modeLabel);
+                }];
+                self.timerLabel.transform = CGAffineTransformMakeRotation(-M_PI/2);
+                self.svContentView.transform = CGAffineTransformMakeRotation(-M_PI/2);
+
+            } else if (self.panoramOrientationGuideView.selectedItemIndex == PanoramaOrientationViewUp) {
+                [self panoramaOrientationViewslt:PanoramaOrientationViewLeft];
+                [self.modeLabel mas_remakeConstraints:^(MASConstraintMaker *make) {
+                    make.centerX.mas_equalTo(self.view);
+                    make.centerY.mas_equalTo(self.flashButton);
+                }];
+                self.modeLabel.transform = CGAffineTransformMakeRotation(0);
+                [self.timerLabel mas_remakeConstraints:^(MASConstraintMaker *make) {
+                    make.edges.mas_equalTo(self.modeLabel);
+                }];
+                self.timerLabel.transform = CGAffineTransformMakeRotation(0);
+                self.svContentView.transform = CGAffineTransformMakeRotation(0);
+
+            } else if (self.panoramOrientationGuideView.selectedItemIndex == PanoramaOrientationViewDown) {
+                [self panoramaOrientationViewslt:PanoramaOrientationViewRight];
+                [self.modeLabel mas_remakeConstraints:^(MASConstraintMaker *make) {
+                    make.centerX.mas_equalTo(self.view);
+                    make.centerY.mas_equalTo(self.flashButton);
+                }];
+                self.modeLabel.transform = CGAffineTransformMakeRotation(0);
+                [self.timerLabel mas_remakeConstraints:^(MASConstraintMaker *make) {
+                    make.edges.mas_equalTo(self.modeLabel);
+                }];
+                self.timerLabel.transform = CGAffineTransformMakeRotation(0);
+                self.svContentView.transform = CGAffineTransformMakeRotation(0);
+
+            }
+
+        }
+            break;
+        case TgDirectionLeft:{
+
+            if (self.panoramOrientationGuideView.selectedItemIndex == PanoramaOrientationViewLeft) {
+                [self panoramaOrientationViewslt:PanoramaOrientationViewUp];
+                [self.modeLabel mas_remakeConstraints:^(MASConstraintMaker *make) {
+                    make.top.mas_equalTo((height - 40)/2);
+                    make.height.mas_offset(22);
+                    make.left.mas_offset(width-80);
+                }];
+                self.modeLabel.transform = CGAffineTransformMakeRotation(M_PI/2);
+                [self.timerLabel mas_remakeConstraints:^(MASConstraintMaker *make) {
+                    make.edges.mas_equalTo(self.modeLabel);
+                }];
+                self.timerLabel.transform = CGAffineTransformMakeRotation(M_PI/2);
+                self.svContentView.transform = CGAffineTransformMakeRotation(M_PI/2);
+
+            } else if (self.panoramOrientationGuideView.selectedItemIndex == PanoramaOrientationViewRight) {
+                [self panoramaOrientationViewslt:PanoramaOrientationViewDown];
+                [self.modeLabel mas_remakeConstraints:^(MASConstraintMaker *make) {
+                    make.top.mas_equalTo((height - 40)/2);
+                    make.height.mas_offset(22);
+                    make.left.mas_offset(width-80);
+                }];
+                self.modeLabel.transform = CGAffineTransformMakeRotation(M_PI/2);
+                [self.timerLabel mas_remakeConstraints:^(MASConstraintMaker *make) {
+                    make.edges.mas_equalTo(self.modeLabel);
+                }];
+                self.timerLabel.transform = CGAffineTransformMakeRotation(M_PI/2);
+                self.svContentView.transform = CGAffineTransformMakeRotation(M_PI/2);
+
+            } else if (self.panoramOrientationGuideView.selectedItemIndex == PanoramaOrientationViewUp) {
+                [self panoramaOrientationViewslt:PanoramaOrientationViewRight];
+                [self.modeLabel mas_remakeConstraints:^(MASConstraintMaker *make) {
+                    make.centerX.mas_equalTo(self.view);
+                    make.centerY.mas_equalTo(self.flashButton);
+                }];
+                self.modeLabel.transform = CGAffineTransformMakeRotation(0);
+                [self.timerLabel mas_remakeConstraints:^(MASConstraintMaker *make) {
+                    make.edges.mas_equalTo(self.modeLabel);
+                }];
+                self.timerLabel.transform = CGAffineTransformMakeRotation(0);
+                self.svContentView.transform = CGAffineTransformMakeRotation(0);
+
+            } else if (self.panoramOrientationGuideView.selectedItemIndex == PanoramaOrientationViewDown) {
+                [self panoramaOrientationViewslt:PanoramaOrientationViewLeft];
+                [self.modeLabel mas_remakeConstraints:^(MASConstraintMaker *make) {
+                    make.centerX.mas_equalTo(self.view);
+                    make.centerY.mas_equalTo(self.flashButton);
+                }];
+                self.modeLabel.transform = CGAffineTransformMakeRotation(0);
+                [self.timerLabel mas_remakeConstraints:^(MASConstraintMaker *make) {
+                    make.edges.mas_equalTo(self.modeLabel);
+                }];
+                self.timerLabel.transform = CGAffineTransformMakeRotation(0);
+                self.svContentView.transform = CGAffineTransformMakeRotation(0);
+
+            }
+        }
+            break;
+    
+        default:
+            break;
+    }
+    
+}
+    
 #pragma  mark 方向调用的代理
 - (void)panoramaOrientationViewslt:(PanoramaOrientationViewDirectionEnum)direction{
     self.panoramaGuideView.hidden = NO;
@@ -1718,7 +1947,11 @@
                     make.centerX.mas_equalTo(self.view);
                     make.width.mas_equalTo(PanoramaGuideViewWOrH);
                     make.bottom.mas_equalTo(self.panoramOrientationGuideView.mas_top).offset(-25);
-                    make.top.mas_equalTo(self.timerLabel.mas_bottom).offset(15);
+                    if (self.currentTgDirection == TgDirectionLeft || self.currentTgDirection == TgDirectionRight) {
+                        make.top.offset(50);
+                    } else {
+                        make.top.mas_equalTo(self.timerLabel.mas_bottom).offset(15);
+                    }
                 }
                     break;
                 case PanoramaOrientationViewAny: {
@@ -1729,11 +1962,12 @@
                     break;
             }
         }];
-        if (self.mode != SDK_CAPTURE_MODE_INTELLEGENCE_PANORAMA) {
-            [self.panoramaGuideView setNeedsLayout];
-            [self.panoramaGuideView layoutIfNeeded];
-        }
+//        if (self.mode != SDK_CAPTURE_MODE_INTELLEGENCE_PANORAMA) {
+//            [self.panoramaGuideView setNeedsLayout];
+//            [self.panoramaGuideView layoutIfNeeded];
+//        }
     } completion:^(BOOL finished) {
+        self.panoramaGuideView.orginDir = self.panoramOrientationGuideView.selectedItemIndex;
         [self.panoramaGuideView direction:direction];
     }];
 }
@@ -1975,7 +2209,7 @@
         } rightButtonCallBack:^(QuitMultipleModeAlertViewController * _Nonnull alertController) {
             [self updateViewStatusWhenStitchSave:NO];
             [self.panoramaGuideView clearImage];
-            [self.panoramaGuideView showImageWith:nil dir:self.panoramOrientationGuideView.selectedItemIndex];
+            [self.panoramaGuideView showImageWith:nil];
             [alertController dismissViewControllerAnimated:NO completion:^{
             }];
         }];
@@ -2619,7 +2853,7 @@
                             self.isStitchBigImage = NO;
                             [self.panoramaGuideView clearImage];
                             [self updateViewStatus];
-                            [self.panoramaGuideView showImageWith:nil dir:self.panoramOrientationGuideView.selectedItemIndex];
+                            [self.panoramaGuideView showImageWith:nil];
                         } else {
                             if (base.isRecording) {
                                 __block BOOL keyFrame = NO;
@@ -2636,7 +2870,7 @@
                                     }
                                 }
                                 if (self.panoramOrientationGuideView.selectedItemIndex != PanoramaOrientationViewAny) {
-                                    [self.panoramaGuideView showImageWith:image dir:self.panoramOrientationGuideView.selectedItemIndex];
+                                    [self.panoramaGuideView showImageWith:image];
                                 } else {
                                     self.ablumImageView.hidden = NO;
                                     self.ablumImageView.image = image;
@@ -2687,7 +2921,7 @@
                             [self updateViewStatusWhenStitchFail];
                             [self.panoramaGuideView clearImage];
                             [self updateViewStatus];
-                            [self.panoramaGuideView showImageWith:nil dir:self.panoramOrientationGuideView.selectedItemIndex];
+                            [self.panoramaGuideView showImageWith:nil];
                         });
                         
                         [SVProgressHUD dismissWithDelay:3 completion:^{

+ 2 - 2
LenzCameraNativeModuleForRN/Classes/inner/PCSBaseViewController/PCSPreviewViewController.m

@@ -91,7 +91,7 @@
         _imageView = [[UIImageView alloc]init];
         _imageView.layer.cornerRadius = 8;
         _imageView.layer.masksToBounds = YES;
-        _imageView.backgroundColor = [UIColor blackColor];
+//        _imageView.backgroundColor = [UIColor blackColor];
         _imageView.contentMode = UIViewContentModeScaleAspectFit;
     }
     return _imageView;
@@ -769,7 +769,7 @@
         _scrollView.layer.cornerRadius = 8;
         _scrollView.layer.masksToBounds = YES;
         _scrollView.delegate = self;
-        _scrollView.backgroundColor = [UIColor blackColor];
+//        _scrollView.backgroundColor = [UIColor blackColor];
     }
     return _scrollView;
 }

+ 0 - 28
LenzCameraNativeModuleForRN/Classes/inner/PCSSessionWrapper.h

@@ -1,28 +0,0 @@
-//
-//  PCSSessionWrapper.h
-//  sampleSDK
-//
-//  Created by 王昭威 on 2023/1/15.
-//
-
-#import <Foundation/Foundation.h>
-
-NS_ASSUME_NONNULL_BEGIN
-
-@class AVCaptureSession;
-@class AVCapturePhotoOutput;
-@class AVCaptureVideoDataOutput;
-@class AVCaptureMovieFileOutput;
-@class AVCaptureVideoPreviewLayer;
-@interface PCSSessionWrapper : NSObject
-
-@property (nonatomic, strong) AVCaptureSession* captureSession;
-@property (nonatomic, strong) AVCapturePhotoOutput* cameraPhotoOutput;
-@property (nonatomic, strong) AVCaptureVideoDataOutput* cameraVideoOutput;
-@property (nonatomic, strong) AVCaptureMovieFileOutput* movieFileOutput;
-
-@property (nonatomic, strong) AVCaptureVideoPreviewLayer* previewLayer;
-
-@end
-
-NS_ASSUME_NONNULL_END

+ 0 - 13
LenzCameraNativeModuleForRN/Classes/inner/PCSSessionWrapper.m

@@ -1,13 +0,0 @@
-//
-//  PCSSessionWrapper.m
-//  sampleSDK
-//
-//  Created by 王昭威 on 2023/1/15.
-//
-
-#import "PCSSessionWrapper.h"
-#import <AVFoundation/AVFoundation.h>
-
-@implementation PCSSessionWrapper
-
-@end

+ 8 - 4
LenzCameraNativeModuleForRN/Classes/inner/UI/PanoramaGuideView/PanoramaGuideView.h

@@ -7,7 +7,7 @@
 
 #import <UIKit/UIKit.h>
 #import "PanoramaOrientationView.h"
-
+#import "PCSDeviceOrientationManager.h"
 
 UIKIT_EXTERN  CGFloat const PanoramaGuideViewWOrH;
 
@@ -26,13 +26,17 @@ NS_ASSUME_NONNULL_BEGIN
 
 @interface PanoramaGuideView : UIView
 
--(void)direction:(PanoramaOrientationViewDirectionEnum)dir;
+@property (nonatomic) TgDirection dir;
+@property (nonatomic) PanoramaOrientationViewDirectionEnum orginDir;
+
+
+- (void)direction:(PanoramaOrientationViewDirectionEnum)dir;
 
 - (void)updatePreviewAspect: (CGFloat)aspect;
 - (void)updateOffset:(CGFloat)offset;
 
-- (void)showImageWith:(UIImage *_Nullable)image dir:(PanoramaOrientationViewDirectionEnum)dir;
-
+- (void)showImageWith:(UIImage *_Nullable)image;
+//- (void)updatePromptLabelWith:(TgDirection)dir;
 - (void)clearImage;
 
 - (void)updateArrowWith:(PanoramaArrowDir)arrowDir dir:(PanoramaOrientationViewDirectionEnum)dir;

+ 268 - 39
LenzCameraNativeModuleForRN/Classes/inner/UI/PanoramaGuideView/PanoramaGuideView.m

@@ -47,6 +47,7 @@ CGFloat const PanoramaGuideViewWOrH = 120;
 
 @property (nonatomic) NSNumber *offSetTop;
 @property (nonatomic) NSNumber *offSetLeft;
+@property (nonatomic) PanoramaOrientationViewDirectionEnum currentDirection;
 
 @end
 
@@ -93,9 +94,10 @@ CGFloat const PanoramaGuideViewWOrH = 120;
 }
 
 - (void)direction:(PanoramaOrientationViewDirectionEnum)dir{
-
+    self.currentDirection = dir;
     [self insertSubview:self.line atIndex:0];
     self.line.hidden = YES;
+//    self.label.hidden = YES;
     [self.superV addSubview:self.label];
     [self addSubview:self.whiteArrow];
     [self.line mas_remakeConstraints:^(MASConstraintMaker *make) {
@@ -123,33 +125,34 @@ CGFloat const PanoramaGuideViewWOrH = 120;
     }];
     
     
-    [self.label mas_remakeConstraints:^(MASConstraintMaker *make) {
-        switch (dir) {
-            case PanoramaOrientationViewLeft:
-            case PanoramaOrientationViewRight:  // 横
-            {
-                make.top.mas_equalTo(self.mas_bottom).offset(5);
-                make.centerX.mas_equalTo(self.superV);
-                make.height.offset(20);
-                make.width.offset(160);
-                self.label.verticalForm = NO;
-            }
-                break;
-            case PanoramaOrientationViewUp:
-            case PanoramaOrientationViewDown: // 上下
-            {
-                make.right.mas_equalTo(self.mas_left).offset(-5);
-                make.centerY.mas_equalTo(self.superV);
-                make.width.offset(20);
-                make.height.offset(160);
-                self.label.verticalForm = YES;
-            }
-                break;
-                
-            default:
-                break;
-        }
-    }];
+//    [self.label mas_remakeConstraints:^(MASConstraintMaker *make) {
+//        switch (dir) {
+//            case PanoramaOrientationViewLeft:
+//            case PanoramaOrientationViewRight:  // 横
+//            {
+//                make.top.mas_equalTo(self.mas_bottom).offset(5);
+//                make.centerX.mas_equalTo(self.superV);
+//                make.height.offset(20);
+//                make.width.offset(160);
+//                self.label.verticalForm = NO;
+//            }
+//                break;
+//            case PanoramaOrientationViewUp:
+//            case PanoramaOrientationViewDown: // 上下
+//            {
+//                make.right.mas_equalTo(self.mas_left).offset(-5);
+//                make.centerY.mas_equalTo(self.superV);
+//                make.width.offset(20);
+//                make.height.offset(160);
+//                self.label.verticalForm = YES;
+//            }
+//                break;
+//                
+//            default:
+//                break;
+//        }
+//    }];
+    [self updatePromptLabel];
 
     [self.showImageView mas_remakeConstraints:^(MASConstraintMaker *make) {
         switch (dir) {
@@ -234,20 +237,246 @@ CGFloat const PanoramaGuideViewWOrH = 120;
         [self layoutIfNeeded];
     } completion:^(BOOL finished) {
         self.line.hidden = NO;
+//        self.label.hidden = NO;
     }];
 }
 
-- (void)showImageWith:(UIImage * _Nullable)image dir:(PanoramaOrientationViewDirectionEnum)dir {
-//    if (!image) {
-//        dispatch_async(dispatch_get_main_queue(), ^{
-//            self.showImageView.image = nil;
-//        });
-//        return;
-//    }
+- (void)updatePromptLabel {
+    
+//    self.backgroundColor = [UIColor redColor];
+//    self.superV.backgroundColor = [UIColor yellowColor];
+    self.label.transform = CGAffineTransformMakeRotation(0);
+
+    switch (self.dir) {
+        case TgDirectionPortrait: {
+            [self.label mas_remakeConstraints:^(MASConstraintMaker *make) {
+                switch (self.orginDir) {
+                    case PanoramaOrientationViewLeft:
+                    case PanoramaOrientationViewRight:  // 横
+                    {
+                        make.top.mas_equalTo(self.mas_bottom).offset(5);
+                        make.centerX.mas_equalTo(self.superV);
+                        make.height.offset(20);
+                        make.width.offset(160);
+                        self.label.verticalForm = NO;
+                    }
+                        break;
+                    case PanoramaOrientationViewUp:
+                    case PanoramaOrientationViewDown: // 上下
+                    {
+                        make.right.mas_equalTo(self.mas_left).offset(-5);
+                        make.centerY.mas_equalTo(self.superV);
+                        make.width.offset(20);
+                        make.height.offset(160);
+                        self.label.verticalForm = YES;
+                    }
+                        break;
+        
+                    default:
+                        break;
+                }
+            }];
+            
+        }
+            break;
+        case TgDirectionDown: {
+            switch (self.orginDir) {
+                case PanoramaOrientationViewLeft: {
+                    self.label.transform = CGAffineTransformMakeRotation(-M_PI);
+                    [self.label mas_remakeConstraints:^(MASConstraintMaker *make) {
+                        make.bottom.mas_equalTo(self.mas_top).mas_offset(-20);
+                        make.centerX.mas_equalTo(self);
+                        make.height.offset(20);
+                        make.width.offset(160);
+                        self.label.verticalForm = NO;
+                    }];
+
+                }
+                    break;
+                case PanoramaOrientationViewRight:  // 横
+                {
+//                        self.label.transform = CGAffineTransformMakeRotation(0);
+                    self.label.transform = CGAffineTransformMakeRotation(-M_PI/2);
+                    [self.label mas_remakeConstraints:^(MASConstraintMaker *make) {
+                        make.left.mas_equalTo(self.mas_right).offset(-60);
+                        make.centerY.mas_equalTo(self);
+                        make.height.offset(20);
+                        make.width.offset(160);
+                        self.label.verticalForm = NO;
+                    }];
+
+                }
+                    break;
+                case PanoramaOrientationViewUp: {
+                    self.label.transform = CGAffineTransformMakeRotation(M_PI);
+
+                    [self.label mas_remakeConstraints:^(MASConstraintMaker *make) {
+
+                        make.right.mas_equalTo(self.mas_left).offset(-5);
+                        make.centerY.mas_equalTo(self.superV);
+                        make.width.offset(20);
+                        make.height.offset(160);
+                        self.label.verticalForm = YES;
+                    }];
+                }
+                    break;
+                case PanoramaOrientationViewDown: // 上下
+                {
+                    self.label.transform = CGAffineTransformMakeRotation(M_PI);
+
+                    [self.label mas_remakeConstraints:^(MASConstraintMaker *make) {
+
+                        make.right.mas_equalTo(self.mas_left).offset(-5);
+                        make.centerY.mas_equalTo(self.superV);
+                        make.width.offset(20);
+                        make.height.offset(160);
+                        self.label.verticalForm = YES;
+                    }];
+
+                }
+                    break;
+    
+                default:
+                    break;
+            }
+            
+        }
+            break;
+        case TgDirectionLeft: {
+
+                switch (self.orginDir) {
+                    case PanoramaOrientationViewLeft: {
+//                        self.label.transform = CGAffineTransformMakeRotation(0);
+                        self.label.transform = CGAffineTransformMakeRotation(M_PI/2);
+                        [self.label mas_remakeConstraints:^(MASConstraintMaker *make) {
+                            make.right.mas_equalTo(self.mas_left).mas_offset(60);
+                            make.centerY.mas_equalTo(self);
+                            make.height.offset(20);
+                            make.width.offset(160);
+                            self.label.verticalForm = NO;
+                        }];
+
+                    }
+                        break;
+                    case PanoramaOrientationViewRight:  // 横
+                    {
+                        
+//                        self.label.transform = CGAffineTransformMakeRotation(0);
+                        self.label.transform = CGAffineTransformMakeRotation(M_PI/2);
+                        [self.label mas_remakeConstraints:^(MASConstraintMaker *make) {
+                            make.right.mas_equalTo(self.mas_left).mas_offset(60);
+                            make.centerY.mas_equalTo(self);
+                            make.height.offset(20);
+                            make.width.offset(160);
+                            self.label.verticalForm = NO;
+                        }];
+
+                    }
+                        break;
+                    case PanoramaOrientationViewUp:{
+                        self.label.transform = CGAffineTransformMakeRotation(M_PI/2);
+                        [self.label mas_remakeConstraints:^(MASConstraintMaker *make) {
+                            make.top.mas_equalTo(self.mas_bottom).offset(-60);
+                            make.centerX.mas_equalTo(self.superV);
+                            make.width.offset(20);
+                            make.height.offset(160);
+                            self.label.verticalForm = YES;
+                        }];
+                    }
+                        break;
+                    case PanoramaOrientationViewDown: // 上下
+                    {
+                        self.label.transform = CGAffineTransformMakeRotation(M_PI/2);
+                        [self.label mas_remakeConstraints:^(MASConstraintMaker *make) {
+                            make.top.mas_equalTo(self.mas_bottom).offset(-60);
+                            make.centerX.mas_equalTo(self.superV);
+                            make.width.offset(20);
+                            make.height.offset(160);
+                            self.label.verticalForm = YES;
+                        }];
+
+                    }
+                        break;
+        
+                    default:
+                        break;
+                }
+            
+            
+        }
+            break;
+        case TgDirectionRight: {
+            switch (self.orginDir) {
+                case PanoramaOrientationViewLeft: {
+                    self.label.transform = CGAffineTransformMakeRotation(-M_PI/2);
+                    [self.label mas_remakeConstraints:^(MASConstraintMaker *make) {
+                        make.left.mas_equalTo(self.mas_right).offset(-60);
+                        make.centerY.mas_equalTo(self);
+                        make.height.offset(20);
+                        make.width.offset(160);
+                        self.label.verticalForm = NO;
+                    }];
+
+                }
+                    break;
+                case PanoramaOrientationViewRight:  // 横
+                {
+                    self.label.transform = CGAffineTransformMakeRotation(-M_PI/2);
+                    [self.label mas_remakeConstraints:^(MASConstraintMaker *make) {
+                        make.left.mas_equalTo(self.mas_right).offset(-60);
+                        make.centerY.mas_equalTo(self);
+                        make.height.offset(20);
+                        make.width.offset(160);
+                        self.label.verticalForm = NO;
+                    }];
+
+                }
+                    break;
+                case PanoramaOrientationViewUp:{
+                    self.label.transform = CGAffineTransformMakeRotation(-M_PI/2);
+                    [self.label mas_remakeConstraints:^(MASConstraintMaker *make) {
+                        make.top.mas_equalTo(self.mas_bottom).offset(-60);
+                        make.centerX.mas_equalTo(self.superV);
+                        make.width.offset(20);
+                        make.height.offset(160);
+                        self.label.verticalForm = YES;
+                    }];
+                }
+                    break;
+                case PanoramaOrientationViewDown: // 上下
+                {
+                    self.label.transform = CGAffineTransformMakeRotation(-M_PI/2);
+                    [self.label mas_remakeConstraints:^(MASConstraintMaker *make) {
+                        make.top.mas_equalTo(self.mas_bottom).offset(-60);
+                        make.centerX.mas_equalTo(self.superV);
+                        make.width.offset(20);
+                        make.height.offset(160);
+                        self.label.verticalForm = YES;
+                    }];
+
+                }
+                    break;
+    
+                default:
+                    break;
+            }
+        }
+            break;
+            
+        default:
+            break;
+    }
+    
+}
+
+
+
+- (void)showImageWith:(UIImage * _Nullable)image {
+        
     dispatch_async(dispatch_get_main_queue(), ^{
         CGFloat imageWH = 0;
         if (image) {
-            if (dir == PanoramaOrientationViewDown || dir == PanoramaOrientationViewUp) {
+            if (self.currentDirection == PanoramaOrientationViewDown || self.currentDirection == PanoramaOrientationViewUp) {
                 imageWH = (PanoramaGuideViewWOrH * image.size.height)/image.size.width;
             } else {
                 imageWH = (PanoramaGuideViewWOrH * image.size.width)/image.size.height;
@@ -260,7 +489,7 @@ CGFloat const PanoramaGuideViewWOrH = 120;
     //    UIImage *resultImage = [self showDir:dir image:image];
         self.showImageView.image = image;
         [UIView animateWithDuration:.15 animations:^{
-            switch (dir) {
+            switch (self.currentDirection) {
                 case PanoramaOrientationViewDown: {
                     [self.showImageView mas_remakeConstraints:^(MASConstraintMaker *make) {
                         make.height.mas_equalTo(imageWH);
@@ -523,13 +752,13 @@ CGFloat const PanoramaGuideViewWOrH = 120;
     if (_label == nil) {
         NSAttributedString *att = [[NSAttributedString alloc]initWithString:@"请沿箭头方向匀速拍摄"];
         _label = [[YYLabel alloc]init];
-        _label.numberOfLines = 0;
+//        _label.numberOfLines = 0;
         _label.backgroundColor = [UIColor jk_colorWithHexString:@"000000" andAlpha:0.35];
         _label.attributedText = att;
         _label.textAlignment = NSTextAlignmentCenter;
         _label.layer.cornerRadius = 3;
         _label.layer.masksToBounds = YES;
-        _label.textVerticalAlignment = YYTextVerticalAlignmentCenter; // 文字置顶显示
+//        _label.textVerticalAlignment = YYTextVerticalAlignmentCenter; // 文字置顶显示
         _label.textColor = UIColor.whiteColor;
     }
     return _label;

+ 6 - 6
LenzCameraNativeModuleForRN/Classes/inner/VC.storyboard

@@ -120,14 +120,14 @@
                                 <color key="textColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
                                 <nil key="highlightedColor"/>
                             </label>
-                            <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="单拍模式" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="47K-Og-STx">
-                                <rect key="frame" x="180.5" y="83" width="53.5" height="16"/>
+                            <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="单拍模式" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="47K-Og-STx">
+                                <rect key="frame" x="180.5" y="76" width="53.5" height="16"/>
                                 <fontDescription key="fontDescription" type="system" pointSize="13"/>
                                 <color key="textColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
                                 <nil key="highlightedColor"/>
                             </label>
-                            <label hidden="YES" opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="00:00:00" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="NZ4-JN-bQc" customClass="TimerLabel">
-                                <rect key="frame" x="161.5" y="80.5" width="91" height="21"/>
+                            <label hidden="YES" opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="00:00:00" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="NZ4-JN-bQc" customClass="TimerLabel">
+                                <rect key="frame" x="161.5" y="76" width="91" height="21"/>
                                 <color key="backgroundColor" red="0.92156862750000001" green="0.3294117647" blue="0.27450980390000002" alpha="1" colorSpace="calibratedRGB"/>
                                 <constraints>
                                     <constraint firstAttribute="width" constant="91" id="02u-b1-BAs"/>
@@ -155,7 +155,6 @@
                         <constraints>
                             <constraint firstAttribute="bottom" secondItem="382-n1-wn0" secondAttribute="bottom" id="41e-a5-Rhk"/>
                             <constraint firstAttribute="bottom" secondItem="LOu-Cg-zR1" secondAttribute="bottom" id="5l5-XK-lrO"/>
-                            <constraint firstItem="47K-Og-STx" firstAttribute="centerY" secondItem="7WQ-5N-eNK" secondAttribute="centerY" id="7bB-6b-Sqm"/>
                             <constraint firstItem="WFx-Yh-LWF" firstAttribute="leading" secondItem="i1l-LJ-al9" secondAttribute="trailing" constant="20" id="8kj-ul-AME"/>
                             <constraint firstItem="ff6-rt-big" firstAttribute="centerX" secondItem="7Gh-4U-PQm" secondAttribute="centerX" id="ARf-Ve-LgG"/>
                             <constraint firstItem="382-n1-wn0" firstAttribute="left" secondItem="5EZ-qb-Rvc" secondAttribute="left" id="B1P-ne-I0C"/>
@@ -163,12 +162,13 @@
                             <constraint firstItem="47K-Og-STx" firstAttribute="centerX" secondItem="vDu-zF-Fre" secondAttribute="centerX" id="DK1-Lo-FAP"/>
                             <constraint firstItem="EmB-uD-8uJ" firstAttribute="top" secondItem="7WQ-5N-eNK" secondAttribute="bottom" constant="15" id="Iq8-vC-N7k"/>
                             <constraint firstItem="sWX-pF-oOq" firstAttribute="trailing" secondItem="vDu-zF-Fre" secondAttribute="trailing" id="Jv5-CI-Yvb"/>
-                            <constraint firstItem="NZ4-JN-bQc" firstAttribute="centerY" secondItem="47K-Og-STx" secondAttribute="centerY" id="L9e-77-Ok0"/>
+                            <constraint firstItem="NZ4-JN-bQc" firstAttribute="centerY" secondItem="47K-Og-STx" secondAttribute="centerY" constant="2.5" id="L9e-77-Ok0"/>
                             <constraint firstItem="ce1-TG-wkP" firstAttribute="bottom" secondItem="7Lp-cE-Qcw" secondAttribute="bottom" constant="30" id="Nly-xH-jfA"/>
                             <constraint firstItem="Cid-tw-AOV" firstAttribute="leading" secondItem="WFx-Yh-LWF" secondAttribute="trailing" constant="20" id="OL4-05-0Ol"/>
                             <constraint firstItem="vDu-zF-Fre" firstAttribute="bottom" secondItem="WFx-Yh-LWF" secondAttribute="bottom" constant="10" id="OXQ-zM-yde"/>
                             <constraint firstItem="382-n1-wn0" firstAttribute="top" secondItem="5EZ-qb-Rvc" secondAttribute="top" id="RGg-qC-cd7"/>
                             <constraint firstItem="WFx-Yh-LWF" firstAttribute="centerX" secondItem="vDu-zF-Fre" secondAttribute="centerX" id="S4u-BR-VM5"/>
+                            <constraint firstItem="47K-Og-STx" firstAttribute="top" secondItem="vDu-zF-Fre" secondAttribute="top" constant="32" id="aVZ-Rs-yOB"/>
                             <constraint firstAttribute="trailing" secondItem="LOu-Cg-zR1" secondAttribute="trailing" id="b2S-Sj-Lok"/>
                             <constraint firstItem="7Gh-4U-PQm" firstAttribute="leading" secondItem="vDu-zF-Fre" secondAttribute="leading" constant="15" id="b4o-2a-J3u"/>
                             <constraint firstItem="YjN-bX-F51" firstAttribute="centerY" secondItem="WFx-Yh-LWF" secondAttribute="centerY" id="cLt-R6-oCd"/>