瀏覽代碼

修改 bug

100Years 3 月之前
父節點
當前提交
f738c5c567
共有 44 個文件被更改,包括 535 次插入112 次删除
  1. 24 8
      TSLiveWallpaper.xcodeproj/project.pbxproj
  2. 78 0
      TSLiveWallpaper.xcodeproj/xcshareddata/xcschemes/TSLiveWallpaper.xcscheme
  3. 8 0
      TSLiveWallpaper.xcodeproj/xcuserdata/100years.xcuserdatad/xcschemes/xcschememanagement.plist
  4. 二進制
      TSLiveWallpaper/Assets.xcassets/Common/App-Icon.imageset/App-Icon.png
  5. 1 2
      TSLiveWallpaper/Assets.xcassets/Common/App-Icon.imageset/Contents.json
  6. 2 2
      TSLiveWallpaper/Assets.xcassets/Common/icon_live.imageset/Contents.json
  7. 二進制
      TSLiveWallpaper/Assets.xcassets/Common/icon_live.imageset/icon_live@2x.png
  8. 二進制
      TSLiveWallpaper/Assets.xcassets/Common/icon_live.imageset/icon_live@3x.png
  9. 1 2
      TSLiveWallpaper/Assets.xcassets/Common/live_tutorials.imageset/Contents.json
  10. 二進制
      TSLiveWallpaper/Assets.xcassets/Common/live_tutorials.imageset/live_tutorials@2x.png
  11. 二進制
      TSLiveWallpaper/Assets.xcassets/Common/radiobox_selected.imageset/radiobox_selected@2x.png
  12. 二進制
      TSLiveWallpaper/Assets.xcassets/Common/radiobox_selected.imageset/radiobox_selected@3x.png
  13. 二進制
      TSLiveWallpaper/Assets.xcassets/Common/radiobox_unSelect.imageset/radiobox_unSelect@2x.png
  14. 二進制
      TSLiveWallpaper/Assets.xcassets/Common/radiobox_unSelect.imageset/radiobox_unSelect@3x.png
  15. 二進制
      TSLiveWallpaper/Assets.xcassets/EditVideo/hx_editor_video_control_arrow_left.imageset/hx_editor_video_control_arrow_left@2x.png
  16. 二進制
      TSLiveWallpaper/Assets.xcassets/EditVideo/hx_editor_video_control_arrow_left.imageset/hx_editor_video_control_arrow_left@3x.png
  17. 0 22
      TSLiveWallpaper/Assets.xcassets/EditVideo/hx_editor_video_control_arrow_right.imageset/Contents.json
  18. 二進制
      TSLiveWallpaper/Assets.xcassets/EditVideo/hx_editor_video_control_arrow_right.imageset/hx_editor_video_control_arrow_right@2x.png
  19. 二進制
      TSLiveWallpaper/Assets.xcassets/EditVideo/hx_editor_video_control_arrow_right.imageset/hx_editor_video_control_arrow_right@3x.png
  20. 二進制
      TSLiveWallpaper/Assets.xcassets/EditVideo/hx_editor_video_control_pause.imageset/hx_editor_video_control_pause@2x.png
  21. 二進制
      TSLiveWallpaper/Assets.xcassets/EditVideo/hx_editor_video_control_pause.imageset/hx_editor_video_control_pause@3x.png
  22. 二進制
      TSLiveWallpaper/Assets.xcassets/EditVideo/hx_editor_video_control_play.imageset/hx_editor_video_control_play@2x.png
  23. 二進制
      TSLiveWallpaper/Assets.xcassets/EditVideo/hx_editor_video_control_play.imageset/hx_editor_video_control_play@3x.png
  24. 111 0
      TSLiveWallpaper/Business/TSBusinessWebVC/TSBusinessWebVC.swift
  25. 11 26
      TSLiveWallpaper/Business/TSEditLiveVC/TSEditLiveVC.swift
  26. 5 1
      TSLiveWallpaper/Business/TSEditLiveVC/TSEditVideoVC/GPVideoClipper/GPVideoClipperView.swift
  27. 14 1
      TSLiveWallpaper/Business/TSHomeVC/TSHomeCell.swift
  28. 1 1
      TSLiveWallpaper/Business/TSHomeVC/TSHomeVC.swift
  29. 3 3
      TSLiveWallpaper/Business/TSHomeVC/TSLiveWallpaperBrowseVC/EasyVC/TSLiveWallpaperBrowseVC.swift
  30. 39 1
      TSLiveWallpaper/Business/TSHomeVC/TSLiveWallpaperBrowseVC/EasyVC/TSLiveWallpaperCopyrightVC.swift
  31. 10 0
      TSLiveWallpaper/Business/TSHomeVC/TSLiveWallpaperBrowseVC/EasyVC/TSLiveWallpaperTutorialsVC.swift
  32. 16 4
      TSLiveWallpaper/Business/TSHomeVC/View/TSHomeTopBannerCell.swift
  33. 27 9
      TSLiveWallpaper/Business/TSMineVC/TSMineVC.swift
  34. 38 1
      TSLiveWallpaper/Business/TSRandomWallpaperVC/EasyVC/TSRandomWallpaperCopyrightVC.swift
  35. 17 2
      TSLiveWallpaper/Business/TSRandomWallpaperVC/EasyVC/TSRandomWallpaperTutorialsVC.swift
  36. 3 1
      TSLiveWallpaper/Business/TSRandomWallpaperVC/TSRandomWallpaperBrowseVC/TSRandomWallpaperBrowseVC.swift
  37. 29 13
      TSLiveWallpaper/Business/TSRandomWallpaperVC/TSRandomWallpaperVC.swift
  38. 16 4
      TSLiveWallpaper/Business/TSRandomWallpaperVC/TSRandomWallpaperView/TSRandomWallpaperBannerCell.swift
  39. 8 3
      TSLiveWallpaper/Business/TSViewTool/TSViewTool.swift
  40. 30 0
      TSLiveWallpaper/Common/Ex/UserDefault+Ex.swift
  41. 14 0
      TSLiveWallpaper/Common/GlobalImports/GlobalImports.swift
  42. 0 1
      TSLiveWallpaper/Common/ThirdParty/LivePhoto.swift
  43. 2 0
      TSLiveWallpaper/DataManger/Config/TSConfig.swift
  44. 27 5
      TSLiveWallpaper/DataManger/TSImageDataCenter.swift

+ 24 - 8
TSLiveWallpaper.xcodeproj/project.pbxproj

@@ -72,6 +72,8 @@
 		A839463C2D1D6E3600ABFF0D /* TSRandomWallpaperCopyrightVC.swift in Sources */ = {isa = PBXBuildFile; fileRef = A839463B2D1D6E3500ABFF0D /* TSRandomWallpaperCopyrightVC.swift */; };
 		A839463F2D1D6FB700ABFF0D /* TSLiveWallpaperTutorialsVC.swift in Sources */ = {isa = PBXBuildFile; fileRef = A839463E2D1D6FB600ABFF0D /* TSLiveWallpaperTutorialsVC.swift */; };
 		A83946432D1D701500ABFF0D /* TSLiveWallpaperCopyrightVC.swift in Sources */ = {isa = PBXBuildFile; fileRef = A83946422D1D701300ABFF0D /* TSLiveWallpaperCopyrightVC.swift */; };
+		A8477C972D22737900DF0B93 /* TSBusinessWebVC.swift in Sources */ = {isa = PBXBuildFile; fileRef = A8477C962D22737800DF0B93 /* TSBusinessWebVC.swift */; };
+		A8477C992D2291F800DF0B93 /* UserDefault+Ex.swift in Sources */ = {isa = PBXBuildFile; fileRef = A8477C982D2291F100DF0B93 /* UserDefault+Ex.swift */; };
 		A84C239A2D1E3A4300B61B55 /* GPVideoPlayerView.swift in Sources */ = {isa = PBXBuildFile; fileRef = A84C23962D1E3A4300B61B55 /* GPVideoPlayerView.swift */; };
 		A84C239B2D1E3A4300B61B55 /* GPVideoClipperController.swift in Sources */ = {isa = PBXBuildFile; fileRef = A84C23982D1E3A4300B61B55 /* GPVideoClipperController.swift */; };
 		A84C239C2D1E3A4300B61B55 /* GPVideoClipperView.swift in Sources */ = {isa = PBXBuildFile; fileRef = A84C23972D1E3A4300B61B55 /* GPVideoClipperView.swift */; };
