ShelbyLee пре 1 година
родитељ
комит
353acaa621
28 измењених фајлова са 551 додато и 406 уклоњено
  1. 5 5
      Example/LenzCameraNativeModuleForRN.xcodeproj/project.pbxproj
  2. 88 0
      Example/LenzCameraNativeModuleForRN.xcodeproj/xcshareddata/xcschemes/LenzCameraNativeModuleForRN_Example.xcscheme
  3. 3 3
      Example/Podfile.lock
  4. 0 1
      Example/Pods/Headers/Private/LenzSDK/AVCapturePhotoOutput+VersionAdaptor.h
  5. 0 1
      Example/Pods/Headers/Private/LenzSDK/TensorFlowWrapper.h
  6. 0 1
      Example/Pods/Headers/Private/LenzSDK/cpp-headers.h
  7. 6 3
      Example/Pods/Local Podspecs/LenzSDK.podspec.json
  8. 3 3
      Example/Pods/Manifest.lock
  9. 358 349
      Example/Pods/Pods.xcodeproj/project.pbxproj
  10. 0 1
      Example/Pods/Target Support Files/LenzSDK/LenzSDK.debug.xcconfig
  11. 0 1
      Example/Pods/Target Support Files/LenzSDK/LenzSDK.release.xcconfig
  12. 2 2
      Example/Pods/Target Support Files/LenzSDK/ResourceBundle-LenzCameraNativeModuleForRN-LenzSDK-Info.plist
  13. 0 1
      Example/Pods/Target Support Files/Masonry/Masonry.debug.xcconfig
  14. 0 1
      Example/Pods/Target Support Files/Masonry/Masonry.release.xcconfig
  15. 0 1
      Example/Pods/Target Support Files/OpenCV2/OpenCV2.debug.xcconfig
  16. 0 1
      Example/Pods/Target Support Files/OpenCV2/OpenCV2.release.xcconfig
  17. 1 1
      Example/Pods/Target Support Files/Pods-LenzCameraNativeModuleForRN_Example/Pods-LenzCameraNativeModuleForRN_Example.debug.xcconfig
  18. 1 1
      Example/Pods/Target Support Files/Pods-LenzCameraNativeModuleForRN_Example/Pods-LenzCameraNativeModuleForRN_Example.release.xcconfig
  19. 0 1
      Example/Pods/Target Support Files/SVProgressHUD/SVProgressHUD.debug.xcconfig
  20. 0 1
      Example/Pods/Target Support Files/SVProgressHUD/SVProgressHUD.release.xcconfig
  21. 0 1
      Example/Pods/Target Support Files/TensorFlowLite/TensorFlowLite.debug.xcconfig
  22. 0 1
      Example/Pods/Target Support Files/TensorFlowLite/TensorFlowLite.release.xcconfig
  23. 0 1
      Example/Pods/Target Support Files/YYText/YYText.debug.xcconfig
  24. 0 1
      Example/Pods/Target Support Files/YYText/YYText.release.xcconfig
  25. 2 2
      LenzCameraNativeModuleForRN/Classes/inner/CameraManager/CameraManager.h
  26. 20 5
      LenzCameraNativeModuleForRN/Classes/inner/CameraManager/CameraManager.m
  27. 15 13
      LenzCameraNativeModuleForRN/Classes/inner/PCSBaseViewController/PCSBaseViewController.m
  28. 47 4
      LenzCameraNativeModuleForRN/Classes/inner/PCSBaseViewController/PCSPreviewViewController.m

+ 5 - 5
Example/LenzCameraNativeModuleForRN.xcodeproj/project.pbxproj

