فهرست منبع

[*] 相册权限问题修复

yanxuyao 9 ماه پیش
والد
کامیت
eee7ffed3a
18فایلهای تغییر یافته به همراه307 افزوده شده و 190 حذف شده
  1. 0 8
      MiMoLive/MiMoLive.xcodeproj/project.pbxproj
  2. 8 8
      MiMoLive/Podfile.lock
  3. 8 8
      MiMoLive/Pods/Manifest.lock
  4. 81 79
      MiMoLive/Pods/Pods.xcodeproj/project.pbxproj
  5. 14 13
      MiMoLive/Pods/TZImagePickerController/README.md
  6. 17 4
      MiMoLive/Pods/TZImagePickerController/TZImagePickerController/TZImagePickerController/TZAssetCell.m
  7. 14 6
      MiMoLive/Pods/TZImagePickerController/TZImagePickerController/TZImagePickerController/TZGifPhotoPreviewController.m
  8. 3 3
      MiMoLive/Pods/TZImagePickerController/TZImagePickerController/TZImagePickerController/TZImageManager.m
  9. 2 1
      MiMoLive/Pods/TZImagePickerController/TZImagePickerController/TZImagePickerController/TZImagePickerController.h
  10. 17 12
      MiMoLive/Pods/TZImagePickerController/TZImagePickerController/TZImagePickerController/TZImagePickerController.m
  11. 64 25
      MiMoLive/Pods/TZImagePickerController/TZImagePickerController/TZImagePickerController/TZPhotoPickerController.m
  12. 5 1
      MiMoLive/Pods/TZImagePickerController/TZImagePickerController/TZImagePickerController/TZPhotoPreviewCell.m
  13. 33 11
      MiMoLive/Pods/TZImagePickerController/TZImagePickerController/TZImagePickerController/TZPhotoPreviewController.m
  14. 19 5
      MiMoLive/Pods/TZImagePickerController/TZImagePickerController/TZImagePickerController/TZVideoCropController.m
  15. 8 1
      MiMoLive/Pods/TZImagePickerController/TZImagePickerController/TZImagePickerController/TZVideoEditedPreviewController.m
  16. 12 3
      MiMoLive/Pods/TZImagePickerController/TZImagePickerController/TZImagePickerController/TZVideoPlayerController.m
  17. 1 1
      MiMoLive/Pods/Target Support Files/TZImagePickerController/TZImagePickerController-Info.plist
  18. 1 1
      MiMoLive/podfile

+ 0 - 8
MiMoLive/MiMoLive.xcodeproj/project.pbxproj

@@ -11473,14 +11473,10 @@
 			inputFileListPaths = (
 				"${PODS_ROOT}/Target Support Files/Pods-MiMoLive/Pods-MiMoLive-resources-${CONFIGURATION}-input-files.xcfilelist",
 			);
-			inputPaths = (
-			);
 			name = "[CP] Copy Pods Resources";
 			outputFileListPaths = (
 				"${PODS_ROOT}/Target Support Files/Pods-MiMoLive/Pods-MiMoLive-resources-${CONFIGURATION}-output-files.xcfilelist",
 			);
-			outputPaths = (
-			);
 			runOnlyForDeploymentPostprocessing = 0;
 			shellPath = /bin/sh;
 			shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-MiMoLive/Pods-MiMoLive-resources.sh\"\n";
@@ -11533,14 +11529,10 @@
 			inputFileListPaths = (
 				"${PODS_ROOT}/Target Support Files/Pods-MiMoLive/Pods-MiMoLive-frameworks-${CONFIGURATION}-input-files.xcfilelist",
 			);
-			inputPaths = (
-			);
 			name = "[CP] Embed Pods Frameworks";
 			outputFileListPaths = (
 				"${PODS_ROOT}/Target Support Files/Pods-MiMoLive/Pods-MiMoLive-frameworks-${CONFIGURATION}-output-files.xcfilelist",
 			);
-			outputPaths = (
-			);
 			runOnlyForDeploymentPostprocessing = 0;
 			shellPath = /bin/sh;
 			shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-MiMoLive/Pods-MiMoLive-frameworks.sh\"\n";

+ 8 - 8
MiMoLive/Podfile.lock

@@ -126,11 +126,11 @@ PODS:
     - TUICore/Base
     - TXIMSDK_Plus_iOS_XCFramework
   - TXIMSDK_Plus_iOS_XCFramework (8.5.6864)
-  - TZImagePickerController (3.8.4):
-    - TZImagePickerController/Basic (= 3.8.4)
-    - TZImagePickerController/Location (= 3.8.4)
-  - TZImagePickerController/Basic (3.8.4)
-  - TZImagePickerController/Location (3.8.4)
+  - TZImagePickerController (3.8.9):
+    - TZImagePickerController/Basic (= 3.8.9)
+    - TZImagePickerController/Location (= 3.8.9)
+  - TZImagePickerController/Basic (3.8.9)
+  - TZImagePickerController/Location (3.8.9)
   - YYKit (1.0.9):
     - YYKit/no-arc (= 1.0.9)
   - YYKit/no-arc (1.0.9)
@@ -168,7 +168,7 @@ DEPENDENCIES:
   - TUIConversation (from `./TUIKit/TUIConversation`)
   - TUICore (from `./TUIKit/TUICore`)
   - TXIMSDK_Plus_iOS_XCFramework
-  - TZImagePickerController (~> 3.8.3)
+  - TZImagePickerController
   - YYKit
 
 SPEC REPOS:
@@ -251,9 +251,9 @@ SPEC CHECKSUMS:
   TUIConversation: ea832cc28987495091203ca892fe046414b29e5f
   TUICore: c1e480d7644ad9efb0db8c353e26ff39d7e4933b
   TXIMSDK_Plus_iOS_XCFramework: 0353712b504d2206ce0f4d94b0eb3357673e1cfe
-  TZImagePickerController: f1c9f1cae6ac0e30b31aaa9698f9bf4a7cf5b84f
+  TZImagePickerController: 456f470b5dea97b37226ec7a694994a8663340b2
   YYKit: 7cda43304a8dc3696c449041e2cb3107b4e236e7
 
-PODFILE CHECKSUM: bd1806b62a1a7eb41fbad80bab1fff5b1e9f15e7
+PODFILE CHECKSUM: 41d493db1637a351dc4be702a13bf892d43052b5
 
 COCOAPODS: 1.16.2

+ 8 - 8
MiMoLive/Pods/Manifest.lock

@@ -126,11 +126,11 @@ PODS:
     - TUICore/Base
     - TXIMSDK_Plus_iOS_XCFramework
   - TXIMSDK_Plus_iOS_XCFramework (8.5.6864)
-  - TZImagePickerController (3.8.4):
-    - TZImagePickerController/Basic (= 3.8.4)
-    - TZImagePickerController/Location (= 3.8.4)
-  - TZImagePickerController/Basic (3.8.4)
-  - TZImagePickerController/Location (3.8.4)
+  - TZImagePickerController (3.8.9):
+    - TZImagePickerController/Basic (= 3.8.9)
+    - TZImagePickerController/Location (= 3.8.9)
+  - TZImagePickerController/Basic (3.8.9)
+  - TZImagePickerController/Location (3.8.9)
   - YYKit (1.0.9):
     - YYKit/no-arc (= 1.0.9)
   - YYKit/no-arc (1.0.9)
@@ -168,7 +168,7 @@ DEPENDENCIES:
   - TUIConversation (from `./TUIKit/TUIConversation`)
   - TUICore (from `./TUIKit/TUICore`)
   - TXIMSDK_Plus_iOS_XCFramework
-  - TZImagePickerController (~> 3.8.3)
+  - TZImagePickerController
   - YYKit
 
 SPEC REPOS:
@@ -251,9 +251,9 @@ SPEC CHECKSUMS:
   TUIConversation: ea832cc28987495091203ca892fe046414b29e5f
   TUICore: c1e480d7644ad9efb0db8c353e26ff39d7e4933b
   TXIMSDK_Plus_iOS_XCFramework: 0353712b504d2206ce0f4d94b0eb3357673e1cfe
-  TZImagePickerController: f1c9f1cae6ac0e30b31aaa9698f9bf4a7cf5b84f
+  TZImagePickerController: 456f470b5dea97b37226ec7a694994a8663340b2
   YYKit: 7cda43304a8dc3696c449041e2cb3107b4e236e7
 
-PODFILE CHECKSUM: bd1806b62a1a7eb41fbad80bab1fff5b1e9f15e7
+PODFILE CHECKSUM: 41d493db1637a351dc4be702a13bf892d43052b5
 
 COCOAPODS: 1.16.2

+ 81 - 79
MiMoLive/Pods/Pods.xcodeproj/project.pbxproj

@@ -13689,6 +13689,45 @@
 			};
 			name = Debug;
 		};
+		028348C868E065F6AC2B4E11E24D1210 /* Debug */ = {
+			isa = XCBuildConfiguration;
+			baseConfigurationReference = C4CCEA1C90F6671D79E5DE39CB25B919 /* TZImagePickerController.debug.xcconfig */;
+			buildSettings = {
+				CLANG_ENABLE_OBJC_WEAK = NO;
+				"CODE_SIGN_IDENTITY[sdk=appletvos*]" = "";
+				"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "";
+				"CODE_SIGN_IDENTITY[sdk=watchos*]" = "";
+				CURRENT_PROJECT_VERSION = 1;
+				DEFINES_MODULE = YES;
+				DYLIB_COMPATIBILITY_VERSION = 1;
+				DYLIB_CURRENT_VERSION = 1;
+				DYLIB_INSTALL_NAME_BASE = "@rpath";
+				ENABLE_MODULE_VERIFIER = NO;
+				ENABLE_USER_SCRIPT_SANDBOXING = NO;
+				GCC_PREFIX_HEADER = "Target Support Files/TZImagePickerController/TZImagePickerController-prefix.pch";
+				GENERATE_INFOPLIST_FILE = NO;
+				INFOPLIST_FILE = "Target Support Files/TZImagePickerController/TZImagePickerController-Info.plist";
+				INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
+				IPHONEOS_DEPLOYMENT_TARGET = 10.0;
+				LD_RUNPATH_SEARCH_PATHS = (
+					"$(inherited)",
+					"@executable_path/Frameworks",
+					"@loader_path/Frameworks",
+				);
+				MODULEMAP_FILE = "Target Support Files/TZImagePickerController/TZImagePickerController.modulemap";
+				PRODUCT_MODULE_NAME = TZImagePickerController;
+				PRODUCT_NAME = TZImagePickerController;
+				SDKROOT = iphoneos;
+				SKIP_INSTALL = YES;
+				SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) ";
+				SWIFT_INSTALL_OBJC_HEADER = YES;
+				SWIFT_VERSION = 5.0;
+				TARGETED_DEVICE_FAMILY = "1,2";
+				VERSIONING_SYSTEM = "apple-generic";
+				VERSION_INFO_PREFIX = "";
+			};
+			name = Debug;
+		};
 		0394FBE6D10A9E9D329AF03F2444953B /* Release */ = {
 			isa = XCBuildConfiguration;
 			baseConfigurationReference = D1F42141955B8C3903A370C641AE2CC9 /* IOSSecuritySuite.release.xcconfig */;
@@ -14317,6 +14356,46 @@
 			};
 			name = Release;
 		};
+		3230EFFF186BAF50568B8CA06CCC977F /* Release */ = {
+			isa = XCBuildConfiguration;
+			baseConfigurationReference = 6DACEB71E7F58E08DE57C7BAEF07519C /* TZImagePickerController.release.xcconfig */;
+			buildSettings = {
+				CLANG_ENABLE_OBJC_WEAK = NO;
+				"CODE_SIGN_IDENTITY[sdk=appletvos*]" = "";
+				"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "";
+				"CODE_SIGN_IDENTITY[sdk=watchos*]" = "";
+				CURRENT_PROJECT_VERSION = 1;
+				DEFINES_MODULE = YES;
+				DYLIB_COMPATIBILITY_VERSION = 1;
+				DYLIB_CURRENT_VERSION = 1;
+				DYLIB_INSTALL_NAME_BASE = "@rpath";
+				ENABLE_MODULE_VERIFIER = NO;
+				ENABLE_USER_SCRIPT_SANDBOXING = NO;
+				GCC_PREFIX_HEADER = "Target Support Files/TZImagePickerController/TZImagePickerController-prefix.pch";
+				GENERATE_INFOPLIST_FILE = NO;
+				INFOPLIST_FILE = "Target Support Files/TZImagePickerController/TZImagePickerController-Info.plist";
+				INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
+				IPHONEOS_DEPLOYMENT_TARGET = 10.0;
+				LD_RUNPATH_SEARCH_PATHS = (
+					"$(inherited)",
+					"@executable_path/Frameworks",
+					"@loader_path/Frameworks",
+				);
+				MODULEMAP_FILE = "Target Support Files/TZImagePickerController/TZImagePickerController.modulemap";
+				PRODUCT_MODULE_NAME = TZImagePickerController;
+				PRODUCT_NAME = TZImagePickerController;
+				SDKROOT = iphoneos;
+				SKIP_INSTALL = YES;
+				SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) ";
+				SWIFT_INSTALL_OBJC_HEADER = YES;
+				SWIFT_VERSION = 5.0;
+				TARGETED_DEVICE_FAMILY = "1,2";
+				VALIDATE_PRODUCT = YES;
+				VERSIONING_SYSTEM = "apple-generic";
+				VERSION_INFO_PREFIX = "";
+			};
+			name = Release;
+		};
 		3849A5ECFDD82A3733BA46EFA682CDA7 /* Debug */ = {
 			isa = XCBuildConfiguration;
 			baseConfigurationReference = F05D5CBB96C9E75CD27E9F0A69EA8AD1 /* mob_sharesdk.debug.xcconfig */;
@@ -14760,45 +14839,6 @@
 			};
 			name = Release;
 		};
-		5DA41099432E860B9C8E82ED1A2359C4 /* Release */ = {
-			isa = XCBuildConfiguration;
-			baseConfigurationReference = 6DACEB71E7F58E08DE57C7BAEF07519C /* TZImagePickerController.release.xcconfig */;
-			buildSettings = {
-				"CODE_SIGN_IDENTITY[sdk=appletvos*]" = "";
-				"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "";
-				"CODE_SIGN_IDENTITY[sdk=watchos*]" = "";
-				CURRENT_PROJECT_VERSION = 1;
-				DEFINES_MODULE = YES;
-				DYLIB_COMPATIBILITY_VERSION = 1;
-				DYLIB_CURRENT_VERSION = 1;
-				DYLIB_INSTALL_NAME_BASE = "@rpath";
-				ENABLE_MODULE_VERIFIER = NO;
-				ENABLE_USER_SCRIPT_SANDBOXING = NO;
-				GCC_PREFIX_HEADER = "Target Support Files/TZImagePickerController/TZImagePickerController-prefix.pch";
-				GENERATE_INFOPLIST_FILE = NO;
-				INFOPLIST_FILE = "Target Support Files/TZImagePickerController/TZImagePickerController-Info.plist";
-				INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
-				IPHONEOS_DEPLOYMENT_TARGET = 8.0;
-				LD_RUNPATH_SEARCH_PATHS = (
-					"$(inherited)",
-					"@executable_path/Frameworks",
-					"@loader_path/Frameworks",
-				);
-				MODULEMAP_FILE = "Target Support Files/TZImagePickerController/TZImagePickerController.modulemap";
-				PRODUCT_MODULE_NAME = TZImagePickerController;
-				PRODUCT_NAME = TZImagePickerController;
-				SDKROOT = iphoneos;
-				SKIP_INSTALL = YES;
-				SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) ";
-				SWIFT_INSTALL_OBJC_HEADER = YES;
-				SWIFT_VERSION = 5.0;
-				TARGETED_DEVICE_FAMILY = "1,2";
-				VALIDATE_PRODUCT = YES;
-				VERSIONING_SYSTEM = "apple-generic";
-				VERSION_INFO_PREFIX = "";
-			};
-			name = Release;
-		};
 		5E659F762E318B0DC0900B0C29CA6814 /* Release */ = {
 			isa = XCBuildConfiguration;
 			baseConfigurationReference = 3383D08433575246FF2E567D2B83848D /* TXIMSDK_Plus_iOS_XCFramework.release.xcconfig */;
@@ -16495,44 +16535,6 @@
 			};
 			name = Release;
 		};