@@ -154,6 +156,8 @@
 		A839463B2D1D6E3500ABFF0D /* TSRandomWallpaperCopyrightVC.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TSRandomWallpaperCopyrightVC.swift; sourceTree = "<group>"; };
 		A839463E2D1D6FB600ABFF0D /* TSLiveWallpaperTutorialsVC.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TSLiveWallpaperTutorialsVC.swift; sourceTree = "<group>"; };
 		A83946422D1D701300ABFF0D /* TSLiveWallpaperCopyrightVC.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TSLiveWallpaperCopyrightVC.swift; sourceTree = "<group>"; };
+		A8477C962D22737800DF0B93 /* TSBusinessWebVC.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TSBusinessWebVC.swift; sourceTree = "<group>"; };
+		A8477C982D2291F100DF0B93 /* UserDefault+Ex.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "UserDefault+Ex.swift"; sourceTree = "<group>"; };
 		A84C23952D1E3A4300B61B55 /* GPVideoConfigMaker.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = GPVideoConfigMaker.swift; sourceTree = "<group>"; };
 		A84C23962D1E3A4300B61B55 /* GPVideoPlayerView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = GPVideoPlayerView.swift; sourceTree = "<group>"; };
 		A84C23972D1E3A4300B61B55 /* GPVideoClipperView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = GPVideoClipperView.swift; sourceTree = "<group>"; };
@@ -241,6 +245,7 @@
 		A81CA4752D15778800A3AAC8 /* Ex */ = {
 			isa = PBXGroup;
 			children = (
+				A8477C982D2291F100DF0B93 /* UserDefault+Ex.swift */,
 				A81F5B4E2D19673500740085 /* AVAsset+Ex.swift */,
 				A81F5B312D18FA2E00740085 /* Component */,
 				A81CA4B72D16A6B600A3AAC8 /* View+Ex.swift */,
@@ -306,6 +311,7 @@
 		A81CA48C2D15855300A3AAC8 /* Business */ = {
 			isa = PBXGroup;
 			children = (
+				A8477C952D2272FB00DF0B93 /* TSBusinessWebVC */,
 				A81CA4A22D16747900A3AAC8 /* TSViewTool */,
 				A81CA4932D16527E00A3AAC8 /* TSEditLiveVC */,
 				A81CA4922D16525C00A3AAC8 /* TSRandomWallpaperVC */,
@@ -494,6 +500,14 @@
 			path = TSEditVideoVC;
 			sourceTree = "<group>";
 		};
+		A8477C952D2272FB00DF0B93 /* TSBusinessWebVC */ = {
+			isa = PBXGroup;
+			children = (
+				A8477C962D22737800DF0B93 /* TSBusinessWebVC.swift */,
+			);
+			path = TSBusinessWebVC;
+			sourceTree = "<group>";
+		};
 		A84C23992D1E3A4300B61B55 /* GPVideoClipper */ = {
 			isa = PBXGroup;
 			children = (
@@ -683,6 +697,7 @@
 				A81CA49D2D1654B600A3AAC8 /* UITableView+Ex.swift in Sources */,
 				A81CA4692D156AB600A3AAC8 /* TSBaseVC.swift in Sources */,
 				A81CA4992D1652C400A3AAC8 /* TSMineVC.swift in Sources */,
+				A8477C992D2291F800DF0B93 /* UserDefault+Ex.swift in Sources */,
 				A81CA46E2D156C7000A3AAC8 /* GlobalImports.swift in Sources */,
 				A81F5B4D2D1965F800740085 /* UIImage+Ex.swift in Sources */,
 				A81CA4832D157F5C00A3AAC8 /* UIImageView+Ex.swift in Sources */,
@@ -738,6 +753,7 @@
 				A81F5B562D1982BF00740085 /* TSImageDataCenter.swift in Sources */,
 				A839462F2D1D64BF00ABFF0D /* TSAboutUsVC.swift in Sources */,
 				A81CA4812D157B1300A3AAC8 /* UIFont+Ex.swift in Sources */,
+				A8477C972D22737900DF0B93 /* TSBusinessWebVC.swift in Sources */,
 				A81CA4B62D169F2400A3AAC8 /* WindowHelper.swift in Sources */,
 				A81CA4972D1652BD00A3AAC8 /* TSRandomWallpaperVC.swift in Sources */,
 				A81CA4A82D16918900A3AAC8 /* Array+Ex.swift in Sources */,
@@ -780,24 +796,24 @@
 				ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
 				CODE_SIGN_IDENTITY = "Apple Development";
 				CODE_SIGN_STYLE = Automatic;
-				CURRENT_PROJECT_VERSION = 1;
+				CURRENT_PROJECT_VERSION = 2;
 				DEVELOPMENT_TEAM = 65UD255J84;
 				ENABLE_APP_SANDBOX = NO;
 				ENABLE_USER_SCRIPT_SANDBOXING = NO;
 				GENERATE_INFOPLIST_FILE = YES;
 				INFOPLIST_FILE = TSLiveWallpaper/Info.plist;
-				INFOPLIST_KEY_CFBundleDisplayName = "Live Random Wallpapers";
+				INFOPLIST_KEY_CFBundleDisplayName = "Live Live";
 				INFOPLIST_KEY_NSPhotoLibraryUsageDescription = NSPhotoLibraryUsageDescription;
 				INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES;
 				INFOPLIST_KEY_UILaunchStoryboardName = LaunchScreen;
 				INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight";
 				INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight";
-				IPHONEOS_DEPLOYMENT_TARGET = 15.6;
+				IPHONEOS_DEPLOYMENT_TARGET = 14.0;
 				LD_RUNPATH_SEARCH_PATHS = (
 					"$(inherited)",
 					"@executable_path/Frameworks",
 				);
-				MARKETING_VERSION = 1.0;
+				MARKETING_VERSION = 1.0.0;
 				PRODUCT_BUNDLE_IDENTIFIER = musicplayer.offline.com;
 				PRODUCT_NAME = "$(TARGET_NAME)";
 				PROVISIONING_PROFILE_SPECIFIER = "";
@@ -815,24 +831,24 @@
 				ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
 				CODE_SIGN_IDENTITY = "Apple Development";
 				CODE_SIGN_STYLE = Automatic;
-				CURRENT_PROJECT_VERSION = 1;
+				CURRENT_PROJECT_VERSION = 2;
 				DEVELOPMENT_TEAM = 65UD255J84;
 				ENABLE_APP_SANDBOX = NO;
 				ENABLE_USER_SCRIPT_SANDBOXING = NO;
 				GENERATE_INFOPLIST_FILE = YES;
 				INFOPLIST_FILE = TSLiveWallpaper/Info.plist;
-				INFOPLIST_KEY_CFBundleDisplayName = "Live Random Wallpapers";
+				INFOPLIST_KEY_CFBundleDisplayName = "Live Live";
 				INFOPLIST_KEY_NSPhotoLibraryUsageDescription = NSPhotoLibraryUsageDescription;
 				INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES;
 				INFOPLIST_KEY_UILaunchStoryboardName = LaunchScreen;
 				INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight";
 				INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight";
-				IPHONEOS_DEPLOYMENT_TARGET = 15.6;
+				IPHONEOS_DEPLOYMENT_TARGET = 14.0;
 				LD_RUNPATH_SEARCH_PATHS = (
 					"$(inherited)",
 					"@executable_path/Frameworks",
 				);
-				MARKETING_VERSION = 1.0;
+				MARKETING_VERSION = 1.0.0;
 				PRODUCT_BUNDLE_IDENTIFIER = musicplayer.offline.com;
 				PRODUCT_NAME = "$(TARGET_NAME)";
 				PROVISIONING_PROFILE_SPECIFIER = "";

+ 78 - 0
TSLiveWallpaper.xcodeproj/xcshareddata/xcschemes/TSLiveWallpaper.xcscheme

@@ -0,0 +1,78 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<Scheme
+   LastUpgradeVersion = "1620"
+   version = "1.7">
+   <BuildAction
+      parallelizeBuildables = "YES"
+      buildImplicitDependencies = "YES"
+      buildArchitectures = "Automatic">
+      <BuildActionEntries>
+         <BuildActionEntry
+            buildForTesting = "YES"
+            buildForRunning = "YES"
+            buildForProfiling = "YES"
+            buildForArchiving = "YES"
+            buildForAnalyzing = "YES">
+            <BuildableReference
+               BuildableIdentifier = "primary"
+               BlueprintIdentifier = "A8E56BD32D1520DD003C54AF"
+               BuildableName = "TSLiveWallpaper.app"
+               BlueprintName = "TSLiveWallpaper"
+               ReferencedContainer = "container:TSLiveWallpaper.xcodeproj">
+            </BuildableReference>
+         </BuildActionEntry>
+      </BuildActionEntries>
+   </BuildAction>
+   <TestAction
+      buildConfiguration = "Debug"
+      selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
+      selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
+      shouldUseLaunchSchemeArgsEnv = "YES"
+      shouldAutocreateTestPlan = "YES">
+   </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 = "A8E56BD32D1520DD003C54AF"
+            BuildableName = "TSLiveWallpaper.app"
+            BlueprintName = "TSLiveWallpaper"
+            ReferencedContainer = "container:TSLiveWallpaper.xcodeproj">
+         </BuildableReference>
+      </BuildableProductRunnable>
+   </LaunchAction>
+   <ProfileAction
+      buildConfiguration = "Release"
+      shouldUseLaunchSchemeArgsEnv = "YES"
+      savedToolIdentifier = ""
+      useCustomWorkingDirectory = "NO"
+      debugDocumentVersioning = "YES">
+      <BuildableProductRunnable
+         runnableDebuggingMode = "0">
+         <BuildableReference
+            BuildableIdentifier = "primary"
+            BlueprintIdentifier = "A8E56BD32D1520DD003C54AF"
+            BuildableName = "TSLiveWallpaper.app"
+            BlueprintName = "TSLiveWallpaper"
+            ReferencedContainer = "container:TSLiveWallpaper.xcodeproj">
+         </BuildableReference>
+      </BuildableProductRunnable>
+   </ProfileAction>
+   <AnalyzeAction
+      buildConfiguration = "Debug">
+   </AnalyzeAction>
+   <ArchiveAction
+      buildConfiguration = "Release"
+      revealArchiveInOrganizer = "YES">
+   </ArchiveAction>
+</Scheme>

+ 8 - 0
TSLiveWallpaper.xcodeproj/xcuserdata/100years.xcuserdatad/xcschemes/xcschememanagement.plist

@@ -10,5 +10,13 @@
 			<integer>11</integer>
 		</dict>
 	</dict>
+	<key>SuppressBuildableAutocreation</key>
+	<dict>
+		<key>A8E56BD32D1520DD003C54AF</key>
+		<dict>
+			<key>primary</key>
+			<true/>
+		</dict>
+	</dict>
 </dict>
 </plist>

二進制
TSLiveWallpaper/Assets.xcassets/Common/App-Icon.imageset/App-Icon.png


+ 1 - 2
TSLiveWallpaper/Assets.xcassets/EditVideo/hx_editor_video_control_play.imageset/Contents.json → TSLiveWallpaper/Assets.xcassets/Common/App-Icon.imageset/Contents.json

@@ -1,16 +1,15 @@
 {
   "images" : [
     {
+      "filename" : "App-Icon.png",
       "idiom" : "universal",
       "scale" : "1x"
     },
     {
-      "filename" : "hx_editor_video_control_play@2x.png",
       "idiom" : "universal",
       "scale" : "2x"
     },
     {
-      "filename" : "hx_editor_video_control_play@3x.png",
       "idiom" : "universal",
       "scale" : "3x"
     }

+ 2 - 2
TSLiveWallpaper/Assets.xcassets/EditVideo/hx_editor_video_control_pause.imageset/Contents.json → TSLiveWallpaper/Assets.xcassets/Common/icon_live.imageset/Contents.json

@@ -5,12 +5,12 @@
       "scale" : "1x"
     },
     {
-      "filename" : "hx_editor_video_control_pause@2x.png",
+      "filename" : "icon_live@2x.png",
       "idiom" : "universal",
       "scale" : "2x"
     },
     {
-      "filename" : "hx_editor_video_control_pause@3x.png",
+      "filename" : "icon_live@3x.png",
       "idiom" : "universal",
       "scale" : "3x"
     }

二進制
TSLiveWallpaper/Assets.xcassets/Common/icon_live.imageset/icon_live@2x.png


二進制
TSLiveWallpaper/Assets.xcassets/Common/icon_live.imageset/icon_live@3x.png


+ 1 - 2
TSLiveWallpaper/Assets.xcassets/EditVideo/hx_editor_video_control_arrow_left.imageset/Contents.json → TSLiveWallpaper/Assets.xcassets/Common/live_tutorials.imageset/Contents.json

@@ -5,12 +5,11 @@
       "scale" : "1x"
     },
     {
-      "filename" : "hx_editor_video_control_arrow_left@2x.png",
+      "filename" : "live_tutorials@2x.png",
       "idiom" : "universal",
       "scale" : "2x"
     },
     {
-      "filename" : "hx_editor_video_control_arrow_left@3x.png",
       "idiom" : "universal",
       "scale" : "3x"
     }

二進制
TSLiveWallpaper/Assets.xcassets/Common/live_tutorials.imageset/live_tutorials@2x.png


二進制
TSLiveWallpaper/Assets.xcassets/Common/radiobox_selected.imageset/radiobox_selected@2x.png


二進制
TSLiveWallpaper/Assets.xcassets/Common/radiobox_selected.imageset/radiobox_selected@3x.png


二進制
TSLiveWallpaper/Assets.xcassets/Common/radiobox_unSelect.imageset/radiobox_unSelect@2x.png


二進制
TSLiveWallpaper/Assets.xcassets/Common/radiobox_unSelect.imageset/radiobox_unSelect@3x.png


二進制
TSLiveWallpaper/Assets.xcassets/EditVideo/hx_editor_video_control_arrow_left.imageset/hx_editor_video_control_arrow_left@2x.png


二進制
TSLiveWallpaper/Assets.xcassets/EditVideo/hx_editor_video_control_arrow_left.imageset/hx_editor_video_control_arrow_left@3x.png


+ 0 - 22
TSLiveWallpaper/Assets.xcassets/EditVideo/hx_editor_video_control_arrow_right.imageset/Contents.json

@@ -1,22 +0,0 @@
-{
-  "images" : [
-    {
-      "idiom" : "universal",
-      "scale" : "1x"
-    },
-    {
-      "filename" : "hx_editor_video_control_arrow_right@2x.png",
-      "idiom" : "universal",
-      "scale" : "2x"
-    },
-    {
-      "filename" : "hx_editor_video_control_arrow_right@3x.png",
-      "idiom" : "universal",
-      "scale" : "3x"
-    }
-  ],
-  "info" : {
-    "author" : "xcode",
-    "version" : 1
-  }
-}

二進制
TSLiveWallpaper/Assets.xcassets/EditVideo/hx_editor_video_control_arrow_right.imageset/hx_editor_video_control_arrow_right@2x.png


二進制
TSLiveWallpaper/Assets.xcassets/EditVideo/hx_editor_video_control_arrow_right.imageset/hx_editor_video_control_arrow_right@3x.png


二進制
TSLiveWallpaper/Assets.xcassets/EditVideo/hx_editor_video_control_pause.imageset/hx_editor_video_control_pause@2x.png


二進制
TSLiveWallpaper/Assets.xcassets/EditVideo/hx_editor_video_control_pause.imageset/hx_editor_video_control_pause@3x.png


二進制
TSLiveWallpaper/Assets.xcassets/EditVideo/hx_editor_video_control_play.imageset/hx_editor_video_control_play@2x.png


二進制
TSLiveWallpaper/Assets.xcassets/EditVideo/hx_editor_video_control_play.imageset/hx_editor_video_control_play@3x.png


+ 111 - 0
TSLiveWallpaper/Business/TSBusinessWebVC/TSBusinessWebVC.swift

@@ -0,0 +1,111 @@
+//
+//  TSBusinessWebVC.swift
+//  TSLiveWallpaper
+//
+//  Created by 100Years on 2024/12/29.
+//
+
+import UIKit
+import WebKit
+class TSBusinessWebVC: TSBaseVC , WKNavigationDelegate {
+    
+    enum UrlType:String {
+        case privacy = "https://doc-hosting.flycricket.io/livelive-privacy-policy/10cde0be-3dae-4f7a-9e60-c5f92382ff21/privacy"
+        case terms = "https://doc-hosting.flycricket.io/livelive-terms-of-use/7ec53e98-eb9d-49e0-b01d-bf315ba4384b/terms"
+
+        func getTitle() -> String {
+            switch self {
+            case .privacy:
+                return "Privacy Policy".localized
+            case .terms:
+                return "Terms of Service".localized
+            }
+        }
+    }
+    
+    private var webView: WKWebView!
+    private var urlType: UrlType
+    private var progressView: UIProgressView!
+    
+    init(urlType: UrlType) {
+        self.urlType = urlType
+        super.init(nibName: nil, bundle: nil)
+    }
+    
+    required init?(coder: NSCoder) {
+        fatalError("init(coder:) has not been implemented")
+    }
+    
+    override func createView() {
+        addNormalNavBarView()
+        setPageTitle(urlType.getTitle())
+    }
+    
+    override func viewDidLoad() {
+        super.viewDidLoad()
+        setupWebView()
+        setupProgressView()
+        loadURL()
+    }
+    
+    private func setupWebView() {
+        // 初始化 WKWebView
+        let webConfiguration = WKWebViewConfiguration()
+        webView = WKWebView(frame: .zero, configuration: webConfiguration)
+        webView.navigationDelegate = self
+        webView.translatesAutoresizingMaskIntoConstraints = false
+        contentView.addSubview(webView)
+        webView.snp.makeConstraints { make in
+            make.edges.equalToSuperview()
+        }
+
+        // 添加观察者以监控加载进度
+        webView.addObserver(self, forKeyPath: "estimatedProgress", options: .new, context: nil)
+    }
+    
+    private func setupProgressView() {
+        // 初始化进度条
+        progressView = UIProgressView(progressViewStyle: .default)
+        progressView.translatesAutoresizingMaskIntoConstraints = false
+        progressView.progressTintColor = .white.withAlphaComponent(0.5)
+        contentView.addSubview(progressView)
+        progressView.snp.makeConstraints { make in
+            make.edges.equalToSuperview()
+        }
+    }
+    
+    private func loadURL() {
+        guard let url = URL(string: urlType.rawValue) else {
+            debugPrint("无效的 URL")
+            return
+        }
+        let request = URLRequest(url: url)
+        webView.load(request)
+    }
+    
+    // 监听加载进度
+    override func observeValue(forKeyPath keyPath: String?, of object: Any?, change: [NSKeyValueChangeKey : Any]?, context: UnsafeMutableRawPointer?) {
+        if keyPath == "estimatedProgress" {
+            progressView.progress = Float(webView.estimatedProgress)
+            progressView.isHidden = webView.estimatedProgress >= 1.0
+        }
+    }
+    
+    deinit {
+        // 移除观察者
+        webView.removeObserver(self, forKeyPath: "estimatedProgress")
+    }
+    
+    // WKNavigationDelegate 方法(可选)
+    func webView(_ webView: WKWebView, didStartProvisionalNavigation navigation: WKNavigation!) {
+        print("开始加载网页")
+    }
+    
+    func webView(_ webView: WKWebView, didFinish navigation: WKNavigation!) {
+        print("网页加载完成")
+    }
+    
+    func webView(_ webView: WKWebView, didFail navigation: WKNavigation!, withError error: Error) {
+        print("网页加载失败: \(error.localizedDescription)")
+    }
+}

+ 11 - 26
TSLiveWallpaper/Business/TSEditLiveVC/TSEditLiveVC.swift

@@ -9,10 +9,9 @@ import PhotosUI
 
 class TSEditLiveVC: TSBaseVC, UINavigationControllerDelegate {
     
-    
     lazy var navBarView: TSBaseNavContentBarView = {
         let navBarView = TSBaseNavContentBarView()
-        let titleImageView = UIImageView.createImageView(imageName: "nav_title_editlive")
+        let titleImageView = UIImageView.createImageView(imageName: "nav_title_editlive",contentMode: .scaleToFill)
         
         navBarView.barView.addSubview(titleImageView)
         titleImageView.snp.makeConstraints { make in
@@ -21,10 +20,10 @@ class TSEditLiveVC: TSBaseVC, UINavigationControllerDelegate {
             make.width.equalTo(252)
             make.height.equalTo(24)
         }
-
         return navBarView
     }()
-    
+
+    var editLiveHistoryListArray:[TSImageDataSectionModel] = kImageDataCenterShared.editLiveHistoryListArray
     
     override func createView() {
         
@@ -55,10 +54,8 @@ class TSEditLiveVC: TSBaseVC, UINavigationControllerDelegate {
         let diyBtn: UIButton = TSViewTool.createNormalSubmitBtn(title: "DIY Live Wallpaper".localized, imageNamed: "edit_black") { [weak self]  in
             guard let self = self else { return }
             self.pick(.any(of: [.videos]))
-            
-
-
         }
+        
         diyBtn.cornerRadius = 30
         contentView.addSubview(diyBtn)
         diyBtn.snp.makeConstraints { make in
@@ -72,6 +69,8 @@ class TSEditLiveVC: TSBaseVC, UINavigationControllerDelegate {
     
     func saveLive(videoPath:URL){
         
+        TSToastShared.showLoading()
+        
         LivePhoto.generate(from: nil, videoURL: videoPath) { progress in
             
         } completion: {[weak self] (livePhoto, resources) in
@@ -80,21 +79,21 @@ class TSEditLiveVC: TSBaseVC, UINavigationControllerDelegate {
             if let resources = resources {
                 LivePhoto.saveToLibrary(resources, completion: { (success) in
                     kExecuteOnMainThread {
+                        TSToastShared.hideLoading()
                         if success {
                             debugPrint("Live Photo Saved,The live photo was successfully saved to Photos.")
                             kSavePhotoSuccesswShared.show(atView: self.view)
-                            TSFileManagerTool.removeItem(from: resources.pairedImage)
-                            TSFileManagerTool.removeItem(from: resources.pairedVideo)
                         }else {
                             debugPrint("Live Photo Not Saved,The live photo was not saved to Photos.")
                         }
+                        
+                        TSFileManagerTool.removeItem(from: resources.pairedImage)
+                        TSFileManagerTool.removeItem(from: resources.pairedVideo)
                     }
                 })
             }
         }
-
     }
-
 }
 
 
@@ -110,6 +109,7 @@ extension TSEditLiveVC: PHPickerViewControllerDelegate {
         config.preferredAssetRepresentationMode = .current
         let picker = PHPickerViewController(configuration: config)
         picker.delegate = self
+        picker.modalPresentationStyle = .overFullScreen
         present(picker, animated: true, completion: nil)
     }
     
@@ -118,9 +118,6 @@ extension TSEditLiveVC: PHPickerViewControllerDelegate {
         assemblePicker(picker, didFinishPicking: results)
     }
 
-    
-    
-    
     func assemblePicker(_ picker: PHPickerViewController, didFinishPicking results: [PHPickerResult]) {
         guard let itemProvider = results.first?.itemProvider else {
             return
@@ -163,8 +160,6 @@ extension TSEditLiveVC: PHPickerViewControllerDelegate {
     }
 }
 
-
-
 //import UniformTypeIdentifiers
 //extension TSEditLiveVC: UIImagePickerControllerDelegate {
 //    func openVideoPicker() {
@@ -176,7 +171,6 @@ extension TSEditLiveVC: PHPickerViewControllerDelegate {
 //        picker.videoMaximumDuration = 3.0
 //        present(picker, animated: true, completion: nil)
 //    }
-//
 //    // 用户完成选择
 //    func imagePickerController(_ picker: UIImagePickerController, didFinishPickingMediaWithInfo info: [UIImagePickerController.InfoKey: Any]) {
 //        if let editedURL = info[.mediaURL] as? URL {
@@ -197,8 +191,6 @@ extension TSEditLiveVC{
     
     
     func openVideoClipperVC(videoURL:URL) {
-        
-        if let videoURL = Bundle.main.url(forResource: "2", withExtension: "MOV") {
             let clipperController = GPVideoClipperController.clipperWithVideoURL(videoURL, makerBlock: { (maker) in
                 maker.startTime = 0
                 maker.endTime = 15
@@ -216,14 +208,7 @@ extension TSEditLiveVC{
             }
         
         kPresentModalVC(target: self, modelVC: clipperController)
-            
-//            clipperController.hidesBottomBarWhenPushed = true
-//            self.navigationController?.pushViewController(clipperController, animated: false)
-        }
     }
-    
-
-    
 }
 
 

+ 5 - 1
TSLiveWallpaper/Business/TSEditLiveVC/TSEditVideoVC/GPVideoClipper/GPVideoClipperView.swift

@@ -30,7 +30,9 @@ class GPVideoClipperView: UIView, UICollectionViewDelegate, UICollectionViewData
     var avAsset: AVAsset! {
           willSet {
             self.avAsset = newValue
-            self.p_loadThumbnailImages()
+              kDelayMainShort {
+                  self.p_loadThumbnailImages()
+              }
           }
     }
     var progressTime: CGFloat! {
@@ -460,6 +462,8 @@ class GPVideoClipperView: UIView, UICollectionViewDelegate, UICollectionViewData
                     weakSelf?.collectionView.insertItems(at: [(indexPath as IndexPath)])
                     index += 1
                 }
+            }else{
+                debugPrint(error)
             }
         }
     }

+ 14 - 1
TSLiveWallpaper/Business/TSHomeVC/TSHomeCell.swift

@@ -15,13 +15,26 @@ class TSHomeCollectionCell : TSBaseCollectionCell ,ComponentView{
         return imageView
     }()
     
+    lazy var liveIconView: UIImageView = {
+        let imageView = UIImageView()
+        imageView.image = KIconLiveImage
+        return imageView
+    }()
+
     override func creatUI() {
-        bgContentView.cornerRadius = 24
+        bgContentView.cornerRadius = 16
         
         bgContentView.addSubview(imageView)
         imageView.snp.makeConstraints { make in
             make.edges.equalToSuperview()
         }
+        
+        bgContentView.addSubview(liveIconView)
+        liveIconView.snp.makeConstraints { make in
+            make.left.equalTo(8)
+            make.top.equalTo(8)
+            make.width.height.equalTo(24)
+        }
     }
 
     func renderView(with object: Any?, component: CollectionViewComponent, attributes: [String : Any]?) {

+ 1 - 1
TSLiveWallpaper/Business/TSHomeVC/TSHomeVC.swift

@@ -14,7 +14,7 @@ class TSHomeVC : TSBaseVC {
 
     lazy var navBarView: TSBaseNavContentBarView = {
         let navBarView = TSBaseNavContentBarView()
-        let titleImageView = UIImageView.createImageView(imageName: "nav_title_home")
+        let titleImageView = UIImageView.createImageView(imageName: "nav_title_home",contentMode: .scaleToFill)
         
         navBarView.barView.addSubview(titleImageView)
         titleImageView.snp.makeConstraints { make in

+ 3 - 3
TSLiveWallpaper/Business/TSHomeVC/TSLiveWallpaperBrowseVC/EasyVC/TSLiveWallpaperBrowseVC.swift

@@ -31,7 +31,6 @@ class TSLiveWallpaperBrowseVC: TSBaseVC {
         }
     }
     
-//    var dataModelArray:[TSImageDataItemModel]
     private var dataModelArray = [TSLiveWallpaperBrowseItemModel]()
     var currentIndex:Int
     init(itemModels: [TSImageDataItemModel],currentIndex:Int) {
@@ -95,7 +94,8 @@ class TSLiveWallpaperBrowseVC: TSBaseVC {
         }
         
         //预览按钮
-        let previewBtn = UIButton.createButton(image: UIImage(named: "random_preview"),backgroundColor: UIColor.fromHex("#000000", alpha: 0.5),corner: 24) {
+        let previewBtn = UIButton.createButton(image: UIImage(named: "random_preview"),backgroundColor: UIColor.fromHex("#000000", alpha: 0.5),corner: 24) { [weak self]  in
+            guard let self = self else { return }
             self.isPreview = !self.isPreview
         }
         btnsAllView.addSubview(previewBtn)
@@ -107,7 +107,7 @@ class TSLiveWallpaperBrowseVC: TSBaseVC {
         
         btnsAllView.addSubview(saveBtn)
         saveBtn.snp.makeConstraints { make in
-            make.trailing.equalTo(previewBtn.snp.leading).offset(-48)
+            make.trailing.equalTo(previewBtn.snp.leading).offset(-18)
             make.leading.equalTo(42)
             make.bottom.equalTo(-16-k_Height_safeAreaInsetsBottom())
             make.height.equalTo(48)

+ 39 - 1
TSLiveWallpaper/Business/TSHomeVC/TSLiveWallpaperBrowseVC/EasyVC/TSLiveWallpaperCopyrightVC.swift

@@ -8,9 +8,47 @@
 
 class TSLiveWallpaperCopyrightVC: TSBaseVC {
     
+    
+    lazy var titleLabel: UILabel = {
+        let view = UILabel.createLabel(text: "Copyright Notice",font: .font(size: 24,weight: .medium),textColor: UIColor.fromHex("FFFFFF",alpha: 0.8),numberOfLines: 0)
+        return view
+    }()
+    
+    lazy var contentLabel: UILabel = {
+        let view = UILabel.createLabel(text: "100 Years Later Company Attaches Great Importance To The Copyright Of Images, But As A Content Provider, We Cannot Guarantee The Accuracy Of The Reviewed Content. If You Find Any Infringing Content, Please Inform Us Immediately And We Will Immediately Remove It. Contact",font: .font(size: 14,weight: .regular),textColor: UIColor.fromHex("FFFFFF",alpha: 0.6),numberOfLines: 0)
+        return view
+    }()
+    
+    lazy var emailLabel: UILabel = {
+        let view = UILabel.createLabel(text: "Email: Snapmusic6688@Gmail.Com",font: .font(size: 16,weight: .regular),textColor: UIColor.fromHex("FFFFFF"),numberOfLines: 0)
+        return view
+    }()
+    
     override func createView() {
         addNormalNavBarView()
-        setPageTitle("Copyright")
+        setPageTitle("")
+        
+        contentView.addSubview(titleLabel)
+        contentView.addSubview(contentLabel)
+        contentView.addSubview(emailLabel)
+        
+        titleLabel.snp.makeConstraints { make in
+            make.top.equalTo(11)
+            make.leading.equalTo(16)
+            make.trailing.equalTo(-16)
+        }
+        
+        contentLabel.snp.makeConstraints { make in
+            make.top.equalTo(titleLabel.snp.bottom).offset(24)
+            make.leading.equalTo(16)
+            make.trailing.equalTo(-16)
+        }
+        
+        emailLabel.snp.makeConstraints { make in
+            make.top.equalTo(contentLabel.snp.bottom).offset(16)
+            make.leading.equalTo(16)
+            make.trailing.equalTo(-16)
+        }
     }
     
 }

+ 10 - 0
TSLiveWallpaper/Business/TSHomeVC/TSLiveWallpaperBrowseVC/EasyVC/TSLiveWallpaperTutorialsVC.swift

@@ -7,9 +7,19 @@
 
 class TSLiveWallpaperTutorialsVC: TSBaseVC {
     
+    lazy var imageView: UIImageView = {
+        let imageView = UIImageView.createImageView(imageName: "live_tutorials")
+        imageView.frame = CGRectMake(0, 0, k_ScreenWidth, kDesignScale*(imageView.image?.size.height ?? k_ScreenHeight))
+        return imageView
+    }()
+    
     override func createView() {
         addNormalNavBarView()
         setPageTitle("Tutorials")
+        contentView.addSubview(imageView)
     }
     
+    
+    
+    
 }

+ 16 - 4
TSLiveWallpaper/Business/TSHomeVC/View/TSHomeTopBannerCell.swift

@@ -26,14 +26,13 @@ class TSHomeTopBannerCell : TSBaseCollectionCell , TYCyclePagerViewDelegate, TYC
         pagerView.register(TSHomeCyclePagerViewCell.classForCoder(), forCellWithReuseIdentifier: TSHomeCyclePagerViewCell.reuseIdentifier)
         return pagerView
     }()
-    
-    
+
     lazy var topBarnerView: UIView = {
         let topBarnerView = UIView()
         topBarnerView.addSubview(cyclePagerView)
         cyclePagerView.snp.makeConstraints { make in
             make.leading.trailing.equalToSuperview()
-            make.top.equalTo(24)
+            make.top.equalToSuperview()
             make.height.equalTo(topBarnerItemH)
         }
 
@@ -51,7 +50,7 @@ class TSHomeTopBannerCell : TSBaseCollectionCell , TYCyclePagerViewDelegate, TYC
         let previewImageView = UIImageView.createImageView(imageName: "iPhone_lock_screen_preview")
         bgContentView.addSubview(previewImageView)
         previewImageView.snp.makeConstraints { make in
-            make.top.equalTo(24)
+            make.top.equalToSuperview()
             make.centerX.equalToSuperview()
             make.width.equalTo(topBarnerItemW)
             make.height.equalTo(topBarnerItemH)
@@ -109,6 +108,12 @@ class TSHomeCyclePagerViewCell: TSBaseCollectionCell {
         return imageView
     }()
     
+    lazy var liveIconView: UIImageView = {
+        let imageView = UIImageView()
+        imageView.image = KIconLiveImage
+        return imageView
+    }()
+    
     var itemModel:TSImageDataItemModel = TSImageDataItemModel(){
         didSet{
             imageView.setAsyncImage(urlString: itemModel.imageUrl,placeholder: kWapppaperPlaceholderImage,showLoading: true)
@@ -122,6 +127,13 @@ class TSHomeCyclePagerViewCell: TSBaseCollectionCell {
         imageView.snp.makeConstraints { make in
             make.edges.equalToSuperview()
         }
+
+        bgContentView.addSubview(liveIconView)
+        liveIconView.snp.makeConstraints { make in
+            make.left.equalTo(8)
+            make.top.equalTo(8)
+            make.width.height.equalTo(24)
+        }
     }
 }
 

+ 27 - 9
TSLiveWallpaper/Business/TSMineVC/TSMineVC.swift

@@ -21,10 +21,13 @@ class TSMineVC: TSBaseVC, UITableViewDataSource, UITableViewDelegate {
             height: 80,
             rectCorner:.allCorners,
             tapBlock: {[weak self] itemModel, index, view  in
+                
                 guard let self = self else { return }
-                let vc = TSRateUsVC()
-                vc.hidesBottomBarWhenPushed = true
-                navigationController?.pushViewController(vc, animated: true)
+                let appStoreLink = "itms-apps://itunes.apple.com/app/id\(TSConfig.appid)"
+                if let url = URL(string: appStoreLink + "?action=write-review"),
+                   UIApplication.shared.canOpenURL(url) {
+                    UIApplication.shared.open(url)
+                }
             }))
         
         sectionModel.addSubItemModel(
@@ -37,9 +40,24 @@ class TSMineVC: TSBaseVC, UITableViewDataSource, UITableViewDelegate {
             rectCorner:.allCorners,
             tapBlock: {[weak self] itemModel, index, view  in
                 guard let self = self else { return }
-                let vc = TSShareUsVC()
-                vc.hidesBottomBarWhenPushed = true
-                navigationController?.pushViewController(vc, animated: true)
+
+                let httpAppStoreLink = "https://apps.apple.com/app/id\(TSConfig.appid)"
+                let text = "I'm using Sweeter to decorate my phone, there are not only themes, wallpapers, widgets, but also dynamic island and super useful tools, come and try with me!".localized
+                let url = URL(string: httpAppStoreLink)!
+                let image = UIImage(named: "App-Icon")!
+                let vc = UIActivityViewController(activityItems: [image, text, url], applicationActivities: nil)
+                vc.completionWithItemsHandler = { activity, value, _, error in
+                    if let type = activity, type == .copyToPasteboard {
+                        UIPasteboard.general.string = httpAppStoreLink
+                    }
+                }
+            
+                if UIDevice.isPad {
+                    vc.modalPresentationStyle = .popover
+                }
+                
+                self.present(vc, animated: true)
+                
             }))
         
         sectionModel.addSubItemModel(
@@ -52,7 +70,7 @@ class TSMineVC: TSBaseVC, UITableViewDataSource, UITableViewDelegate {
             rectCorner:.allCorners,
             tapBlock: {[weak self] itemModel, index, view  in
                 guard let self = self else { return }
-                let vc = TSPrivacyPolicyVC()
+                let vc = TSBusinessWebVC(urlType: .privacy)
                 vc.hidesBottomBarWhenPushed = true
                 navigationController?.pushViewController(vc, animated: true)
             }))
@@ -67,7 +85,7 @@ class TSMineVC: TSBaseVC, UITableViewDataSource, UITableViewDelegate {
             rectCorner:.allCorners,
             tapBlock: {[weak self] itemModel, index, view  in
                 guard let self = self else { return }
-                let vc = TSTermsServiceVC()
+                let vc = TSBusinessWebVC(urlType: .terms)
                 vc.hidesBottomBarWhenPushed = true
                 navigationController?.pushViewController(vc, animated: true)
             }))
@@ -99,7 +117,7 @@ class TSMineVC: TSBaseVC, UITableViewDataSource, UITableViewDelegate {
     
     lazy var navBarView: TSBaseNavContentBarView = {
         let navBarView = TSBaseNavContentBarView()
-        let titleImageView = UIImageView.createImageView(imageName: "nav_title_setting")
+        let titleImageView = UIImageView.createImageView(imageName: "nav_title_setting",contentMode: .scaleToFill)
         
         navBarView.barView.addSubview(titleImageView)
         titleImageView.snp.makeConstraints { make in

+ 38 - 1
TSLiveWallpaper/Business/TSRandomWallpaperVC/EasyVC/TSRandomWallpaperCopyrightVC.swift

@@ -7,9 +7,46 @@
 
 class TSRandomWallpaperCopyrightVC: TSBaseVC {
     
+    lazy var titleLabel: UILabel = {
+        let view = UILabel.createLabel(text: "Copyright Notice",font: .font(size: 24,weight: .medium),textColor: UIColor.fromHex("FFFFFF",alpha: 0.8),numberOfLines: 0)
+        return view
+    }()
+    
+    lazy var contentLabel: UILabel = {
+        let view = UILabel.createLabel(text: "100 Years Later Company Attaches Great Importance To The Copyright Of Images, But As A Content Provider, We Cannot Guarantee The Accuracy Of The Reviewed Content. If You Find Any Infringing Content, Please Inform Us Immediately And We Will Immediately Remove It. Contact",font: .font(size: 14,weight: .regular),textColor: UIColor.fromHex("FFFFFF",alpha: 0.6),numberOfLines: 0)
+        return view
+    }()
+    
+    lazy var emailLabel: UILabel = {
+        let view = UILabel.createLabel(text: "Email: Snapmusic6688@Gmail.Com",font: .font(size: 16,weight: .regular),textColor: UIColor.fromHex("FFFFFF"),numberOfLines: 0)
+        return view
+    }()
+    
     override func createView() {
         addNormalNavBarView()
-        setPageTitle("Copyrigh")
+        setPageTitle("")
+        
+        contentView.addSubview(titleLabel)
+        contentView.addSubview(contentLabel)
+        contentView.addSubview(emailLabel)
+        
+        titleLabel.snp.makeConstraints { make in
+            make.top.equalTo(11)
+            make.leading.equalTo(16)
+            make.trailing.equalTo(-16)
+        }
+        
+        contentLabel.snp.makeConstraints { make in
+            make.top.equalTo(titleLabel.snp.bottom).offset(24)
+            make.leading.equalTo(16)
+            make.trailing.equalTo(-16)
+        }
+        
+        emailLabel.snp.makeConstraints { make in
+            make.top.equalTo(contentLabel.snp.bottom).offset(16)
+            make.leading.equalTo(16)
+            make.trailing.equalTo(-16)
+        }
     }
     
 }

+ 17 - 2
TSLiveWallpaper/Business/TSRandomWallpaperVC/EasyVC/TSRandomWallpaperTutorialsVC.swift

@@ -6,10 +6,25 @@
 //
 
 class TSRandomWallpaperTutorialsVC: TSBaseVC {
+
+    lazy var scrollView: UIScrollView = {
+        let scrollView = UIScrollView()
+        scrollView.backgroundColor = .clear
+        scrollView.frame = self.contentView.bounds
+        scrollView.contentSize = imageView.size
+        return scrollView
+    }()
+    
+    lazy var imageView: UIImageView = {
+        let imageView = UIImageView.createImageView(imageName: "live_tutorials")
+        imageView.frame = CGRectMake(0, 0, k_ScreenWidth, kDesignScale*(imageView.image?.size.height ?? k_ScreenHeight))
+        return imageView
+    }()
     
     override func createView() {
         addNormalNavBarView()
-        setPageTitle("Tutorials")
+        setPageTitle("How to set shuffle packs".localized)
+        contentView.addSubview(scrollView)
+        scrollView.addSubview(imageView)
     }
-    
 }

+ 3 - 1
TSLiveWallpaper/Business/TSRandomWallpaperVC/TSRandomWallpaperBrowseVC/TSRandomWallpaperBrowseVC.swift

@@ -74,7 +74,8 @@ class TSRandomWallpaperBrowseVC: TSBaseVC {
         }
         
         //预览按钮
-        let previewBtn = UIButton.createButton(image: UIImage(named: "random_preview"),backgroundColor: UIColor.fromHex("#000000", alpha: 0.5),corner: 19.0) {
+        let previewBtn = UIButton.createButton(image: UIImage(named: "random_preview"),backgroundColor: UIColor.fromHex("#000000", alpha: 0.5),corner: 19.0) { [weak self]  in
+            guard let self = self else { return }
             self.isPreview = !self.isPreview
         }
         btnsAllView.addSubview(previewBtn)
@@ -162,6 +163,7 @@ class TSRandomWallpaperBrowseVC: TSBaseVC {
             }
             
         }
+        saveBtn.titleLabel?.font = UIFont.font(size: 14.0)
         saveBtn.cornerRadius = 16
         return saveBtn
     }()

+ 29 - 13
TSLiveWallpaper/Business/TSRandomWallpaperVC/TSRandomWallpaperVC.swift

@@ -6,9 +6,13 @@
 //
 
 class TSRandomWallpaperVC: TSBaseVC {
+    
+    @UserDefault(key: "isShowGuide", defaultValue: true)
+    var isShowGuide: Bool
+    
     lazy var navBarView: TSBaseNavContentBarView = {
         let navBarView = TSBaseNavContentBarView()
-        let titleImageView = UIImageView.createImageView(imageName: "nav_title_random")
+        let titleImageView = UIImageView.createImageView(imageName: "nav_title_random",contentMode: .scaleToFill)
         
         navBarView.barView.addSubview(titleImageView)
         titleImageView.snp.makeConstraints { make in
@@ -25,21 +29,25 @@ class TSRandomWallpaperVC: TSBaseVC {
         let layout = UICollectionViewFlowLayout()
         let cp = CollectionViewComponent(frame: CGRect.zero, layout: layout, attributes: [ :])
         cp.collectionView.contentInset = UIEdgeInsets(top: 0, left: 0, bottom: k_Height_TabBar, right: 0)
-        cp.itemActionHandler = { [weak self] cellCp, indexPath in
-   
-        }
-         
         cp.itemDidSelectedHandler = { [weak self] (object, indexPath) in
             guard let self = self else { return }
-            
-            if indexPath.section == 0 { return }
-            if let dataModel = object as? TSRandomWallpaperDataItemModel{
-                kPresentModalVC(target: self, modelVC: TSRandomWallpaperBrowseVC(dataModel: dataModel))
+            if indexPath.section == 0 {
+                let tutorialsVC = TSRandomWallpaperTutorialsVC()
+                tutorialsVC.hidesBottomBarWhenPushed = true
+                self.navigationController?.pushViewController(tutorialsVC, animated: true)
+            }else{
+                if let dataModel = object as? TSRandomWallpaperDataItemModel{
+                    kPresentModalVC(target: self, modelVC: TSRandomWallpaperBrowseVC(dataModel: dataModel))
+                }
             }
         }
         
-        cp.itemActionHandler = { obj, index in
-
+        cp.itemActionHandler = { [weak self] (object, indexPath) in
+            guard let self = self else { return }
+            if indexPath.section == 0 {
+                isShowGuide = false
+                reloadView()
+            }
         }
         cp.itemWillDisplayHandler = { cell, obj, IndexPath in
 
@@ -65,7 +73,15 @@ class TSRandomWallpaperVC: TSBaseVC {
             make.edges.equalToSuperview()
         }
    
-        collectionComponent.reloadView(with:kImageDataCenterShared.randomBannerArray + kImageDataCenterShared.randomListArray)
-        
+        reloadView()
+    }
+    
+    func reloadView() {
+        collectionComponent.clear()
+        if isShowGuide {
+            collectionComponent.reloadView(with:kImageDataCenterShared.randomBannerArray + kImageDataCenterShared.randomListArray)
+        }else{
+            collectionComponent.reloadView(with:kImageDataCenterShared.randomListArray)
+        }
     }
 }

+ 16 - 4
TSLiveWallpaper/Business/TSRandomWallpaperVC/TSRandomWallpaperView/TSRandomWallpaperBannerCell.swift

@@ -6,9 +6,9 @@
 //
 
 //MARK: TSRandomWallpaperBannerCell
-class TSRandomWallpaperBannerCell: TSBaseCollectionCell {
+class TSRandomWallpaperBannerCell: TSBaseCollectionCell , ComponentView {
     
-  
+    var component:CollectionViewComponent?
     lazy var bannerImageBgView: UIImageView = {
         return UIImageView.createImageView(imageName: "random_guided_top_bg",corner: 16)
     }()
@@ -20,7 +20,15 @@ class TSRandomWallpaperBannerCell: TSBaseCollectionCell {
     
     lazy var closeBtn: UIExpandedTouchButton = {
         let btn = UIExpandedTouchButton()
-        btn.setUpButton(image: UIImage(named:"close_gary"))
+        btn.setUpButton(image: UIImage(named:"close_gary")) { [weak self]  in
+            guard let self = self else { return }
+        
+            if let component = self.component {
+                if let itemActionHandler = component.itemActionHandler {
+                    itemActionHandler(self, IndexPath(row: 0, section: 0))
+                }
+            }
+        }
         return btn
     }()
     
@@ -50,11 +58,15 @@ class TSRandomWallpaperBannerCell: TSBaseCollectionCell {
             make.height.equalTo(16)
         }
     }
+    
+    func renderView(with object: Any?, component: CollectionViewComponent, attributes: [String : Any]?) {
+        self.component = component
+    }
 }
 
 
 class TSRandomWallpaperHeaderView: UICollectionReusableView , ComponentView{
     func renderView(with object: Any?, component: CollectionViewComponent, attributes: [String : Any]?) {
-        
+      
     }
 }

+ 8 - 3
TSLiveWallpaper/Business/TSViewTool/TSViewTool.swift

@@ -15,6 +15,7 @@ class TSViewTool: UIView {
 //            buttonBgImage = buttonBgImage.resizableImage(withCapInsets: UIEdgeInsets(top:24, left: 24, bottom: 24, right: 24), resizingMode: .stretch)
 //        }
 //          btn.setBackgroundImage(buttonBgImage, for: .normal)
+        
         kDelayMainShort {
             btn.addGradientBg(colors: ["#B3FFAB".color.cgColor,"12FFF7".color.cgColor],startPoint: CGPoint(x: 0, y: 1),endPoint: CGPoint(x: 1, y: 0))
         }
@@ -42,7 +43,7 @@ class TSViewTool: UIView {
 
 
 let kWapppaperPlaceholderImage = UIImage(named: "wapppaper_placeholder")
-
+let KIconLiveImage = UIImage(named: "icon_live")
 
 let kSavePhotoSuccesswShared = TSSavePhotoSuccessTool.shared
 class TSSavePhotoSuccessTool {
@@ -84,6 +85,8 @@ class TSSavePhotoSuccessTool {
             make.leading.equalTo(12)
         }
         
+
+        textLabel.textColor = "#4A5178".color
         textLabel.text = "Set Successfully".localized
         textLabel.font = UIFont.font(size: 14)
         view.addSubview(textLabel)
@@ -92,6 +95,7 @@ class TSSavePhotoSuccessTool {
             if let url = URL(string: "photos-redirect://") {
                 if UIApplication.shared.canOpenURL(url) {
                     UIApplication.shared.open(url, options: [:], completionHandler: nil)
+                    playVibration()
                 }
             }
         }
@@ -116,13 +120,14 @@ class TSSavePhotoSuccessTool {
     
     
     func show(atView:UIView,text:String = "Set Successfully".localized) {
-        textLabel.text = "Set Successfully".localized
+        textLabel.text = text
         atView.addSubview(saveSuccessBg)
         saveSuccessBg.snp.remakeConstraints { make in
             make.width.equalTo(288)
             make.height.equalTo(48)
             make.centerX.equalToSuperview()
-            make.bottom.equalTo(atView.safeAreaLayoutGuide.snp.bottom).offset(-92)
+//            make.bottom.equalTo(atView.safeAreaLayoutGuide.snp.bottom).offset(-92)
+            make.top.equalTo(k_Height_statusBar()+56.0)
         }
         
         DispatchQueue.main.asyncAfter(deadline: .now()+5.0) {

+ 30 - 0
TSLiveWallpaper/Common/Ex/UserDefault+Ex.swift

@@ -0,0 +1,30 @@
+//
+//  UserDefault+Ex.swift
+//  TSLiveWallpaper
+//
+//  Created by 100Years on 2024/12/30.
+//
+
+import Foundation
+
+@propertyWrapper
+struct UserDefault<T> {
+    let key: String
+    let defaultValue: T
+    let storage: UserDefaults
+
+    init(key: String, defaultValue: T, storage: UserDefaults = .standard) {
+        self.key = key
+        self.defaultValue = defaultValue
+        self.storage = storage
+    }
+
+    var wrappedValue: T {
+        get {
+            return storage.object(forKey: key) as? T ?? defaultValue
+        }
+        set {
+            storage.set(newValue, forKey: key)
+        }
+    }
+}

+ 14 - 0
TSLiveWallpaper/Common/GlobalImports/GlobalImports.swift

@@ -9,6 +9,8 @@
 @_exported import UIKit
 @_exported import SnapKit
 
+import AVFoundation
+
 func k_Height_statusBar() -> CGFloat {
     var statusBarHeight: CGFloat = 0;
     if #available(iOS 13.0, *) {
@@ -110,3 +112,15 @@ func appVersion() ->String{
     let short = Bundle.main.infoDictionary?["CFBundleShortVersionString"] as? String ?? ""
     return "V" + short
 }
+
+/// 震动
+func playVibration() {
+    // 默认震动   kSystemSoundID_Vibrate
+    // 1519     短震 3D Touch中的peek震动反馈
+    // 1520     短震 3D Touch中的pop震动反馈
+    // 1521     连续三次短震动
+    // peek的震动反馈轻于pop
+    
+    let soundID: UInt32 = 1520
+    AudioServicesPlaySystemSound(soundID)
+}

+ 0 - 1
TSLiveWallpaper/Common/ThirdParty/LivePhoto.swift

@@ -71,7 +71,6 @@ class LivePhoto {
         guard let imageFrame = videoAsset.getAssetFrame(percent: percent) else { return nil }
         guard let jpegData = imageFrame.jpegData(compressionQuality: 1.0) else { return nil }
         guard let url = cacheDirectory?.appendingPathComponent(fileName).appendingPathExtension("jpg") else { return nil }
-//        guard let url = cacheDirectory?.appendingPathComponent(UUID().uuidString).appendingPathExtension("jpg") else { return nil }
         do {
             try? jpegData.write(to: url)
             return url

+ 2 - 0
TSLiveWallpaper/DataManger/Config/TSConfig.swift

@@ -54,6 +54,8 @@ class TSConfig: NSObject {
         let localeId = Locale.current.identifier
         return localeId.contains("_CN")
     }
+    
+    static let appid = "6447607955" 
 
 }
 

+ 27 - 5
TSLiveWallpaper/DataManger/TSImageDataCenter.swift

@@ -35,7 +35,7 @@ enum ImageDataStyple : Int {
         case .homeLiveBanner:
             return UIEdgeInsets(top: 24, left: 0, bottom: 17, right: 0)
         case .homeLiveList:
-            return UIEdgeInsets(top: 10, left: 16, bottom: 10, right: 16)
+            return UIEdgeInsets(top: 0, left: 16, bottom: 10, right: 16)
         case .randomBanner:
             return UIEdgeInsets(top: 16, left: 16, bottom: 24, right: 16)
         case .randomList:
@@ -72,7 +72,7 @@ enum ImageDataStyple : Int {
     var cellSize:CGSize {
         switch self {
         case .homeLiveBanner:
-            return  CGSize(width: liveBannerW, height: liveBannerH)
+            return CGSize(width: liveBannerW, height: liveBannerH)
         case .homeLiveList:
             return CGSize(width: liveItemW, height: liveItemH)
         case .randomBanner:
@@ -87,11 +87,11 @@ enum ImageDataStyple : Int {
         case .homeLiveBanner:
             return TSHomeTopBannerCell.self
         case .homeLiveList:
-            return TSHomeCollectionCell .self
+            return TSHomeCollectionCell.self
         case .randomBanner:
-            return TSRandomWallpaperBannerCell .self
+            return TSRandomWallpaperBannerCell.self
         case .randomList:
-            return TSRandomWallpaperCell .self
+            return TSRandomWallpaperCell.self
         }
     }
     
@@ -113,6 +113,28 @@ let kImageDataCenterShared = TSImageDataCenter.shared
 class TSImageDataCenter{
 
     static var shared = TSImageDataCenter()
+    
+    @UserDefault(key: "editLiveHistoryList", defaultValue: "")
+    private var editLiveHistoryListString: String
+    
+    var editLiveHistoryListArray:[TSImageDataSectionModel]{
+        get{
+            if let totalArray = Mapper<TSImageDataSectionModel>().mapArray(JSONString: "historyListJsonString"){
+                return totalArray
+            }else{
+                return [TSImageDataSectionModel()]
+            }
+        }
+        
+        set{
+            if let jsonString = newValue.toJSONString() {
+                editLiveHistoryListString = jsonString
+            }
+        }
+    }
+    
+    
+    
 
     //所有数据
     var totalArray:[TSImageDataSectionModel] = [TSImageDataSectionModel]()