@@ -229,7 +229,7 @@
 				ORGANIZATIONNAME = "76930516@qq.com";
 				TargetAttributes = {
 					6003F589195388D20070C39A = {
-						DevelopmentTeam = 67B22KAY34;
+						DevelopmentTeam = 75H2833F9T;
 					};
 					6003F5AD195388D20070C39A = {
 						TestTargetID = 6003F589195388D20070C39A;
@@ -458,7 +458,7 @@
 			baseConfigurationReference = 81A8808FD3706FAD151017C8 /* Pods-LenzCameraNativeModuleForRN_Example.debug.xcconfig */;
 			buildSettings = {
 				ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
-				DEVELOPMENT_TEAM = 67B22KAY34;
+				DEVELOPMENT_TEAM = 75H2833F9T;
 				ENABLE_BITCODE = NO;
 				GCC_PRECOMPILE_PREFIX_HEADER = YES;
 				GCC_PREFIX_HEADER = "LenzCameraNativeModuleForRN/LenzCameraNativeModuleForRN-Prefix.pch";
@@ -466,7 +466,7 @@
 				IPHONEOS_DEPLOYMENT_TARGET = 12.0;
 				MODULE_NAME = ExampleApp;
 				ONLY_ACTIVE_ARCH = NO;
-				PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.demo.${PRODUCT_NAME:rfc1034identifier}";
+				PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.demo.1111;
 				PRODUCT_NAME = "$(TARGET_NAME)";
 				SWIFT_VERSION = 4.0;
 				WRAPPER_EXTENSION = app;
@@ -478,14 +478,14 @@
 			baseConfigurationReference = 47F785DCE1254FC6EEB075B7 /* Pods-LenzCameraNativeModuleForRN_Example.release.xcconfig */;
 			buildSettings = {
 				ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
-				DEVELOPMENT_TEAM = 67B22KAY34;
+				DEVELOPMENT_TEAM = 75H2833F9T;
 				ENABLE_BITCODE = NO;
 				GCC_PRECOMPILE_PREFIX_HEADER = YES;
 				GCC_PREFIX_HEADER = "LenzCameraNativeModuleForRN/LenzCameraNativeModuleForRN-Prefix.pch";
 				INFOPLIST_FILE = "LenzCameraNativeModuleForRN/LenzCameraNativeModuleForRN-Info.plist";
 				IPHONEOS_DEPLOYMENT_TARGET = 12.0;
 				MODULE_NAME = ExampleApp;
-				PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.demo.${PRODUCT_NAME:rfc1034identifier}";
+				PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.demo.1111;
 				PRODUCT_NAME = "$(TARGET_NAME)";
 				SWIFT_VERSION = 4.0;
 				WRAPPER_EXTENSION = app;

+ 88 - 0
Example/LenzCameraNativeModuleForRN.xcodeproj/xcshareddata/xcschemes/LenzCameraNativeModuleForRN_Example.xcscheme

@@ -0,0 +1,88 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<Scheme
+   LastUpgradeVersion = "1420"
+   version = "1.3">
+   <BuildAction
+      parallelizeBuildables = "YES"
+      buildImplicitDependencies = "YES">
+      <BuildActionEntries>
+         <BuildActionEntry
+            buildForTesting = "YES"
+            buildForRunning = "YES"
+            buildForProfiling = "YES"
+            buildForArchiving = "YES"
+            buildForAnalyzing = "YES">
+            <BuildableReference
+               BuildableIdentifier = "primary"
+               BlueprintIdentifier = "6003F589195388D20070C39A"
+               BuildableName = "LenzCameraNativeModuleForRN_Example.app"
+               BlueprintName = "LenzCameraNativeModuleForRN_Example"
+               ReferencedContainer = "container:LenzCameraNativeModuleForRN.xcodeproj">
+            </BuildableReference>
+         </BuildActionEntry>
+      </BuildActionEntries>
+   </BuildAction>
+   <TestAction
+      buildConfiguration = "Debug"
+      selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
+      selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
+      shouldUseLaunchSchemeArgsEnv = "YES">
+      <Testables>
+         <TestableReference
+            skipped = "NO">
+            <BuildableReference
+               BuildableIdentifier = "primary"
+               BlueprintIdentifier = "6003F5AD195388D20070C39A"
+               BuildableName = "LenzCameraNativeModuleForRN_Tests.xctest"
+               BlueprintName = "LenzCameraNativeModuleForRN_Tests"
+               ReferencedContainer = "container:LenzCameraNativeModuleForRN.xcodeproj">
+            </BuildableReference>
+         </TestableReference>
+      </Testables>
+   </TestAction>
+   <LaunchAction
+      buildConfiguration = "Debug"
+      selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
+      selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
+      launchStyle = "0"
+      useCustomWorkingDirectory = "NO"
+      ignoresPersistentStateOnLaunch = "NO"
+      debugDocumentVersioning = "YES"
+      debugServiceExtension = "internal"
+      allowLocationSimulation = "YES">
+      <BuildableProductRunnable
+         runnableDebuggingMode = "0">
+         <BuildableReference
+            BuildableIdentifier = "primary"
+            BlueprintIdentifier = "6003F589195388D20070C39A"
+            BuildableName = "LenzCameraNativeModuleForRN_Example.app"
+            BlueprintName = "LenzCameraNativeModuleForRN_Example"
+            ReferencedContainer = "container:LenzCameraNativeModuleForRN.xcodeproj">
+         </BuildableReference>
+      </BuildableProductRunnable>
+   </LaunchAction>
+   <ProfileAction
+      buildConfiguration = "Release"
+      shouldUseLaunchSchemeArgsEnv = "YES"
+      savedToolIdentifier = ""
+      useCustomWorkingDirectory = "NO"
+      debugDocumentVersioning = "YES">
+      <BuildableProductRunnable
+         runnableDebuggingMode = "0">
+         <BuildableReference
+            BuildableIdentifier = "primary"
+            BlueprintIdentifier = "6003F589195388D20070C39A"
+            BuildableName = "LenzCameraNativeModuleForRN_Example.app"
+            BlueprintName = "LenzCameraNativeModuleForRN_Example"
+            ReferencedContainer = "container:LenzCameraNativeModuleForRN.xcodeproj">
+         </BuildableReference>
+      </BuildableProductRunnable>
+   </ProfileAction>
+   <AnalyzeAction
+      buildConfiguration = "Debug">
+   </AnalyzeAction>
+   <ArchiveAction
+      buildConfiguration = "Release"
+      revealArchiveInOrganizer = "YES">
+   </ArchiveAction>
+</Scheme>

+ 3 - 3
Example/Podfile.lock

@@ -1,5 +1,5 @@
 PODS:
-  - LenzSDK (2.0.0):
+  - LenzSDK (2.0.2):
     - Masonry (= 1.1.0)
     - OpenCV2 (~> 4.3.0)
     - SVProgressHUD (~> 2.2.5)
@@ -27,7 +27,7 @@ EXTERNAL SOURCES:
     :path: "../"
 
 SPEC CHECKSUMS:
-  LenzSDK: e7a4797dfdbd6e488154732cc420fc99e039303a
+  LenzSDK: 672f2c6591a36d4f7363d2b15e104cca2d174cb4
   Masonry: 678fab65091a9290e40e2832a55e7ab731aad201
   OpenCV2: ffe82e5cb5d16dc3fc01a5f4127b9a5b3cfc7d1b
   SVProgressHUD: 1428aafac632c1f86f62aa4243ec12008d7a51d6
@@ -36,4 +36,4 @@ SPEC CHECKSUMS:
 
 PODFILE CHECKSUM: f8660327f30df4f83ec7f995197d24d81b17c6e1
 
-COCOAPODS: 1.12.0
+COCOAPODS: 1.11.3

+ 0 - 1
Example/Pods/Headers/Private/LenzSDK/AVCapturePhotoOutput+VersionAdaptor.h

@@ -1 +0,0 @@
-../../../../../LenzCameraNativeModuleForRN/Classes/inner/Exts/AVCapturePhotoOutput+VersionAdaptor.h

+ 0 - 1
Example/Pods/Headers/Private/LenzSDK/TensorFlowWrapper.h

@@ -1 +0,0 @@
-../../../../../LenzCameraNativeModuleForRN/Classes/inner/TensorFlow/TensorFlowWrapper.h

+ 0 - 1
Example/Pods/Headers/Private/LenzSDK/cpp-headers.h

@@ -1 +0,0 @@
-../../../../../LenzCameraNativeModuleForRN/Classes/inner/cpp-headers.h

+ 6 - 3
Example/Pods/Local Podspecs/LenzSDK.podspec.json

@@ -1,6 +1,6 @@
 {
   "name": "LenzSDK",
-  "version": "2.0.0",
+  "version": "2.0.2",
   "summary": "A short description of LenzSDK.",
   "description": "this  is the long description",
   "homepage": "http://39.96.8.150:10080/l405023944/LenzSDK_iOS.git",
@@ -13,7 +13,7 @@
   },
   "source": {
     "git": "http://39.96.8.150:10080/l405023944/LenzSDK_iOS.git",
-    "tag": "2.0.0"
+    "tag": "2.0.2"
   },
   "platforms": {
     "ios": "11.0"
@@ -43,7 +43,10 @@
     "AVFoundation",
     "CoreMedia"
   ],
-  "vendored_frameworks": "LenzStitchSDK.framework",
+  "vendored_frameworks": [
+    "LenzTensorFlowSDK.framework",
+    "LenzStitchSDK.framework"
+  ],
   "libraries": [
     "c++",
     "z"

+ 3 - 3
Example/Pods/Manifest.lock

@@ -1,5 +1,5 @@
 PODS:
-  - LenzSDK (2.0.0):
+  - LenzSDK (2.0.2):
     - Masonry (= 1.1.0)
     - OpenCV2 (~> 4.3.0)
     - SVProgressHUD (~> 2.2.5)
@@ -27,7 +27,7 @@ EXTERNAL SOURCES:
     :path: "../"
 
 SPEC CHECKSUMS:
-  LenzSDK: e7a4797dfdbd6e488154732cc420fc99e039303a
+  LenzSDK: 672f2c6591a36d4f7363d2b15e104cca2d174cb4
   Masonry: 678fab65091a9290e40e2832a55e7ab731aad201
   OpenCV2: ffe82e5cb5d16dc3fc01a5f4127b9a5b3cfc7d1b
   SVProgressHUD: 1428aafac632c1f86f62aa4243ec12008d7a51d6
@@ -36,4 +36,4 @@ SPEC CHECKSUMS:
 
 PODFILE CHECKSUM: f8660327f30df4f83ec7f995197d24d81b17c6e1
 
-COCOAPODS: 1.12.0
+COCOAPODS: 1.11.3

Разлика између датотеке није приказан због своје велике величине
+ 358 - 349
Example/Pods/Pods.xcodeproj/project.pbxproj


+ 0 - 1
Example/Pods/Target Support Files/LenzSDK/LenzSDK.debug.xcconfig

@@ -5,7 +5,6 @@ GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1
 HEADER_SEARCH_PATHS = $(inherited) "${PODS_ROOT}/Headers/Private" "${PODS_ROOT}/Headers/Private/LenzSDK" "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/LenzSDK" "${PODS_ROOT}/Headers/Public/Masonry" "${PODS_ROOT}/Headers/Public/SVProgressHUD" "${PODS_ROOT}/Headers/Public/YYText"
 PODS_BUILD_DIR = ${BUILD_DIR}
 PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)
-PODS_DEVELOPMENT_LANGUAGE = ${DEVELOPMENT_LANGUAGE}
 PODS_ROOT = ${SRCROOT}
 PODS_TARGET_SRCROOT = ${PODS_ROOT}/../..
 PODS_XCFRAMEWORKS_BUILD_DIR = $(PODS_CONFIGURATION_BUILD_DIR)/XCFrameworkIntermediates

+ 0 - 1
Example/Pods/Target Support Files/LenzSDK/LenzSDK.release.xcconfig

@@ -5,7 +5,6 @@ GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1
 HEADER_SEARCH_PATHS = $(inherited) "${PODS_ROOT}/Headers/Private" "${PODS_ROOT}/Headers/Private/LenzSDK" "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/LenzSDK" "${PODS_ROOT}/Headers/Public/Masonry" "${PODS_ROOT}/Headers/Public/SVProgressHUD" "${PODS_ROOT}/Headers/Public/YYText"
 PODS_BUILD_DIR = ${BUILD_DIR}
 PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)
-PODS_DEVELOPMENT_LANGUAGE = ${DEVELOPMENT_LANGUAGE}
 PODS_ROOT = ${SRCROOT}
 PODS_TARGET_SRCROOT = ${PODS_ROOT}/../..
 PODS_XCFRAMEWORKS_BUILD_DIR = $(PODS_CONFIGURATION_BUILD_DIR)/XCFrameworkIntermediates

+ 2 - 2
Example/Pods/Target Support Files/LenzSDK/ResourceBundle-LenzCameraNativeModuleForRN-LenzSDK-Info.plist

@@ -3,7 +3,7 @@
 <plist version="1.0">
 <dict>
   <key>CFBundleDevelopmentRegion</key>
-  <string>${PODS_DEVELOPMENT_LANGUAGE}</string>
+  <string>en</string>
   <key>CFBundleIdentifier</key>
   <string>${PRODUCT_BUNDLE_IDENTIFIER}</string>
   <key>CFBundleInfoDictionaryVersion</key>
@@ -13,7 +13,7 @@
   <key>CFBundlePackageType</key>
   <string>BNDL</string>
   <key>CFBundleShortVersionString</key>
-  <string>2.0.0</string>
+  <string>2.0.2</string>
   <key>CFBundleSignature</key>
   <string>????</string>
   <key>CFBundleVersion</key>

+ 0 - 1
Example/Pods/Target Support Files/Masonry/Masonry.debug.xcconfig

@@ -4,7 +4,6 @@ GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1
 HEADER_SEARCH_PATHS = $(inherited) "${PODS_ROOT}/Headers/Private" "${PODS_ROOT}/Headers/Private/Masonry" "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/Masonry"
 PODS_BUILD_DIR = ${BUILD_DIR}
 PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)
-PODS_DEVELOPMENT_LANGUAGE = ${DEVELOPMENT_LANGUAGE}
 PODS_ROOT = ${SRCROOT}
 PODS_TARGET_SRCROOT = ${PODS_ROOT}/Masonry
 PODS_XCFRAMEWORKS_BUILD_DIR = $(PODS_CONFIGURATION_BUILD_DIR)/XCFrameworkIntermediates

+ 0 - 1
Example/Pods/Target Support Files/Masonry/Masonry.release.xcconfig

@@ -4,7 +4,6 @@ GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1
 HEADER_SEARCH_PATHS = $(inherited) "${PODS_ROOT}/Headers/Private" "${PODS_ROOT}/Headers/Private/Masonry" "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/Masonry"
 PODS_BUILD_DIR = ${BUILD_DIR}
 PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)
-PODS_DEVELOPMENT_LANGUAGE = ${DEVELOPMENT_LANGUAGE}
 PODS_ROOT = ${SRCROOT}
 PODS_TARGET_SRCROOT = ${PODS_ROOT}/Masonry
 PODS_XCFRAMEWORKS_BUILD_DIR = $(PODS_CONFIGURATION_BUILD_DIR)/XCFrameworkIntermediates

+ 0 - 1
Example/Pods/Target Support Files/OpenCV2/OpenCV2.debug.xcconfig

@@ -4,7 +4,6 @@ FRAMEWORK_SEARCH_PATHS = $(inherited) "${PODS_ROOT}/OpenCV2"
 GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1
 PODS_BUILD_DIR = ${BUILD_DIR}
 PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)