-		EC57AC975CBD144F61A96026E512584E /* Debug */ = {
-			isa = XCBuildConfiguration;
-			baseConfigurationReference = C4CCEA1C90F6671D79E5DE39CB25B919 /* TZImagePickerController.debug.xcconfig */;
-			buildSettings = {
-				"CODE_SIGN_IDENTITY[sdk=appletvos*]" = "";
-				"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "";
-				"CODE_SIGN_IDENTITY[sdk=watchos*]" = "";
-				CURRENT_PROJECT_VERSION = 1;
-				DEFINES_MODULE = YES;
-				DYLIB_COMPATIBILITY_VERSION = 1;
-				DYLIB_CURRENT_VERSION = 1;
-				DYLIB_INSTALL_NAME_BASE = "@rpath";
-				ENABLE_MODULE_VERIFIER = NO;
-				ENABLE_USER_SCRIPT_SANDBOXING = NO;
-				GCC_PREFIX_HEADER = "Target Support Files/TZImagePickerController/TZImagePickerController-prefix.pch";
-				GENERATE_INFOPLIST_FILE = NO;
-				INFOPLIST_FILE = "Target Support Files/TZImagePickerController/TZImagePickerController-Info.plist";
-				INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
-				IPHONEOS_DEPLOYMENT_TARGET = 8.0;
-				LD_RUNPATH_SEARCH_PATHS = (
-					"$(inherited)",
-					"@executable_path/Frameworks",
-					"@loader_path/Frameworks",
-				);
-				MODULEMAP_FILE = "Target Support Files/TZImagePickerController/TZImagePickerController.modulemap";
-				PRODUCT_MODULE_NAME = TZImagePickerController;
-				PRODUCT_NAME = TZImagePickerController;
-				SDKROOT = iphoneos;
-				SKIP_INSTALL = YES;
-				SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) ";
-				SWIFT_INSTALL_OBJC_HEADER = YES;
-				SWIFT_VERSION = 5.0;
-				TARGETED_DEVICE_FAMILY = "1,2";
-				VERSIONING_SYSTEM = "apple-generic";
-				VERSION_INFO_PREFIX = "";
-			};
-			name = Debug;
-		};
 		ED0959F391D328FA29ADA58496F473BF /* Release */ = {
 			isa = XCBuildConfiguration;
 			baseConfigurationReference = 1B6D473409C1E44A370D54E607CA04C3 /* mob_sharesdk.release.xcconfig */;
@@ -16698,8 +16700,8 @@
 		005FC79D505B5BF3ED52351FEEB4FD01 /* Build configuration list for PBXNativeTarget "TZImagePickerController" */ = {
 			isa = XCConfigurationList;
 			buildConfigurations = (
-				EC57AC975CBD144F61A96026E512584E /* Debug */,
-				5DA41099432E860B9C8E82ED1A2359C4 /* Release */,
+				028348C868E065F6AC2B4E11E24D1210 /* Debug */,
+				3230EFFF186BAF50568B8CA06CCC977F /* Release */,
 			);
 			defaultConfigurationIsVisible = 0;
 			defaultConfigurationName = Release;

+ 14 - 13
MiMoLive/Pods/TZImagePickerController/README.md

@@ -3,12 +3,12 @@
 [![Carthage compatible](https://img.shields.io/badge/Carthage-compatible-4BC51D.svg?style=flat)](https://github.com/Carthage/Carthage)
 
 
- A clone of UIImagePickerController, support picking multiple photos、original photo、video, also allow preview photo and video, support iOS6+.   
- 一个支持多选、选原图和视频的图片选择器,同时有预览功能,支持iOS6+。
+ A clone of UIImagePickerController, support picking multiple photos、original photo、video, also allow preview photo and video, support iOS10+.   
+ 一个支持多选、选原图和视频的图片选择器,同时有预览功能,支持iOS10+。
  
 ## 重要提示1:提issue前,请先对照Demo、常见问题自查!Demo正常说明你可以升级下新版试试。          
  
-## 重要提示2:3.7.5版本修复了iOS15.2下初次授权相册权限时的长时间卡顿&白屏问题,强烈建议尽快更新   
+## 重要提示2:3.8.8版本修复了iOS18下无照片和openURL失效的问题       
      关于iOS14模拟器的问题
  PHAuthorizationStatusLimited授权模式下,iOS14模拟器有bug,未授权照片无法显示,真机正常,暂可忽略:https://github.com/banchichen/TZImagePickerController/issues/1347 
  
@@ -43,14 +43,9 @@
     [self presentViewController:imagePickerVc animated:YES completion:nil];
   
 ## 三. Requirements 要求
-   iOS 6 or later. Requires ARC  
-   iOS6及以上系统可使用. ARC环境.
-   
-   When system version is iOS6 or iOS7,  Using AssetsLibrary.  
-   When system version is iOS8 or later, Using PhotoKit.  
-   如果运行在iOS6或7系统上,用的是AssetsLibrary库获取照片资源。  
-   如果运行在iOS8及以上系统上,用的是PhotoKit库获取照片资源。
-   
+   iOS 10 or later.      
+   支持iOS10及以上系统。      
+  
    TZImagePickerController uses Camera、Location、Microphone、Photo Library,you need add these properties to info.plist like Demo:       
    TZImagePickerController使用了相机、定位、麦克风、相册,请参考Demo添加下列属性到info.plist文件:        
    	`Privacy - Camera Usage Description`     
@@ -128,9 +123,11 @@ A:不要去拿PHImageFileURLKey,没用的,只有通过Photos框架才能
 
 ## 六. Release Notes 最近更新     
 
+**3.8.8 支持iOS18,修复openURL的失效问题** [#1686](https://github.com/banchichen/TZImagePickerController/issues/1686)               
+**3.8.5 新增隐私清单文件** [#1675](https://github.com/banchichen/TZImagePickerController/pull/1675)               
 **3.8.4 支持使用不带定位代码的版本** [#1606](https://github.com/banchichen/TZImagePickerController/pull/1606)               
-**3.8.1 iOS14下可添加访问更多照片,详见PR内的评论** [#1526](https://github.com/banchichen/TZImagePickerController/pull/1526)               
-**3.7.6 修复iOS15.2下初次授权相册权限时的长时间卡顿&白屏问题** [#1547](https://github.com/banchichen/TZImagePickerController/issues/1547)               
+3.8.1 iOS14下可添加访问更多照片,详见PR内的评论 [#1526](https://github.com/banchichen/TZImagePickerController/pull/1526)               
+3.7.6 修复iOS15.2下初次授权相册权限时的长时间卡顿&白屏问题 [#1547](https://github.com/banchichen/TZImagePickerController/issues/1547)               
 **3.6.7 修复Xcode13&iOS15下导航栏颜色异常问题**        
 3.6.2 新增allowEditVideo,单选视频时支持裁剪        
 3.6.0 修复iOS14下iCloud视频导出失败问题        
@@ -173,3 +170,7 @@ A:不要去拿PHImageFileURLKey,没用的,只有通过Photos框架才能
 ...      
 1.4.5  性能大幅提升(性能测试截图请去博客查看);可在照片列表页拍照;Demo大幅优化;   
 ...        
+
+## 七. Common links 常用链接    
+1. Json diff online: https://www.jsondiffonline.com/       
+

+ 17 - 4
MiMoLive/Pods/TZImagePickerController/TZImagePickerController/TZImagePickerController/TZAssetCell.m

@@ -436,10 +436,23 @@
 
 - (void)layoutSubviews {
     [super layoutSubviews];
-    _selectedCountButton.frame = CGRectMake(self.contentView.tz_width - 24, 23, 24, 24);
+    
+    CGFloat selectedCountButtonX;
+    CGFloat titleLabelX;
+    CGFloat posterImageViewX;
+    if ([TZCommonTools tz_isRightToLeftLayout]) {
+        selectedCountButtonX = 24;
+        titleLabelX = 24;
+        posterImageViewX = self.contentView.tz_width - 70;
+    } else {
+        selectedCountButtonX = self.contentView.tz_width - 24;
+        titleLabelX = 80;
+        posterImageViewX = 0;
+    }
+    _selectedCountButton.frame = CGRectMake(selectedCountButtonX, 23, 24, 24);
     NSInteger titleHeight = ceil(self.titleLabel.font.lineHeight);
-    self.titleLabel.frame = CGRectMake(80, (self.tz_height - titleHeight) / 2, self.tz_width - 80 - 50, titleHeight);
-    self.posterImageView.frame = CGRectMake(0, 0, 70, 70);
+    self.titleLabel.frame = CGRectMake(titleLabelX, (self.tz_height - titleHeight) / 2, self.tz_width - 80 - 50, titleHeight);
+    self.posterImageView.frame = CGRectMake(posterImageViewX, 0, 70, 70);
     
     if (self.albumCellDidLayoutSubviewsBlock) {
         self.albumCellDidLayoutSubviewsBlock(self, _posterImageView, _titleLabel);
@@ -472,7 +485,7 @@
         } else {
             titleLabel.textColor = [UIColor blackColor];
         }
-        titleLabel.textAlignment = NSTextAlignmentLeft;
+        titleLabel.textAlignment = NSTextAlignmentNatural;
         [self.contentView addSubview:titleLabel];
         _titleLabel = titleLabel;
     }

+ 14 - 6
MiMoLive/Pods/TZImagePickerController/TZImagePickerController/TZImagePickerController/TZGifPhotoPreviewController.m

@@ -19,6 +19,7 @@
 @interface TZGifPhotoPreviewController () {
     UIView *_toolBar;
     UIButton *_doneButton;
+    UILabel *_byteLabel;
     UIProgressView *_progress;
     
     TZPhotoPreviewView *_previewView;
@@ -85,14 +86,14 @@
     }
     [_toolBar addSubview:_doneButton];
     
-    UILabel *byteLabel = [[UILabel alloc] init];
-    byteLabel.textColor = [UIColor whiteColor];
-    byteLabel.font = [UIFont systemFontOfSize:13];
-    byteLabel.frame = CGRectMake(10, 0, 100, 44);
+    _byteLabel = [[UILabel alloc] init];
+    _byteLabel.textColor = [UIColor whiteColor];
+    _byteLabel.font = [UIFont systemFontOfSize:13];
+    __weak typeof(_byteLabel) byteLabel = _byteLabel;
     [[TZImageManager manager] getPhotosBytesWithArray:@[_model] completion:^(NSString *totalBytes) {
         byteLabel.text = totalBytes;
     }];
-    [_toolBar addSubview:byteLabel];
+    [_toolBar addSubview:_byteLabel];
     
     [self.view addSubview:_toolBar];
     
@@ -119,7 +120,14 @@
     CGFloat toolBarHeight = 44 + [TZCommonTools tz_safeAreaInsets].bottom;
     _toolBar.frame = CGRectMake(0, self.view.tz_height - toolBarHeight, self.view.tz_width, toolBarHeight);
     [_doneButton sizeToFit];
-    _doneButton.frame = CGRectMake(self.view.tz_width - _doneButton.tz_width - 12, 0, MAX(44, _doneButton.tz_width), 44);
+    
+    if ([TZCommonTools tz_isRightToLeftLayout]) {
+        _doneButton.frame = CGRectMake(12, 0, MAX(44, _doneButton.tz_width), 44);
+        _byteLabel.frame = CGRectMake(self.view.tz_width - 100 - 10, 0, 100, 44);
+    } else {
+        _doneButton.frame = CGRectMake(self.view.tz_width - _doneButton.tz_width - 12, 0, MAX(44, _doneButton.tz_width), 44);
+        _byteLabel.frame = CGRectMake(10, 0, 100, 44);
+    }
     
     TZImagePickerController *tzImagePickerVc = (TZImagePickerController *)self.navigationController;
     if (tzImagePickerVc.gifPreviewPageDidLayoutSubviewsBlock) {

+ 3 - 3
MiMoLive/Pods/TZImagePickerController/TZImagePickerController/TZImagePickerController/TZImageManager.m

@@ -127,7 +127,7 @@ static dispatch_once_t onceToken;
     if (!self.sortAscendingByModificationDate) {
         option.sortDescriptors = @[[NSSortDescriptor sortDescriptorWithKey:@"creationDate" ascending:self.sortAscendingByModificationDate]];
     }
-    PHFetchResult *smartAlbums = [PHAssetCollection fetchAssetCollectionsWithType:PHAssetCollectionTypeSmartAlbum subtype:PHAssetCollectionSubtypeAlbumRegular options:nil];
+    PHFetchResult *smartAlbums = [PHAssetCollection fetchAssetCollectionsWithType:PHAssetCollectionTypeSmartAlbum subtype:PHAssetCollectionSubtypeAny options:nil];
     for (PHAssetCollection *collection in smartAlbums) {
         // 有可能是PHCollectionList类的的对象,过滤掉
         if (![collection isKindOfClass:[PHAssetCollection class]]) continue;
@@ -162,7 +162,7 @@ static dispatch_once_t onceToken;
     }
     // 我的照片流 1.6.10重新加入..
     PHFetchResult *myPhotoStreamAlbum = [PHAssetCollection fetchAssetCollectionsWithType:PHAssetCollectionTypeAlbum subtype:PHAssetCollectionSubtypeAlbumMyPhotoStream options:nil];
-    PHFetchResult *smartAlbums = [PHAssetCollection fetchAssetCollectionsWithType:PHAssetCollectionTypeSmartAlbum subtype:PHAssetCollectionSubtypeAlbumRegular options:nil];
+    PHFetchResult *smartAlbums = [PHAssetCollection fetchAssetCollectionsWithType:PHAssetCollectionTypeSmartAlbum subtype:PHAssetCollectionSubtypeAny options:nil];
     PHFetchResult *topLevelUserCollections = [PHCollectionList fetchTopLevelUserCollectionsWithOptions:nil];
     PHFetchResult *syncedAlbums = [PHAssetCollection fetchAssetCollectionsWithType:PHAssetCollectionTypeAlbum subtype:PHAssetCollectionSubtypeAlbumSyncedAlbum options:nil];
     PHFetchResult *sharedAlbums = [PHAssetCollection fetchAssetCollectionsWithType:PHAssetCollectionTypeAlbum subtype:PHAssetCollectionSubtypeAlbumCloudShared options:nil];
@@ -879,7 +879,7 @@ static dispatch_once_t onceToken;
 
 /// 缩放图片至新尺寸
 - (UIImage *)scaleImage:(UIImage *)image toSize:(CGSize)size {
-    if (image.size.width > size.width) {
+    if (image.size.width > size.width && size.width > 0 && size.height > 0) {
         UIGraphicsBeginImageContext(size);
         [image drawInRect:CGRectMake(0, 0, size.width, size.height)];
         UIImage *newImage = UIGraphicsGetImageFromCurrentImageContext();

+ 2 - 1
MiMoLive/Pods/TZImagePickerController/TZImagePickerController/TZImagePickerController/TZImagePickerController.h

@@ -4,7 +4,7 @@
 //
 //  Created by 谭真 on 15/12/24.
 //  Copyright © 2015年 谭真. All rights reserved.
-//  version 3.8.4 - 2023.11.21
+//  version 3.8.9 - 2025.5.27
 //  更多信息,请前往项目的github地址:https://github.com/banchichen/TZImagePickerController
 
 /*
@@ -375,6 +375,7 @@
 + (void)configBarButtonItem:(UIBarButtonItem *)item tzImagePickerVc:(TZImagePickerController *)tzImagePickerVc;
 + (BOOL)isICloudSyncError:(NSError *)error;
 + (BOOL)isAssetNotSelectable:(TZAssetModel *)model tzImagePickerVc:(TZImagePickerController *)tzImagePickerVc;
++ (UICollectionViewFlowLayout *)tz_rtlFlowLayout;
 @end
 
 

+ 17 - 12
MiMoLive/Pods/TZImagePickerController/TZImagePickerController/TZImagePickerController/TZImagePickerController.m

@@ -4,7 +4,7 @@
 //
 //  Created by 谭真 on 15/12/24.
 //  Copyright © 2015年 谭真. All rights reserved.
-//  version 3.8.4 - 2023.11.21
+//  version 3.8.9 - 2025.5.27
 //  更多信息,请前往项目的github地址:https://github.com/banchichen/TZImagePickerController
 
 #import "TZImagePickerController.h"
@@ -193,7 +193,6 @@
         self.allowTakeVideo = YES;
         self.videoMaximumDuration = 10 * 60;
         self.sortAscendingByModificationDate = YES;
-        self.autoDismiss = YES;
         self.columnNumber = columnNumber;
         [self configDefaultSetting];
         
@@ -289,6 +288,7 @@
 }
 
 - (void)configDefaultSetting {
+    self.autoDismiss = YES;
     self.autoSelectCurrentWhenDone = YES;
     self.timeout = 30;
     self.photoWidth = 828.0;
@@ -658,7 +658,7 @@
 }
 
 - (void)settingBtnClick {
-    [[UIApplication sharedApplication] openURL:[NSURL URLWithString:UIApplicationOpenSettingsURLString]];
+    [[UIApplication sharedApplication] openURL:[NSURL URLWithString:UIApplicationOpenSettingsURLString] options:@{} completionHandler:nil];
 }
 
 - (void)pushViewController:(UIViewController *)viewController animated:(BOOL)animated {
@@ -680,15 +680,6 @@
     [_selectedAssetIds removeObject:model.asset.localIdentifier];
 }
 
-- (void)setSelectedModels:(NSMutableArray<TZAssetModel *> *)selectedModels {
-    _selectedModels = selectedModels;
-    NSMutableArray *selectedAssetIds = [NSMutableArray array];
-    for (TZAssetModel *model in selectedModels) {
-        [selectedAssetIds addObject:model.asset.localIdentifier];
-    }
-    _selectedAssetIds = selectedAssetIds;
-}
-
 - (UIImage *)createImageWithColor:(UIColor *)color size:(CGSize)size radius:(CGFloat)radius {
     if (!color) {
         color = self.iconThemeColor;
@@ -951,6 +942,16 @@
 @end
 
 
+// 适配RTL的UICollectionViewFlowLayout
+@interface TZRTLLayout : UICollectionViewFlowLayout
+@end
+
+@implementation TZRTLLayout
+- (BOOL)flipsHorizontallyInOppositeLayoutDirection {
+    return [TZCommonTools tz_isRightToLeftLayout];
+}
+@end
+
 @implementation TZCommonTools
 
 + (UIEdgeInsets)tz_safeAreaInsets {
@@ -1068,6 +1069,10 @@
     return notSelectable;
 }
 
++ (UICollectionViewFlowLayout *)tz_rtlFlowLayout {
+    return [[TZRTLLayout alloc] init];
+}
+
 @end
 
 

+ 64 - 25
MiMoLive/Pods/TZImagePickerController/TZImagePickerController/TZImagePickerController/TZPhotoPickerController.m

@@ -151,7 +151,6 @@ static CGFloat itemMargin = 5;
         [self configCollectionView];
         self->_collectionView.hidden = YES;
         [self configBottomToolBar];
-        [self refreshBottomToolBarStatus];
         [self prepareScrollCollectionViewToBottom];
     });
 }
@@ -176,7 +175,7 @@ static CGFloat itemMargin = 5;
 
 - (void)configCollectionView {
     if (!_collectionView) {
-        _layout = [[UICollectionViewFlowLayout alloc] init];
+        _layout = [TZCommonTools tz_rtlFlowLayout];
         _collectionView = [[TZCollectionView alloc] initWithFrame:CGRectZero collectionViewLayout:_layout];
         if (@available(iOS 13.0, *)) {
             _collectionView.backgroundColor = UIColor.tertiarySystemBackgroundColor;
@@ -204,18 +203,23 @@ static CGFloat itemMargin = 5;
     
     _collectionView.contentSize = CGSizeMake(self.view.tz_width, (([self getAllCellCount] + self.columnNumber - 1) / self.columnNumber) * self.view.tz_width);
     if (_models.count == 0) {
-        _noDataLabel = [UILabel new];
+        [_collectionView addSubview:self.noDataLabel];
+    } else if (_noDataLabel) {
+        [_noDataLabel removeFromSuperview];
+        _noDataLabel = nil;
+    }
+}
+
+- (UILabel *)noDataLabel {
+    if (!_noDataLabel) {
+        _noDataLabel = [[UILabel alloc] initWithFrame:_collectionView.bounds];
         _noDataLabel.textAlignment = NSTextAlignmentCenter;
         _noDataLabel.text = [NSBundle tz_localizedStringForKey:@"No Photos or Videos"];
         CGFloat rgb = 153 / 256.0;
         _noDataLabel.textColor = [UIColor colorWithRed:rgb green:rgb blue:rgb alpha:1.0];
         _noDataLabel.font = [UIFont boldSystemFontOfSize:20];
-        _noDataLabel.frame = _collectionView.bounds;
-        [_collectionView addSubview:_noDataLabel];
-    } else if (_noDataLabel) {
-        [_noDataLabel removeFromSuperview];
-        _noDataLabel = nil;
     }
+    return _noDataLabel;
 }
 
 - (void)viewWillAppear:(BOOL)animated {
@@ -286,7 +290,7 @@ static CGFloat itemMargin = 5;
         _originalPhotoButton.enabled = tzImagePickerVc.selectedModels.count > 0;
         
         _originalPhotoLabel = [[UILabel alloc] init];
-        _originalPhotoLabel.textAlignment = NSTextAlignmentLeft;
+        _originalPhotoLabel.textAlignment = NSTextAlignmentNatural;
         _originalPhotoLabel.font = [UIFont systemFontOfSize:16];
         if (@available(iOS 13.0, *)) {
             _originalPhotoLabel.textColor = [UIColor labelColor];
@@ -365,8 +369,11 @@ static CGFloat itemMargin = 5;
     CGFloat collectionViewHeight = 0;
     CGFloat naviBarHeight = self.navigationController.navigationBar.tz_height;
     CGFloat footerTipViewH = _authorizationLimited ? 80 : 0;
+    
     BOOL isStatusBarHidden = [UIApplication sharedApplication].isStatusBarHidden;
     BOOL isFullScreen = self.view.tz_height == [UIScreen mainScreen].bounds.size.height;
+    BOOL isRTL = [TZCommonTools tz_isRightToLeftLayout];
+    
     CGFloat toolBarHeight = 50 + [TZCommonTools tz_safeAreaInsets].bottom;
     if (self.navigationController.navigationBar.isTranslucent) {
         top = naviBarHeight;
@@ -405,16 +412,33 @@ static CGFloat itemMargin = 5;
     if (!tzImagePickerVc.allowPreview) {
         previewWidth = 0.0;
     }
-    _previewButton.frame = CGRectMake(10, 3, previewWidth, 44);
-    _previewButton.tz_width = !tzImagePickerVc.showSelectBtn ? 0 : previewWidth;
+    previewWidth = !tzImagePickerVc.showSelectBtn ? 0 : previewWidth;
+    if (isRTL) {
+        _previewButton.frame = CGRectMake(self.view.tz_width - previewWidth - 10, 3, previewWidth, 44);
+    } else {
+        _previewButton.frame = CGRectMake(10, 3, previewWidth, 44);
+    }
+    
     if (tzImagePickerVc.allowPickingOriginalPhoto) {
         CGFloat fullImageWidth = [tzImagePickerVc.fullImageBtnTitleStr boundingRectWithSize:CGSizeMake(CGFLOAT_MAX, CGFLOAT_MAX) options:NSStringDrawingUsesFontLeading attributes:@{NSFontAttributeName:[UIFont systemFontOfSize:13]} context:nil].size.width;
-        _originalPhotoButton.frame = CGRectMake(CGRectGetMaxX(_previewButton.frame), 0, fullImageWidth + 56, 50);
-        _originalPhotoLabel.frame = CGRectMake(fullImageWidth + 46, 0, 80, 50);
+        if (isRTL) {
+            _originalPhotoButton.frame = CGRectMake(_previewButton.frame.origin.x - (fullImageWidth + 56), 0, fullImageWidth + 56, 50);
+            _originalPhotoLabel.frame = CGRectMake(-80 + 11, 0, 80, 50);
+        } else {
+            _originalPhotoButton.frame = CGRectMake(CGRectGetMaxX(_previewButton.frame), 0, fullImageWidth + 56, 50);
+            _originalPhotoLabel.frame = CGRectMake(fullImageWidth + 46, 0, 80, 50);
+        }
     }
+    
     [_doneButton sizeToFit];
-    _doneButton.frame = CGRectMake(self.view.tz_width - _doneButton.tz_width - 12, 0, MAX(44, _doneButton.tz_width), 50);
-    _numberImageView.frame = CGRectMake(_doneButton.tz_left - 24 - 5, 13, 24, 24);
+    CGFloat donwButtonWidth = MAX(44, _doneButton.tz_width);
+    if (isRTL) {
+        _doneButton.frame = CGRectMake(12, 0, donwButtonWidth, 50);
+        _numberImageView.frame = CGRectMake(_doneButton.tz_right + 5, 13, 24, 24);
+    } else {
+        _doneButton.frame = CGRectMake(self.view.tz_width - donwButtonWidth - 12, 0, donwButtonWidth, 50);
+        _numberImageView.frame = CGRectMake(_doneButton.tz_left - 24 - 5, 13, 24, 24);
+    }
     _numberLabel.frame = _numberImageView.frame;
     _divideLine.frame = CGRectMake(0, 0, self.view.tz_width, 1);
     
@@ -793,7 +817,7 @@ static CGFloat itemMargin = 5;
         UIAlertAction *cancelAct = [UIAlertAction actionWithTitle:[NSBundle tz_localizedStringForKey:@"Cancel"] style:UIAlertActionStyleCancel handler:nil];
         [alertController addAction:cancelAct];
         UIAlertAction *settingAct = [UIAlertAction actionWithTitle:[NSBundle tz_localizedStringForKey:@"Setting"] style:UIAlertActionStyleDefault handler:^(UIAlertAction * _Nonnull action) {
-            [[UIApplication sharedApplication] openURL:[NSURL URLWithString:UIApplicationOpenSettingsURLString]];
+            [[UIApplication sharedApplication] openURL:[NSURL URLWithString:UIApplicationOpenSettingsURLString] options:@{} completionHandler:nil];
         }];
         [alertController addAction:settingAct];
         [self.navigationController presentViewController:alertController animated:YES completion:nil];
@@ -812,7 +836,7 @@ static CGFloat itemMargin = 5;
 }
 
 - (void)openSettingsApplication {
-    [[UIApplication sharedApplication] openURL:[NSURL URLWithString:UIApplicationOpenSettingsURLString]];
+    [[UIApplication sharedApplication] openURL:[NSURL URLWithString:UIApplicationOpenSettingsURLString] options:@{} completionHandler:nil];
 }
 
 - (void)addMorePhoto {
@@ -961,16 +985,12 @@ static CGFloat itemMargin = 5;
         [selectedAssets addObject:model.asset];
     }
     // 拿到了最新的models,在此刷新照片选中状态
-    // 由于可能有照片权限变化,也需要刷新selectedModels https://github.com/banchichen/TZImagePickerController/pull/1658
-    NSMutableArray *newSelectedModels = [NSMutableArray array];
     for (TZAssetModel *model in _models) {
         model.isSelected = NO;
         if ([selectedAssets containsObject:model.asset]) {
             model.isSelected = YES;
-            [newSelectedModels addObject:model];
         }
     }
-    tzImagePickerVc.selectedModels = newSelectedModels;
 }
 
 /// 选中/取消选中某张照片
@@ -1110,10 +1130,14 @@ static CGFloat itemMargin = 5;
         PHFetchResultChangeDetails *changeDetail = [changeInstance changeDetailsForFetchResult:self.model.result];
         if (changeDetail == nil) return;
         if ([[TZImageManager manager] isPHAuthorizationStatusLimited]) {
-            self.model.result = changeDetail.fetchResultAfterChanges;
-            self.model.count = changeDetail.fetchResultAfterChanges.count;
-            [self fetchAssetModels];
-        } else if (changeDetail.hasIncrementalChanges == NO) {
+            NSArray *changedObjects = [changeDetail changedObjects];
+            changeDetail = [PHFetchResultChangeDetails changeDetailsFromFetchResult:self.model.result toFetchResult:changeDetail.fetchResultAfterChanges changedObjects:changedObjects];
+            if (changeDetail && changeDetail.removedObjects.count) {
+                [self handleRemovedAssets:changeDetail.removedObjects];
+            }
+        }
+
+        if (changeDetail.hasIncrementalChanges == NO) {
             [self.model refreshFetchResult];
             [self fetchAssetModels];
         } else {
@@ -1129,6 +1153,21 @@ static CGFloat itemMargin = 5;
     });
 }
 
+- (void)handleRemovedAssets:(NSArray<PHAsset *> *)removedObjects {
+    TZImagePickerController *tzImagePickerVc = (TZImagePickerController *)self.navigationController;
+    for (PHAsset *asset in removedObjects) {
+        Boolean isSelected = [tzImagePickerVc.selectedAssetIds containsObject:asset.localIdentifier];
+        if (!isSelected) continue;
+        NSArray *selectedModels = [NSArray arrayWithArray:tzImagePickerVc.selectedModels];
+        for (TZAssetModel *model_item in selectedModels) {
+            if ([asset.localIdentifier isEqualToString:model_item.asset.localIdentifier]) {
+                [tzImagePickerVc removeSelectedModel:model_item];
+            }
+        }
+        [self refreshBottomToolBarStatus];
+    }
+}
+
 #pragma mark - Asset Caching
 
 - (void)resetCachedAssets {

+ 5 - 1
MiMoLive/Pods/TZImagePickerController/TZImagePickerController/TZImagePickerController/TZPhotoPreviewCell.m

@@ -237,7 +237,7 @@
         [self resizeSubviews];
         if (self.imageView.tz_height && self.allowCrop) {
             CGFloat scale = MAX(self.cropRect.size.width / self.imageView.tz_width, self.cropRect.size.height / self.imageView.tz_height);
-            if (self.scaleAspectFillCrop && scale > 1) { // 如果设置图片缩放裁剪并且图片需要缩放
+            if (self.scaleAspectFillCrop && scale != 1) { // 如果设置图片缩放裁剪并且图片需要缩放
                 CGFloat multiple = self.scrollView.maximumZoomScale / self.scrollView.minimumZoomScale;
                 self.scrollView.minimumZoomScale = scale;
                 self.scrollView.maximumZoomScale = scale * MAX(multiple, 2);
@@ -318,6 +318,10 @@
         if (aspectRatio > 1.5) {
             self.scrollView.maximumZoomScale *= aspectRatio / 1.5;
         }
+        // 优化超长图片的显示
+        else if (aspectRatio < 0.667) {
+            self.scrollView.maximumZoomScale *= 0.667 / aspectRatio;
+        }
     }
 }
 

+ 33 - 11
MiMoLive/Pods/TZImagePickerController/TZImagePickerController/TZImagePickerController/TZPhotoPreviewController.m

@@ -149,7 +149,7 @@
         [_originalPhotoButton setImage:_tzImagePickerVc.photoOriginSelImage forState:UIControlStateSelected];
         
         _originalPhotoLabel = [[UILabel alloc] init];
-        _originalPhotoLabel.textAlignment = NSTextAlignmentLeft;
+        _originalPhotoLabel.textAlignment = NSTextAlignmentNatural;
         _originalPhotoLabel.font = [UIFont systemFontOfSize:13];
         _originalPhotoLabel.textColor = [UIColor whiteColor];
         _originalPhotoLabel.backgroundColor = [UIColor clearColor];
@@ -194,7 +194,7 @@
 }
 
 - (void)configCollectionView {
-    _layout = [[UICollectionViewFlowLayout alloc] init];
+    _layout = [TZCommonTools tz_rtlFlowLayout];
     _layout.scrollDirection = UICollectionViewScrollDirectionHorizontal;
     _collectionView = [[UICollectionView alloc] initWithFrame:CGRectZero collectionViewLayout:_layout];
     _collectionView.backgroundColor = [UIColor blackColor];
@@ -260,12 +260,22 @@
     TZImagePickerController *_tzImagePickerVc = (TZImagePickerController *)self.navigationController;
     
     BOOL isFullScreen = self.view.tz_height == [UIScreen mainScreen].bounds.size.height;
+    BOOL isRTL = [TZCommonTools tz_isRightToLeftLayout];
+    
     CGFloat statusBarHeight = isFullScreen ? [TZCommonTools tz_statusBarHeight] : 0;
     CGFloat statusBarHeightInterval = isFullScreen ? (statusBarHeight - 20) : 0;
     CGFloat naviBarHeight = statusBarHeight + _tzImagePickerVc.navigationBar.tz_height;
     _naviBar.frame = CGRectMake(0, 0, self.view.tz_width, naviBarHeight);
-    _backButton.frame = CGRectMake(10, 10 + statusBarHeightInterval, 44, 44);
-    _selectButton.frame = CGRectMake(self.view.tz_width - 56, 10 + statusBarHeightInterval, 44, 44);
+    
+    if (isRTL) {
+        _backButton.frame = CGRectMake(self.view.tz_width - 54, 10 + statusBarHeightInterval, 44, 44);
+        _backButton.layer.transform = CATransform3DMakeRotation(M_PI, 0, 1, 0);
+        _selectButton.frame = CGRectMake(12, 10 + statusBarHeightInterval, 44, 44);
+    } else {
+        _backButton.frame = CGRectMake(10, 10 + statusBarHeightInterval, 44, 44);
+        _selectButton.frame = CGRectMake(self.view.tz_width - 56, 10 + statusBarHeightInterval, 44, 44);
+    }
+    
     _indexLabel.frame = _selectButton.frame;
     
     _layout.itemSize = CGSizeMake(self.view.tz_width + 20, self.view.tz_height);
@@ -286,12 +296,23 @@
     _toolBar.frame = CGRectMake(0, toolBarTop, self.view.tz_width, toolBarHeight);
     if (_tzImagePickerVc.allowPickingOriginalPhoto) {
         CGFloat fullImageWidth = [_tzImagePickerVc.fullImageBtnTitleStr boundingRectWithSize:CGSizeMake(CGFLOAT_MAX, CGFLOAT_MAX) options:NSStringDrawingUsesFontLeading attributes:@{NSFontAttributeName:[UIFont systemFontOfSize:13]} context:nil].size.width;
-        _originalPhotoButton.frame = CGRectMake(0, 0, fullImageWidth + 56, 44);
-        _originalPhotoLabel.frame = CGRectMake(fullImageWidth + 42, 0, 80, 44);
+        if (isRTL) {
+            _originalPhotoButton.frame = CGRectMake(self.view.tz_width - (fullImageWidth + 56), 0, fullImageWidth + 56, 44);
+            _originalPhotoLabel.frame = CGRectMake(-80 + 15, 0, 80, 44);
+        } else {
+            _originalPhotoButton.frame = CGRectMake(0, 0, fullImageWidth + 56, 44);
+            _originalPhotoLabel.frame = CGRectMake(fullImageWidth + 42, 0, 80, 44);
+        }
     }
+    
     [_doneButton sizeToFit];
-    _doneButton.frame = CGRectMake(self.view.tz_width - _doneButton.tz_width - 12, 0, MAX(44, _doneButton.tz_width), 44);
-    _numberImageView.frame = CGRectMake(_doneButton.tz_left - 24 - 5, 10, 24, 24);
+    if (isRTL) {
+        _doneButton.frame = CGRectMake(12, 0, MAX(44, _doneButton.tz_width), 44);
+        _numberImageView.frame = CGRectMake(_doneButton.tz_right + 5, 10, 24, 24);
+    } else {
+        _doneButton.frame = CGRectMake(self.view.tz_width - _doneButton.tz_width - 12, 0, MAX(44, _doneButton.tz_width), 44);
+        _numberImageView.frame = CGRectMake(_doneButton.tz_left - 24 - 5, 10, 24, 24);
+    }
     _numberLabel.frame = _numberImageView.frame;
     
     [self configCropView];
@@ -651,9 +672,10 @@
     }];
 }
 
-- (NSInteger)currentIndex {
-    return [TZCommonTools tz_isRightToLeftLayout] ? self.models.count - _currentIndex - 1 : _currentIndex;
-}
+// TZRTLLayout已经自动适配,无需手动换算
+//- (NSInteger)currentIndex {
+//    return [TZCommonTools tz_isRightToLeftLayout] ? self.models.count - _currentIndex - 1 : _currentIndex;
+//}
 
 /// 选中/取消选中某张照片
 - (void)setAsset:(PHAsset *)asset isSelect:(BOOL)isSelect {

+ 19 - 5
MiMoLive/Pods/TZImagePickerController/TZImagePickerController/TZImagePickerController/TZVideoCropController.m

@@ -141,10 +141,10 @@
     layout.itemSize = CGSizeMake(_itemW, _itemW * 2);
     layout.minimumLineSpacing = 0;
     layout.minimumInteritemSpacing = 0;
+    layout.sectionInset = UIEdgeInsetsMake(0, VideoEditLeftMargin + PanImageWidth, 0, VideoEditLeftMargin + PanImageWidth);
     _collectionView = [[UICollectionView alloc] initWithFrame:CGRectZero collectionViewLayout:layout];
     _collectionView.dataSource = self;
     _collectionView.delegate = self;
-    _collectionView.contentInset = UIEdgeInsetsMake(0, VideoEditLeftMargin + PanImageWidth, 0, VideoEditLeftMargin + PanImageWidth);
     _collectionView.clipsToBounds = NO;
     _collectionView.showsHorizontalScrollIndicator = NO;
     _collectionView.alwaysBounceHorizontal = YES;
@@ -179,10 +179,17 @@
     CGFloat toolBarHeight = 44 + [TZCommonTools tz_safeAreaInsets].bottom;
     CGFloat doneButtonWidth = [_doneButton.currentTitle boundingRectWithSize:CGSizeMake(CGFLOAT_MAX, CGFLOAT_MAX) options:NSStringDrawingUsesFontLeading attributes:@{NSFontAttributeName:[UIFont systemFontOfSize:16]} context:nil].size.width;
     doneButtonWidth = MAX(44, doneButtonWidth);
-    _cancelButton.frame = CGRectMake(12, self.view.tz_height - toolBarHeight, 44, 44);
+    
     [_cancelButton sizeToFit];
-    _cancelButton.tz_height = 44;
-    _doneButton.frame = CGRectMake(self.view.tz_width - doneButtonWidth - 12, self.view.tz_height - toolBarHeight, doneButtonWidth, 44);
+    
+    if ([TZCommonTools tz_isRightToLeftLayout]) {
+        _doneButton.frame = CGRectMake(12, self.view.tz_height - toolBarHeight, doneButtonWidth, 44);
+        _cancelButton.frame = CGRectMake(self.view.tz_width - _cancelButton.tz_width - 12, self.view.tz_height - toolBarHeight, _cancelButton.tz_width, 44);
+    } else {
+        _doneButton.frame = CGRectMake(self.view.tz_width - doneButtonWidth - 12, self.view.tz_height - toolBarHeight, doneButtonWidth, 44);
+        _cancelButton.frame = CGRectMake(12, self.view.tz_height - toolBarHeight, _cancelButton.tz_width, 44);
+    }
+    
     _playButton.frame = CGRectMake(0, statusBarAndNaviBarHeight, self.view.tz_width, self.view.tz_height - statusBarAndNaviBarHeight - toolBarHeight);
     
     CGFloat collectionViewH = (self.view.tz_width - VideoEditLeftMargin * 2 - 2 * PanImageWidth) / 10.0 * 2;
@@ -264,7 +271,12 @@
 
 - (__kindof UICollectionViewCell *)collectionView:(UICollectionView *)collectionView cellForItemAtIndexPath:(NSIndexPath *)indexPath {
     TZVideoPictureCell *cell = [collectionView dequeueReusableCellWithReuseIdentifier:@"TZVideoPictureCell" forIndexPath:indexPath];
-    cell.imgView.image = self.videoImgArray[indexPath.item];
+    // 在RTL环境下,普通的UICollectionViewFlowLayout的cell是从右到左排列的,所以这里【需要】反向取值
+    if ([TZCommonTools tz_isRightToLeftLayout]) {
+        cell.imgView.image = self.videoImgArray[self.videoImgArray.count - 1 - indexPath.item];
+    } else {
+        cell.imgView.image = self.videoImgArray[indexPath.item];
+    }
     return cell;
 }
 
@@ -272,6 +284,8 @@
 
 - (void)scrollViewDidScroll:(UIScrollView *)scrollView {
     if (!_isDraging) return;
+    
+    // 在RTL环境下,普通的UICollectionViewFlowLayout的cell虽然是从右到左排列的,但是contentOffset依旧是从左到右的,所以这里【不需要】反向取值
     CGFloat offsetX = scrollView.contentOffset.x;
     if (offsetX - _collectionViewBeginOffsetX >= self.view.tz_width) {
         [self.collectionView setContentOffset:CGPointMake(self.view.tz_width + _collectionViewBeginOffsetX, 0) animated:NO];

+ 8 - 1
MiMoLive/Pods/TZImagePickerController/TZImagePickerController/TZImagePickerController/TZVideoEditedPreviewController.m

@@ -88,7 +88,14 @@
     CGFloat toolBarHeight = 44 + [TZCommonTools tz_safeAreaInsets].bottom;
     _toolBar.frame = CGRectMake(0, self.view.tz_height - toolBarHeight, self.view.tz_width, toolBarHeight);
     [_doneButton sizeToFit];
-    _doneButton.frame = CGRectMake(self.view.tz_width - _doneButton.tz_width - 12, 0, MAX(44, _doneButton.tz_width), 44);
+    
+    CGFloat doneButtonWidth = MAX(44, _doneButton.tz_width);
+    if ([TZCommonTools tz_isRightToLeftLayout]) {
+        _doneButton.frame = CGRectMake(12, 0, doneButtonWidth, 44);
+    } else {
+        _doneButton.frame = CGRectMake(self.view.tz_width - doneButtonWidth - 12, 0, doneButtonWidth, 44);
+    }
+    
     _playButton.frame = CGRectMake(0, statusBarAndNaviBarHeight, self.view.tz_width, self.view.tz_height - statusBarAndNaviBarHeight - toolBarHeight);
     _playerLayer.frame = self.view.bounds;
 }

+ 12 - 3
MiMoLive/Pods/TZImagePickerController/TZImagePickerController/TZImagePickerController/TZVideoPlayerController.m

@@ -170,18 +170,27 @@
     TZImagePickerController *tzImagePickerVc = (TZImagePickerController *)self.navigationController;
     
     BOOL isFullScreen = self.view.tz_height == [UIScreen mainScreen].bounds.size.height;
+    BOOL isRTL = [TZCommonTools tz_isRightToLeftLayout];
+    
     CGFloat statusBarHeight = isFullScreen ? [TZCommonTools tz_statusBarHeight] : 0;
     CGFloat statusBarAndNaviBarHeight = statusBarHeight + self.navigationController.navigationBar.tz_height;
     _playerLayer.frame = self.view.bounds;
     CGFloat toolBarHeight = 44 + [TZCommonTools tz_safeAreaInsets].bottom;
     _toolBar.frame = CGRectMake(0, self.view.tz_height - toolBarHeight, self.view.tz_width, toolBarHeight);
     [_doneButton sizeToFit];
-    _doneButton.frame = CGRectMake(self.view.tz_width - _doneButton.tz_width - 12, 0, MAX(44, _doneButton.tz_width), 44);
+    if (isRTL) {
+        _doneButton.frame = CGRectMake(12, 0, MAX(44, _doneButton.tz_width), 44);
+    } else {
+        _doneButton.frame = CGRectMake(self.view.tz_width - _doneButton.tz_width - 12, 0, MAX(44, _doneButton.tz_width), 44);
+    }
     _playButton.frame = CGRectMake(0, statusBarAndNaviBarHeight, self.view.tz_width, self.view.tz_height - statusBarAndNaviBarHeight - toolBarHeight);
     if (tzImagePickerVc.allowEditVideo) {
-        _editButton.frame = CGRectMake(12, 0, 44, 44);
         [_editButton sizeToFit];
-        _editButton.tz_height = 44;
+        if (isRTL) {
+            _editButton.frame = CGRectMake(self.view.tz_width - _editButton.tz_width - 12, 0, _editButton.tz_width, 44);
+        } else {
+            _editButton.frame = CGRectMake(12, 0, _editButton.tz_width, 44);
+        }
     }
     if (tzImagePickerVc.videoPreviewPageDidLayoutSubviewsBlock) {
         tzImagePickerVc.videoPreviewPageDidLayoutSubviewsBlock(_playButton, _toolBar, _editButton, _doneButton);

+ 1 - 1
MiMoLive/Pods/Target Support Files/TZImagePickerController/TZImagePickerController-Info.plist

@@ -15,7 +15,7 @@
   <key>CFBundlePackageType</key>
   <string>FMWK</string>
   <key>CFBundleShortVersionString</key>
-  <string>3.8.4</string>
+  <string>3.8.9</string>
   <key>CFBundleSignature</key>
   <string>????</string>
   <key>CFBundleVersion</key>

+ 1 - 1
MiMoLive/podfile

@@ -13,7 +13,7 @@ target 'MiMoLive' do
   pod 'Masonry', '~> 1.1.0'
   pod 'IQKeyboardManager', '~> 6.5.15'
   pod 'MJRefresh', '~> 3.7.5'
-  pod 'TZImagePickerController', '~> 3.8.3'
+  pod 'TZImagePickerController'
   
   #因为修改不便, EaseIMKit改为手动导入
   #pod 'EaseIMKit',  :git => 'https://github.com/cabbageTingZhang/easeui_ios.git'