-PODS_DEVELOPMENT_LANGUAGE = ${DEVELOPMENT_LANGUAGE}
 PODS_ROOT = ${SRCROOT}
 PODS_TARGET_SRCROOT = ${PODS_ROOT}/OpenCV2
 PODS_XCFRAMEWORKS_BUILD_DIR = $(PODS_CONFIGURATION_BUILD_DIR)/XCFrameworkIntermediates

+ 0 - 1
Example/Pods/Target Support Files/OpenCV2/OpenCV2.release.xcconfig

@@ -4,7 +4,6 @@ FRAMEWORK_SEARCH_PATHS = $(inherited) "${PODS_ROOT}/OpenCV2"
 GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1
 PODS_BUILD_DIR = ${BUILD_DIR}
 PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)
-PODS_DEVELOPMENT_LANGUAGE = ${DEVELOPMENT_LANGUAGE}
 PODS_ROOT = ${SRCROOT}
 PODS_TARGET_SRCROOT = ${PODS_ROOT}/OpenCV2
 PODS_XCFRAMEWORKS_BUILD_DIR = $(PODS_CONFIGURATION_BUILD_DIR)/XCFrameworkIntermediates

+ 1 - 1
Example/Pods/Target Support Files/Pods-LenzCameraNativeModuleForRN_Example/Pods-LenzCameraNativeModuleForRN_Example.debug.xcconfig

@@ -3,7 +3,7 @@ FRAMEWORK_SEARCH_PATHS = $(inherited) "${PODS_ROOT}/../.." "${PODS_ROOT}/OpenCV2
 GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1
 HEADER_SEARCH_PATHS = $(inherited) "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/LenzSDK" "${PODS_ROOT}/Headers/Public/Masonry" "${PODS_ROOT}/Headers/Public/SVProgressHUD" "${PODS_ROOT}/Headers/Public/YYText" '${SRCROOT}/Pods/TensorFlowLite/Frameworks/tensorflow_lite.framework/Headers'
 LIBRARY_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/LenzSDK" "${PODS_CONFIGURATION_BUILD_DIR}/Masonry" "${PODS_CONFIGURATION_BUILD_DIR}/SVProgressHUD" "${PODS_CONFIGURATION_BUILD_DIR}/YYText"
-OTHER_LDFLAGS = $(inherited) -L ${SRCROOT}/Pods/TensorFlowLite/Frameworks/tensorflow_lite.framework -ObjC -l"LenzSDK" -l"Masonry" -l"SVProgressHUD" -l"YYText" -l"c++" -l"stdc++" -l"z" -framework "AVFoundation" -framework "Accelerate" -framework "AdSupport" -framework "AssetsLibrary" -framework "CoreData" -framework "CoreFoundation" -framework "CoreGraphics" -framework "CoreImage" -framework "CoreMedia" -framework "CoreMotion" -framework "CoreServices" -framework "CoreTelephony" -framework "CoreText" -framework "CoreVideo" -framework "Foundation" -framework "LenzStitchSDK" -framework "MapKit" -framework "MediaPlayer" -framework "MobileCoreServices" -framework "Photos" -framework "QuartzCore" -framework "SystemConfiguration" -framework "UIKit" -framework "WebKit" -framework "opencv2" -framework "tensorflow_lite" -force_load ${SRCROOT}/Pods/TensorFlowLite/Frameworks/tensorflow_lite.framework/tensorflow_lite
+OTHER_LDFLAGS = $(inherited) -L ${SRCROOT}/Pods/TensorFlowLite/Frameworks/tensorflow_lite.framework -ObjC -l"LenzSDK" -l"Masonry" -l"SVProgressHUD" -l"YYText" -l"c++" -l"stdc++" -l"z" -framework "AVFoundation" -framework "Accelerate" -framework "AdSupport" -framework "AssetsLibrary" -framework "CoreData" -framework "CoreFoundation" -framework "CoreGraphics" -framework "CoreImage" -framework "CoreMedia" -framework "CoreMotion" -framework "CoreServices" -framework "CoreTelephony" -framework "CoreText" -framework "CoreVideo" -framework "Foundation" -framework "LenzStitchSDK" -framework "LenzTensorFlowSDK" -framework "MapKit" -framework "MediaPlayer" -framework "MobileCoreServices" -framework "Photos" -framework "QuartzCore" -framework "SystemConfiguration" -framework "UIKit" -framework "WebKit" -framework "opencv2" -framework "tensorflow_lite" -force_load ${SRCROOT}/Pods/TensorFlowLite/Frameworks/tensorflow_lite.framework/tensorflow_lite
 PODS_BUILD_DIR = ${BUILD_DIR}
 PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)
 PODS_PODFILE_DIR_PATH = ${SRCROOT}/.

+ 1 - 1
Example/Pods/Target Support Files/Pods-LenzCameraNativeModuleForRN_Example/Pods-LenzCameraNativeModuleForRN_Example.release.xcconfig

@@ -3,7 +3,7 @@ FRAMEWORK_SEARCH_PATHS = $(inherited) "${PODS_ROOT}/../.." "${PODS_ROOT}/OpenCV2
 GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1
 HEADER_SEARCH_PATHS = $(inherited) "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/LenzSDK" "${PODS_ROOT}/Headers/Public/Masonry" "${PODS_ROOT}/Headers/Public/SVProgressHUD" "${PODS_ROOT}/Headers/Public/YYText" '${SRCROOT}/Pods/TensorFlowLite/Frameworks/tensorflow_lite.framework/Headers'
 LIBRARY_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/LenzSDK" "${PODS_CONFIGURATION_BUILD_DIR}/Masonry" "${PODS_CONFIGURATION_BUILD_DIR}/SVProgressHUD" "${PODS_CONFIGURATION_BUILD_DIR}/YYText"
-OTHER_LDFLAGS = $(inherited) -L ${SRCROOT}/Pods/TensorFlowLite/Frameworks/tensorflow_lite.framework -ObjC -l"LenzSDK" -l"Masonry" -l"SVProgressHUD" -l"YYText" -l"c++" -l"stdc++" -l"z" -framework "AVFoundation" -framework "Accelerate" -framework "AdSupport" -framework "AssetsLibrary" -framework "CoreData" -framework "CoreFoundation" -framework "CoreGraphics" -framework "CoreImage" -framework "CoreMedia" -framework "CoreMotion" -framework "CoreServices" -framework "CoreTelephony" -framework "CoreText" -framework "CoreVideo" -framework "Foundation" -framework "LenzStitchSDK" -framework "MapKit" -framework "MediaPlayer" -framework "MobileCoreServices" -framework "Photos" -framework "QuartzCore" -framework "SystemConfiguration" -framework "UIKit" -framework "WebKit" -framework "opencv2" -framework "tensorflow_lite" -force_load ${SRCROOT}/Pods/TensorFlowLite/Frameworks/tensorflow_lite.framework/tensorflow_lite
+OTHER_LDFLAGS = $(inherited) -L ${SRCROOT}/Pods/TensorFlowLite/Frameworks/tensorflow_lite.framework -ObjC -l"LenzSDK" -l"Masonry" -l"SVProgressHUD" -l"YYText" -l"c++" -l"stdc++" -l"z" -framework "AVFoundation" -framework "Accelerate" -framework "AdSupport" -framework "AssetsLibrary" -framework "CoreData" -framework "CoreFoundation" -framework "CoreGraphics" -framework "CoreImage" -framework "CoreMedia" -framework "CoreMotion" -framework "CoreServices" -framework "CoreTelephony" -framework "CoreText" -framework "CoreVideo" -framework "Foundation" -framework "LenzStitchSDK" -framework "LenzTensorFlowSDK" -framework "MapKit" -framework "MediaPlayer" -framework "MobileCoreServices" -framework "Photos" -framework "QuartzCore" -framework "SystemConfiguration" -framework "UIKit" -framework "WebKit" -framework "opencv2" -framework "tensorflow_lite" -force_load ${SRCROOT}/Pods/TensorFlowLite/Frameworks/tensorflow_lite.framework/tensorflow_lite
 PODS_BUILD_DIR = ${BUILD_DIR}
 PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)
 PODS_PODFILE_DIR_PATH = ${SRCROOT}/.

+ 0 - 1
Example/Pods/Target Support Files/SVProgressHUD/SVProgressHUD.debug.xcconfig

@@ -4,7 +4,6 @@ GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1
 HEADER_SEARCH_PATHS = $(inherited) "${PODS_ROOT}/Headers/Private" "${PODS_ROOT}/Headers/Private/SVProgressHUD" "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/SVProgressHUD"
 PODS_BUILD_DIR = ${BUILD_DIR}
 PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)
-PODS_DEVELOPMENT_LANGUAGE = ${DEVELOPMENT_LANGUAGE}
 PODS_ROOT = ${SRCROOT}
 PODS_TARGET_SRCROOT = ${PODS_ROOT}/SVProgressHUD
 PODS_XCFRAMEWORKS_BUILD_DIR = $(PODS_CONFIGURATION_BUILD_DIR)/XCFrameworkIntermediates

+ 0 - 1
Example/Pods/Target Support Files/SVProgressHUD/SVProgressHUD.release.xcconfig

@@ -4,7 +4,6 @@ GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1
 HEADER_SEARCH_PATHS = $(inherited) "${PODS_ROOT}/Headers/Private" "${PODS_ROOT}/Headers/Private/SVProgressHUD" "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/SVProgressHUD"
 PODS_BUILD_DIR = ${BUILD_DIR}
 PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)
-PODS_DEVELOPMENT_LANGUAGE = ${DEVELOPMENT_LANGUAGE}
 PODS_ROOT = ${SRCROOT}
 PODS_TARGET_SRCROOT = ${PODS_ROOT}/SVProgressHUD
 PODS_XCFRAMEWORKS_BUILD_DIR = $(PODS_CONFIGURATION_BUILD_DIR)/XCFrameworkIntermediates

+ 0 - 1
Example/Pods/Target Support Files/TensorFlowLite/TensorFlowLite.debug.xcconfig

@@ -6,7 +6,6 @@ HEADER_SEARCH_PATHS = $(inherited) '${SRCROOT}/Pods/TensorFlowLite/Frameworks/te
 OTHER_LDFLAGS = $(inherited) -L ${SRCROOT}/Pods/TensorFlowLite/Frameworks/tensorflow_lite.framework -force_load ${SRCROOT}/Pods/TensorFlowLite/Frameworks/tensorflow_lite.framework/tensorflow_lite
 PODS_BUILD_DIR = ${BUILD_DIR}
 PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)
-PODS_DEVELOPMENT_LANGUAGE = ${DEVELOPMENT_LANGUAGE}
 PODS_ROOT = ${SRCROOT}
 PODS_TARGET_SRCROOT = ${PODS_ROOT}/TensorFlowLite
 PODS_XCFRAMEWORKS_BUILD_DIR = $(PODS_CONFIGURATION_BUILD_DIR)/XCFrameworkIntermediates

+ 0 - 1
Example/Pods/Target Support Files/TensorFlowLite/TensorFlowLite.release.xcconfig

@@ -6,7 +6,6 @@ HEADER_SEARCH_PATHS = $(inherited) '${SRCROOT}/Pods/TensorFlowLite/Frameworks/te
 OTHER_LDFLAGS = $(inherited) -L ${SRCROOT}/Pods/TensorFlowLite/Frameworks/tensorflow_lite.framework -force_load ${SRCROOT}/Pods/TensorFlowLite/Frameworks/tensorflow_lite.framework/tensorflow_lite
 PODS_BUILD_DIR = ${BUILD_DIR}
 PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)
-PODS_DEVELOPMENT_LANGUAGE = ${DEVELOPMENT_LANGUAGE}
 PODS_ROOT = ${SRCROOT}
 PODS_TARGET_SRCROOT = ${PODS_ROOT}/TensorFlowLite
 PODS_XCFRAMEWORKS_BUILD_DIR = $(PODS_CONFIGURATION_BUILD_DIR)/XCFrameworkIntermediates

+ 0 - 1
Example/Pods/Target Support Files/YYText/YYText.debug.xcconfig

@@ -4,7 +4,6 @@ GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1
 HEADER_SEARCH_PATHS = $(inherited) "${PODS_ROOT}/Headers/Private" "${PODS_ROOT}/Headers/Private/YYText" "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/YYText"
 PODS_BUILD_DIR = ${BUILD_DIR}
 PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)
-PODS_DEVELOPMENT_LANGUAGE = ${DEVELOPMENT_LANGUAGE}
 PODS_ROOT = ${SRCROOT}
 PODS_TARGET_SRCROOT = ${PODS_ROOT}/YYText
 PODS_XCFRAMEWORKS_BUILD_DIR = $(PODS_CONFIGURATION_BUILD_DIR)/XCFrameworkIntermediates

+ 0 - 1
Example/Pods/Target Support Files/YYText/YYText.release.xcconfig

@@ -4,7 +4,6 @@ GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1
 HEADER_SEARCH_PATHS = $(inherited) "${PODS_ROOT}/Headers/Private" "${PODS_ROOT}/Headers/Private/YYText" "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/YYText"
 PODS_BUILD_DIR = ${BUILD_DIR}
 PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)
-PODS_DEVELOPMENT_LANGUAGE = ${DEVELOPMENT_LANGUAGE}
 PODS_ROOT = ${SRCROOT}
 PODS_TARGET_SRCROOT = ${PODS_ROOT}/YYText
 PODS_XCFRAMEWORKS_BUILD_DIR = $(PODS_CONFIGURATION_BUILD_DIR)/XCFrameworkIntermediates

+ 2 - 2
LenzCameraNativeModuleForRN/Classes/inner/CameraManager/CameraManager.h

@@ -7,7 +7,7 @@
 
 #import <Foundation/Foundation.h>
 #import <AVFoundation/AVFoundation.h>
-
+#import "LenzSDKConstant.h"
 NS_ASSUME_NONNULL_BEGIN
 
 @class AVCaptureDevice;
@@ -26,7 +26,7 @@ NS_ASSUME_NONNULL_BEGIN
 - (void)focusOn:(CGPoint)point;
 - (void)focusOn:(CGPoint)point device: (AVCaptureDevice*)device;
 
-- (void)setResolutionFor:(AVCaptureDevicePosition)position with: (NSInteger)desiredWidth;
+- (void)setResolutionFor:(AVCaptureDevicePosition)position with: (NSInteger)desiredWidth model:(SDKCaptureModeIndex)model;
 - (AVCaptureDevice *)cameraWithPosition:(AVCaptureDevicePosition)position;
 
 @end

+ 20 - 5
LenzCameraNativeModuleForRN/Classes/inner/CameraManager/CameraManager.m

@@ -20,7 +20,7 @@
 @synthesize front = _front;
 @synthesize back = _back;
 
-- (void)setResolutionFor:(AVCaptureDevicePosition)position with: (NSInteger)desiredWidth{
+- (void)setResolutionFor:(AVCaptureDevicePosition)position with: (NSInteger)desiredWidth model:(SDKCaptureModeIndex)model{
     
     AVCaptureDevice* device = [self cameraWithPosition:position];
     if(device == nil){
@@ -36,15 +36,30 @@
     for (AVCaptureDeviceFormat *format in supportedFormats) {
         CMVideoDimensions dimensions = CMVideoFormatDescriptionGetDimensions((CMVideoFormatDescriptionRef)[format formatDescription]);
         //分辨率
-        if (dimensions.width <= desiredWidth) {
-            if(dimensions.height > 0)
+        CGFloat radio = 16.0/9.0;
+        if(model == SDK_CAPTURE_MODE_SINGLE || model == SDK_CAPTURE_MODE_CONTINUOUS) {
+            radio = 4.0/3.0;
+        }
+        if (((CGFloat)dimensions.width/(CGFloat)dimensions.height) == radio && dimensions.width <= desiredWidth) {
+//            if(dimensions.height > 480)
+//                aspect = (CGFloat)dimensions.width / dimensions.height;
+//            bestFormat = format;
+            if(dimensions.width == 1080 && (model == SDK_CAPTURE_MODE_PANORAMA || model == SDK_CAPTURE_MODE_INTELLEGENCE_PANORAMA)) {
+                aspect = (CGFloat)dimensions.width / dimensions.height;
+                bestFormat = format;
+                break;
+            } else {
                 aspect = (CGFloat)dimensions.width / dimensions.height;
-            bestFormat = format;
+                bestFormat = format;
+            }
+
         }
     }
     
     [device lockForConfiguration:nil];
-    [device setActiveFormat:bestFormat];
+    if(bestFormat) {
+        [device setActiveFormat:bestFormat];
+    }
     
     [device setActiveVideoMaxFrameDuration:CMTimeMake(1, 10)];
     [device setActiveVideoMinFrameDuration:CMTimeMake(1, 10)];

+ 15 - 13
LenzCameraNativeModuleForRN/Classes/inner/PCSBaseViewController/PCSBaseViewController.m

@@ -617,8 +617,9 @@
         vc.modalPresentationStyle = UIModalPresentationFullScreen;
         vc.model = self.resourceModel;
         vc.selectIndex = self.mode;
+        __weak typeof(self) weakSelf = self;
         vc.dataChangeBlock = ^{
-            [self updateViewStatus];
+            [weakSelf updateViewStatus];
         };
         [self presentViewController:vc animated:YES completion:nil];
     } else {
@@ -1241,7 +1242,6 @@
 }
 
 - (BOOL)startVideoDataOutputing{
-    
     [[NSNotificationCenter defaultCenter] removeObserver:self name:PCS_NotificationNameOrientationDidChange object:nil];
     [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(orientationDidChange:) name:PCS_NotificationNameOrientationDidChange object:nil];
     UIDeviceOrientation deviceOrientation = UIDeviceOrientationPortrait;
@@ -1281,7 +1281,7 @@
         if([self configureVideoWritter]){
             AVCaptureConnection *connection = [self.videoDataOutput connectionWithMediaType:AVMediaTypeVideo];
             if ([connection isVideoStabilizationSupported]) {
-                connection.preferredVideoStabilizationMode = AVCaptureVideoStabilizationModeAuto;
+//                connection.preferredVideoStabilizationMode = AVCaptureVideoStabilizationModeAuto;
             }
             if(connection == nil){
                 return;
@@ -1454,8 +1454,8 @@
     self.cameraPrepared = YES;
     [[SDKParameters shared].items enumerateObjectsUsingBlock:^(SDKParametersItem * _Nonnull obj, NSUInteger idx, BOOL * _Nonnull stop) {
         if (obj.model == self.mode) {
-            [[CameraManager shared] setResolutionFor:AVCaptureDevicePositionBack with:obj.resolution.height];
-            [[CameraManager shared] setResolutionFor:AVCaptureDevicePositionFront with:obj.resolution.height];
+            [[CameraManager shared] setResolutionFor:AVCaptureDevicePositionBack with:obj.resolution.height model:self.mode];
+            [[CameraManager shared] setResolutionFor:AVCaptureDevicePositionFront with:obj.resolution.height model:self.mode];
         }
     }];
     
@@ -1558,7 +1558,7 @@
             self.switchButton.hidden = NO;
             self.panoramaGuideView.hidden = YES;
             self.panoramOrientationGuideView.hidden = YES;
-            self.previewLayer.frame = self.view.layer.bounds;
+            self.previewLayer.frame = CGRectMake(0, (height - width*16/9)/2, width, width*16/9);
 
         }
             
@@ -1567,7 +1567,7 @@
             self.switchButton.hidden = YES;
             self.panoramaGuideView.hidden = NO;
             self.panoramOrientationGuideView.hidden = NO;
-            self.previewLayer.frame = self.view.layer.bounds;
+            self.previewLayer.frame = CGRectMake(0, (height - width*16/9)/2, width, width*16/9);
 
         }
             
@@ -1576,7 +1576,7 @@
             self.switchButton.hidden = YES;
             self.panoramaGuideView.hidden = YES;
             self.panoramOrientationGuideView.hidden = YES;
-            self.previewLayer.frame = self.view.layer.bounds;
+            self.previewLayer.frame = CGRectMake(0, (height - width*16/9)/2, width, width*16/9);
         }
             
             break;
@@ -1611,8 +1611,8 @@
     if(newIndex != SDK_CAPTURE_MODE_MOVIE){
         [[SDKParameters shared].items enumerateObjectsUsingBlock:^(SDKParametersItem * _Nonnull obj, NSUInteger idx, BOOL * _Nonnull stop) {
             if (obj.model == self.mode) {
-                [[CameraManager shared] setResolutionFor:AVCaptureDevicePositionBack with:obj.resolution.height];
-                [[CameraManager shared] setResolutionFor:AVCaptureDevicePositionFront with:obj.resolution.height];
+                [[CameraManager shared] setResolutionFor:AVCaptureDevicePositionBack with:obj.resolution.height model:self.mode];
+                [[CameraManager shared] setResolutionFor:AVCaptureDevicePositionFront with:obj.resolution.height model:self.mode];
             }
         }];
         
@@ -1620,8 +1620,8 @@
     else{
         [[SDKParameters shared].items enumerateObjectsUsingBlock:^(SDKParametersItem * _Nonnull obj, NSUInteger idx, BOOL * _Nonnull stop) {
             if (obj.model == self.mode) {
-                [[CameraManager shared] setResolutionFor:AVCaptureDevicePositionBack with:obj.videoResolution.height];
-                [[CameraManager shared] setResolutionFor:AVCaptureDevicePositionFront with:obj.videoResolution.height];
+                [[CameraManager shared] setResolutionFor:AVCaptureDevicePositionBack with:obj.videoResolution.height model:self.mode];
+                [[CameraManager shared] setResolutionFor:AVCaptureDevicePositionFront with:obj.videoResolution.height model:self.mode];
             }
         }];
 
@@ -1753,7 +1753,9 @@
     }
     
     if (self.cameraPrepared && (!self.captureSession.isRunning)) {
-        [self.captureSession startRunning];
+        dispatch_async(dispatch_get_global_queue(0, 0), ^{
+            [self.captureSession startRunning];
+        });
     }
 }
 

+ 47 - 4
LenzCameraNativeModuleForRN/Classes/inner/PCSBaseViewController/PCSPreviewViewController.m

@@ -28,6 +28,7 @@
 
 - (instancetype)initWithFrame:(CGRect)frame {
     if (self = [super initWithFrame:frame]) {
+        self.contentView.backgroundColor = [UIColor clearColor];
         [self.contentView addSubview:self.imageView];
         [self.imageView mas_makeConstraints:^(MASConstraintMaker *make) {
             make.edges.mas_offset(0);
@@ -134,7 +135,9 @@
 @end
 
 @implementation PCSPreviewViewController
-
+- (void)dealloc {
+    
+}
 - (void)viewDidLoad {
     [super viewDidLoad];
     self.allPlayer  = [NSMutableArray array];
@@ -195,6 +198,7 @@
     self.collectionView.delegate = self;
     self.collectionView.dataSource = self;
     self.collectionView.pagingEnabled = YES;
+    self.collectionView.backgroundColor = [UIColor clearColor];
     self.collectionView.hidden = YES;
     // 注册item类型
     [self.collectionView registerClass:[PCSPreCollectionCell class] forCellWithReuseIdentifier:@"PCSPreCollectionCell"];
@@ -208,6 +212,7 @@
 
 
     self.currentIndexPath = nil;
+    
     if (self.model.continousArray.count > 0 && self.selectIndex == SDK_CAPTURE_MODE_CONTINUOUS) {
         self.currentIndex = 1;
         self.currentIndexPath = [NSIndexPath indexPathForItem:self.model.continousArray.count - 1 inSection:0];
@@ -225,6 +230,21 @@
         self.currentIndex = 4;
         self.currentIndexPath = [NSIndexPath indexPathForItem:self.model.aiPanoramArray.count - 1 inSection:3];
     }
+    if(!self.currentIndexPath) {
+        if (self.model.aiPanoramArray.count > 0) {
+            self.currentIndex = 4;
+            self.currentIndexPath = [NSIndexPath indexPathForItem:self.model.aiPanoramArray.count - 1 inSection:3];
+        } else if (self.model.panoramArray.count > 0) {
+            self.currentIndex = 3;
+            self.currentIndexPath = [NSIndexPath indexPathForItem:self.model.panoramArray.count - 1 inSection:2];
+        } else if (self.model.movieArray.count > 0) {
+            self.currentIndex = 2;
+            self.currentIndexPath = [NSIndexPath indexPathForItem:self.model.movieArray.count - 1 inSection:1];
+        } else {
+            self.currentIndex = 1;
+            self.currentIndexPath = [NSIndexPath indexPathForItem:self.model.continousArray.count - 1 inSection:0];
+        }
+    }
     [self changeLabelStatusWith:self.currentIndex];
     [self updateCountLabelWith:self.currentIndexPath];
 
@@ -605,27 +625,50 @@
             
         [alertController dismissViewControllerAnimated:YES completion:nil];
         } rightButtonCallBack:^(QuitMultipleModeAlertViewController * _Nonnull alertController) {
+            NSIndexPath *showIndexPath = nil;
             if (self.currentIndex == 1) {
                 if (self.model.continousArray.count > self.currentIndexPath.item) {
                     [self.model.continousArray removeObjectAtIndex:self.currentIndexPath.item];
                 }
+                if (self.model.continousArray.count > 0 ) {
+                    showIndexPath = [NSIndexPath indexPathForRow:self.currentIndexPath.item - 1 inSection:self.currentIndexPath.section];
+                }
             } else if (self.currentIndex == 2) {
                 if (self.model.movieArray.count > self.currentIndexPath.item) {
                     [self.model.movieArray removeObjectAtIndex:self.currentIndexPath.item];
                 }
+                if (self.model.movieArray.count > 0 ) {
+                    showIndexPath = [NSIndexPath indexPathForRow:self.currentIndexPath.item - 1 inSection:self.currentIndexPath.section];
+                }
             } else if (self.currentIndex == 3) {
                 if (self.model.panoramArray.count > self.currentIndexPath.item) {
                     [self.model.panoramArray removeObjectAtIndex:self.currentIndexPath.item];
                 }
+                if (self.model.panoramArray.count > 0 ) {
+                    showIndexPath = [NSIndexPath indexPathForRow:self.currentIndexPath.item - 1 inSection:self.currentIndexPath.section];
+                }
             } else if (self.currentIndex == 4) {
                 if (self.model.aiPanoramArray.count > self.currentIndexPath.item) {
                     [self.model.aiPanoramArray removeObjectAtIndex:self.currentIndexPath.item];
                 }
+                if (self.model.aiPanoramArray.count > 0 ) {
+                    showIndexPath = [NSIndexPath indexPathForRow:self.currentIndexPath.item - 1 inSection:self.currentIndexPath.section];
+                }
             }
-            [self setupModeView];
-            [self scrollViewDidEndDecelerating:self.collectionView];
 
-            [self.collectionView reloadData];
+
+            if(showIndexPath) {
+                UICollectionViewLayoutAttributes*attributes = [self.collectionView layoutAttributesForItemAtIndexPath:showIndexPath];
+                CGRect rect = attributes.frame;
+                [self.collectionView reloadData];
+                [self.collectionView setContentOffset:CGPointMake(rect.origin.x, rect.origin.y ) animated:NO];
+            } else {
+                [self setupModeView];
+                [self scrollViewDidEndDecelerating:self.collectionView];
+                [self.collectionView reloadData];
+            }
+            
+            
             [self.view setNeedsLayout];
             [self.view layoutIfNeeded];
             dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(.35 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{

Неке датотеке нису приказане због велике количине промена