Explorar o código

使用TSSmalCoacopods,去除重复的类

100Years hai 2 meses
pai
achega
3bcf998f1c
Modificáronse 83 ficheiros con 139 adicións e 3964 borrados
  1. 1 0
      Podfile
  2. 11 1
      Podfile.lock
  3. 0 164
      TSLiveWallpaper.xcodeproj/project.pbxproj
  4. 7 8
      TSLiveWallpaper/Business/TSEditLiveVC/TSEditLiveEidtCell.swift
  5. 5 5
      TSLiveWallpaper/Business/TSEditLiveVC/TSEditLiveVC.swift
  6. 1 1
      TSLiveWallpaper/Business/TSEditLiveVC/TSEditVideoVC/EditorVideo/EditorVideoControlMaskView.swift
  7. 1 1
      TSLiveWallpaper/Business/TSEditLiveVC/TSEditVideoVC/EditorVideo/EditorVideoControlView.swift
  8. 5 4
      TSLiveWallpaper/Business/TSHomeVC/TSHomeCell.swift
  9. 3 3
      TSLiveWallpaper/Business/TSHomeVC/TSHomeVC.swift
  10. 1 1
      TSLiveWallpaper/Business/TSHomeVC/TSLiveWallpaperBrowseVC/TSLiveWallpaperBrowseVC.swift
  11. 6 6
      TSLiveWallpaper/Business/TSHomeVC/View/TSHomeTopBannerCell.swift
  12. 4 4
      TSLiveWallpaper/Business/TSMineVC/TSMineVC.swift
  13. 1 1
      TSLiveWallpaper/Business/TSMusic/Custom/ManageMenuAlertView.swift
  14. 1 1
      TSLiveWallpaper/Business/TSMusic/Custom/MusicEmptyView.swift
  15. 1 1
      TSLiveWallpaper/Business/TSMusic/Custom/PlayMiniBar.swift
  16. 1 1
      TSLiveWallpaper/Business/TSMusic/Custom/TipsView.swift
  17. 2 2
      TSLiveWallpaper/Business/TSMusic/Custom/ToastView.swift
  18. 1 1
      TSLiveWallpaper/Business/TSMusic/Detail/Controller/PlayDetailViewController.swift
  19. 1 1
      TSLiveWallpaper/Business/TSMusic/Detail/View/PlayDetailTopView.swift
  20. 1 1
      TSLiveWallpaper/Business/TSMusic/Helper/CWOperateButton.swift
  21. 1 1
      TSLiveWallpaper/Business/TSMusic/Helper/CWOperateViewController+Ext.swift
  22. 1 1
      TSLiveWallpaper/Business/TSMusic/Helper/OperateTopView.swift
  23. 1 1
      TSLiveWallpaper/Business/TSMusic/List/Controller/SongListViewController.swift
  24. 1 1
      TSLiveWallpaper/Business/TSMusic/List/View/SongDownloadCell.swift
  25. 1 1
      TSLiveWallpaper/Business/TSMusic/List/View/SongListCell.swift
  26. 1 1
      TSLiveWallpaper/Business/TSMusic/List/View/SongListTopView.swift
  27. 1 1
      TSLiveWallpaper/Business/TSMusic/PlayList/Controller/PlayDetailListViewContoller.swift
  28. 2 2
      TSLiveWallpaper/Business/TSMusic/PlayList/Controller/PlaylistDetailViewController.swift
  29. 1 1
      TSLiveWallpaper/Business/TSMusic/PlayList/Views/PlayDetailListViewCell.swift
  30. 1 1
      TSLiveWallpaper/Business/TSMusic/PlayList/Views/PlayListCell.swift
  31. 2 2
      TSLiveWallpaper/Business/TSMusic/PlayList/Views/PlayListManageView.swift
  32. 1 1
      TSLiveWallpaper/Business/TSMusic/Search/Controller/SearchOnlineViewController.swift
  33. 1 1
      TSLiveWallpaper/Business/TSMusic/SearchResult/SearchResultStateView.swift
  34. 1 1
      TSLiveWallpaper/Business/TSMusic/SearchResult/SearchResultViewController.swift
  35. 4 4
      TSLiveWallpaper/Business/TSPurchaseMembershipVC/TSPurchaseMembershipVC.swift
  36. 4 4
      TSLiveWallpaper/Business/TSPurchaseMembershipVC/TSPurchaseVC.swift
  37. 3 3
      TSLiveWallpaper/Business/TSPurchaseMembershipVC/TSViewTool/TSViewTool.swift
  38. 1 1
      TSLiveWallpaper/Business/TSRandomWallpaperVC/TSRandomWallpaperBrowseVC/TSRandomWallpaperBrowseVC.swift
  39. 2 2
      TSLiveWallpaper/Business/TSRandomWallpaperVC/TSRandomWallpaperVC.swift
  40. 7 7
      TSLiveWallpaper/Business/TSRandomWallpaperVC/TSRandomWallpaperView/TSRandomWallpaperBannerCell.swift
  41. 2 2
      TSLiveWallpaper/Business/TSRandomWallpaperVC/TSRandomWallpaperView/TSRandomWallpaperCell.swift
  42. 0 76
      TSLiveWallpaper/Common/BaseClass/TSBaseCollectionCell.swift
  43. 0 52
      TSLiveWallpaper/Common/BaseClass/TSBaseModel.swift
  44. 0 166
      TSLiveWallpaper/Common/BaseClass/TSBaseNavigationBarView.swift
  45. 0 110
      TSLiveWallpaper/Common/BaseClass/TSBaseNavigationC.swift
  46. 0 40
      TSLiveWallpaper/Common/BaseClass/TSBaseTabViewCell.swift
  47. 0 285
      TSLiveWallpaper/Common/BaseClass/TSBaseVC.swift
  48. 0 34
      TSLiveWallpaper/Common/BaseClass/TSBaseView.swift
  49. 0 144
      TSLiveWallpaper/Common/BaseClass/TSBasicItemModel.swift
  50. 0 70
      TSLiveWallpaper/Common/Ex/AVAsset+Ex.swift
  51. 0 47
      TSLiveWallpaper/Common/Ex/Array+Ex.swift
  52. 0 37
      TSLiveWallpaper/Common/Ex/CGFloat+Ex.swift
  53. 0 24
      TSLiveWallpaper/Common/Ex/Date+Ex.swift
  54. 0 41
      TSLiveWallpaper/Common/Ex/Dictionary+Ex.swift
  55. 0 33
      TSLiveWallpaper/Common/Ex/Int+Ex.swift
  56. 0 294
      TSLiveWallpaper/Common/Ex/NSString+Ex.swift
  57. 0 47
      TSLiveWallpaper/Common/Ex/SwiftUI/Color+Ex.swift
  58. 0 16
      TSLiveWallpaper/Common/Ex/SwiftUI/Font+Ex.swift
  59. 0 35
      TSLiveWallpaper/Common/Ex/TimeInterval+Ext.swift
  60. 30 139
      TSLiveWallpaper/Common/Ex/UIButton+Ex.swift
  61. 0 49
      TSLiveWallpaper/Common/Ex/UIColor+Ex.swift
  62. 0 92
      TSLiveWallpaper/Common/Ex/UIDevice+Extension.swift
  63. 0 66
      TSLiveWallpaper/Common/Ex/UIFont+Ex.swift
  64. 0 90
      TSLiveWallpaper/Common/Ex/UIImage+Ex.swift
  65. 0 116
      TSLiveWallpaper/Common/Ex/UIImageView+Ex.swift
  66. 0 88
      TSLiveWallpaper/Common/Ex/UILabel+Ex.swift
  67. 0 195
      TSLiveWallpaper/Common/Ex/UITableView+Ex.swift
  68. 0 54
      TSLiveWallpaper/Common/Ex/UIViewController+Ex.swift
  69. 0 30
      TSLiveWallpaper/Common/Ex/UserDefault+Ex.swift
  70. 0 303
      TSLiveWallpaper/Common/Ex/View+Ex.swift
  71. 1 1
      TSLiveWallpaper/Common/GlobalImports/GlobalImports.swift
  72. 1 131
      TSLiveWallpaper/Common/Tool/TSFileManagerTool.swift
  73. 0 42
      TSLiveWallpaper/Common/Tool/TSToastTool.swift
  74. 0 44
      TSLiveWallpaper/Common/Tool/WindowHelper.swift
  75. 0 291
      TSLiveWallpaper/Common/View/UICollectionView+Component/CollectionViewComponent.swift
  76. 0 63
      TSLiveWallpaper/Common/View/UICollectionView+Component/CommonSectionComponent.swift
  77. 0 64
      TSLiveWallpaper/Common/View/UICollectionView+Component/Component.swift
  78. 0 164
      TSLiveWallpaper/Common/View/UICollectionView+Component/UICollectionView+More.swift
  79. 0 76
      TSLiveWallpaper/Common/View/UITableView+TSItemModel/TSSimpleTableView.swift
  80. 0 55
      TSLiveWallpaper/DataManger/Config/TSConfig.swift
  81. 4 4
      TSLiveWallpaper/DataManger/TSHomeDataModel.swift
  82. 6 6
      TSLiveWallpaper/DataManger/TSImageDataCenter.swift
  83. 4 4
      TSLiveWallpaper/DataManger/TSRandomWallpaperModel.swift

+ 1 - 0
Podfile

@@ -29,6 +29,7 @@ target 'TSLiveWallpaper' do
   pod 'Google-Mobile-Ads-SDK'
   pod 'ADManager', :path => '../TSCoacopods/ADManager'
   pod 'RealmSwift', '~>10'
+  pod 'TSSmalCoacopods', :path => '../TSSmalCoacopods'
 end
 
 

+ 11 - 1
Podfile.lock

@@ -103,6 +103,12 @@ PODS:
   - SVProgressHUD (2.3.1):
     - SVProgressHUD/Core (= 2.3.1)
   - SVProgressHUD/Core (2.3.1)
+  - TSSmalCoacopods (1.0.0):
+    - Alamofire
+    - Kingfisher (= 7.10.0)
+    - ObjectMapper (~> 4.2)
+    - SnapKit
+    - SVProgressHUD
   - TSVideoKit (0.1.0):
     - AFNetworking
     - Alamofire
@@ -133,6 +139,7 @@ DEPENDENCIES:
   - RealmSwift (~> 10)
   - SnapKit
   - SVProgressHUD
+  - TSSmalCoacopods (from `../TSSmalCoacopods`)
   - TSVideoKit (from `https://gitee.com/WanlanNeel/tsvideo-kit.git`, branch `feature/mini`)
   - TYCyclePagerView
   - TZImagePickerController
@@ -170,6 +177,8 @@ EXTERNAL SOURCES:
     :git: https://gitee.com/WanlanNeel/klextension.git
   KLTips:
     :git: https://gitee.com/WanlanNeel/kltips.git
+  TSSmalCoacopods:
+    :path: "../TSSmalCoacopods"
   TSVideoKit:
     :branch: feature/mini
     :git: https://gitee.com/WanlanNeel/tsvideo-kit.git
@@ -208,11 +217,12 @@ SPEC CHECKSUMS:
   SJVideoPlayer: 4f09814f58522e0975cb2dccfda925f6c8643467
   SnapKit: d612e99e678a2d3b95bf60b0705ed0a35c03484a
   SVProgressHUD: 4837c74bdfe2e51e8821c397825996a8d7de6e22
+  TSSmalCoacopods: 6aa97167f0c76b16fc7d1fd1eb198bb6aece4f68
   TSVideoKit: 922402ea051d72e78224f22d37c10fdb2e378f60
   TYCyclePagerView: 2b051dade0615c70784aa34f40c646feeddb7344
   TZImagePickerController: d084a7b97c82d387e7669dd86dc9a9057500aacf
   YYModel: 2a7fdd96aaa4b86a824e26d0c517de8928c04b30
 
-PODFILE CHECKSUM: eec80600a700d756df95207b3fdaca7f1a7cb7aa
+PODFILE CHECKSUM: 92404e787675f7e5d22aded1f99acddf441c6801
 
 COCOAPODS: 1.16.2

+ 0 - 164
TSLiveWallpaper.xcodeproj/project.pbxproj

@@ -99,7 +99,6 @@
 		60553FD92D3B54A400BAAD7F /* GradientBackgroundModifier.swift in Sources */ = {isa = PBXBuildFile; fileRef = 60553FCE2D3B54A400BAAD7F /* GradientBackgroundModifier.swift */; };
 		60553FDB2D3B7CC600BAAD7F /* FitManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = 60553FDA2D3B7CC600BAAD7F /* FitManager.swift */; };
 		60553FDD2D3B84E700BAAD7F /* UIScrollView+Ext.swift in Sources */ = {isa = PBXBuildFile; fileRef = 60553FDC2D3B84E700BAAD7F /* UIScrollView+Ext.swift */; };
-		60553FDF2D3B850C00BAAD7F /* TimeInterval+Ext.swift in Sources */ = {isa = PBXBuildFile; fileRef = 60553FDE2D3B850C00BAAD7F /* TimeInterval+Ext.swift */; };
 		60553FE32D3DF12200BAAD7F /* CustomSegementItem.swift in Sources */ = {isa = PBXBuildFile; fileRef = 60553FE22D3DF12200BAAD7F /* CustomSegementItem.swift */; };
 		606372D82D545E6C005C82CF /* Example Music.mp3 in Resources */ = {isa = PBXBuildFile; fileRef = 606372D72D545E6C005C82CF /* Example Music.mp3 */; };
 		606372DA2D545F0D005C82CF /* ExampleIniter.swift in Sources */ = {isa = PBXBuildFile; fileRef = 606372D92D545F0D005C82CF /* ExampleIniter.swift */; };
@@ -113,43 +112,21 @@
 		60F82C0F2D43295100FFB08D /* MusicHomeContainerViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 60F82C0E2D43295100FFB08D /* MusicHomeContainerViewController.swift */; };
 		60F82C112D43298800FFB08D /* MusicContainerViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 60F82C102D43298800FFB08D /* MusicContainerViewModel.swift */; };
 		A81CA4652D15685F00A3AAC8 /* TSLaunchVC.swift in Sources */ = {isa = PBXBuildFile; fileRef = A81CA4642D15685D00A3AAC8 /* TSLaunchVC.swift */; };
-		A81CA4692D156AB600A3AAC8 /* TSBaseVC.swift in Sources */ = {isa = PBXBuildFile; fileRef = A81CA4682D156AAB00A3AAC8 /* TSBaseVC.swift */; };
-		A81CA46B2D156BDC00A3AAC8 /* TSBaseNavigationC.swift in Sources */ = {isa = PBXBuildFile; fileRef = A81CA46A2D156BC600A3AAC8 /* TSBaseNavigationC.swift */; };
 		A81CA46E2D156C7000A3AAC8 /* GlobalImports.swift in Sources */ = {isa = PBXBuildFile; fileRef = A81CA46D2D156C6F00A3AAC8 /* GlobalImports.swift */; };
-		A81CA4722D1575B900A3AAC8 /* TSBaseNavigationBarView.swift in Sources */ = {isa = PBXBuildFile; fileRef = A81CA4712D1575B800A3AAC8 /* TSBaseNavigationBarView.swift */; };
-		A81CA4772D15779E00A3AAC8 /* UIColor+Ex.swift in Sources */ = {isa = PBXBuildFile; fileRef = A81CA4762D15779400A3AAC8 /* UIColor+Ex.swift */; };
-		A81CA4792D1577E800A3AAC8 /* NSString+Ex.swift in Sources */ = {isa = PBXBuildFile; fileRef = A81CA4782D1577E100A3AAC8 /* NSString+Ex.swift */; };
-		A81CA47B2D15784800A3AAC8 /* Int+Ex.swift in Sources */ = {isa = PBXBuildFile; fileRef = A81CA47A2D15784400A3AAC8 /* Int+Ex.swift */; };
 		A81CA47F2D15789C00A3AAC8 /* TSConfig.swift in Sources */ = {isa = PBXBuildFile; fileRef = A81CA47E2D15789A00A3AAC8 /* TSConfig.swift */; };
-		A81CA4812D157B1300A3AAC8 /* UIFont+Ex.swift in Sources */ = {isa = PBXBuildFile; fileRef = A81CA4802D157B0A00A3AAC8 /* UIFont+Ex.swift */; };
 		A81CA4832D157F5C00A3AAC8 /* UIImageView+Ex.swift in Sources */ = {isa = PBXBuildFile; fileRef = A81CA4822D157F5200A3AAC8 /* UIImageView+Ex.swift */; };
 		A81CA4852D1582A600A3AAC8 /* UIButton+Ex.swift in Sources */ = {isa = PBXBuildFile; fileRef = A81CA4842D15829E00A3AAC8 /* UIButton+Ex.swift */; };
-		A81CA4872D15832900A3AAC8 /* UILabel+Ex.swift in Sources */ = {isa = PBXBuildFile; fileRef = A81CA4862D15830E00A3AAC8 /* UILabel+Ex.swift */; };
 		A81CA48B2D15843700A3AAC8 /* TSCommonTool.swift in Sources */ = {isa = PBXBuildFile; fileRef = A81CA48A2D15843500A3AAC8 /* TSCommonTool.swift */; };
 		A81CA48F2D15857B00A3AAC8 /* TSTabBarController.swift in Sources */ = {isa = PBXBuildFile; fileRef = A81CA48E2D15857900A3AAC8 /* TSTabBarController.swift */; };
 		A81CA4952D1652B500A3AAC8 /* TSEditLiveVC.swift in Sources */ = {isa = PBXBuildFile; fileRef = A81CA4942D1652B300A3AAC8 /* TSEditLiveVC.swift */; };
 		A81CA4972D1652BD00A3AAC8 /* TSRandomWallpaperVC.swift in Sources */ = {isa = PBXBuildFile; fileRef = A81CA4962D1652BB00A3AAC8 /* TSRandomWallpaperVC.swift */; };
 		A81CA4992D1652C400A3AAC8 /* TSMineVC.swift in Sources */ = {isa = PBXBuildFile; fileRef = A81CA4982D1652C200A3AAC8 /* TSMineVC.swift */; };
 		A81CA49B2D1652CA00A3AAC8 /* TSHomeVC.swift in Sources */ = {isa = PBXBuildFile; fileRef = A81CA49A2D1652C900A3AAC8 /* TSHomeVC.swift */; };
-		A81CA49D2D1654B600A3AAC8 /* UITableView+Ex.swift in Sources */ = {isa = PBXBuildFile; fileRef = A81CA49C2D1654A500A3AAC8 /* UITableView+Ex.swift */; };
 		A81CA49F2D1655CE00A3AAC8 /* UICollectionView+Ex.swift in Sources */ = {isa = PBXBuildFile; fileRef = A81CA49E2D1655BE00A3AAC8 /* UICollectionView+Ex.swift */; };
-		A81CA4A12D166F3C00A3AAC8 /* TSBasicItemModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = A81CA4A02D166F3A00A3AAC8 /* TSBasicItemModel.swift */; };
 		A81CA4A42D16748800A3AAC8 /* TSViewTool.swift in Sources */ = {isa = PBXBuildFile; fileRef = A81CA4A32D16748700A3AAC8 /* TSViewTool.swift */; };
-		A81CA4A62D16915F00A3AAC8 /* Dictionary+Ex.swift in Sources */ = {isa = PBXBuildFile; fileRef = A81CA4A52D16914C00A3AAC8 /* Dictionary+Ex.swift */; };
-		A81CA4A82D16918900A3AAC8 /* Array+Ex.swift in Sources */ = {isa = PBXBuildFile; fileRef = A81CA4A72D16918400A3AAC8 /* Array+Ex.swift */; };
 		A81CA4AA2D16943800A3AAC8 /* TSMineCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = A81CA4A92D16943200A3AAC8 /* TSMineCell.swift */; };
-		A81CA4AD2D16944B00A3AAC8 /* TSBaseTabViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = A81CA4AB2D16944B00A3AAC8 /* TSBaseTabViewCell.swift */; };
-		A81CA4AE2D16944B00A3AAC8 /* TSBaseCollectionCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = A81CA4AC2D16944B00A3AAC8 /* TSBaseCollectionCell.swift */; };
-		A81CA4B02D1694C900A3AAC8 /* Date+Ex.swift in Sources */ = {isa = PBXBuildFile; fileRef = A81CA4AF2D1694C200A3AAC8 /* Date+Ex.swift */; };
-		A81CA4B42D169C2E00A3AAC8 /* TSToastTool.swift in Sources */ = {isa = PBXBuildFile; fileRef = A81CA4B32D169C2600A3AAC8 /* TSToastTool.swift */; };
-		A81CA4B62D169F2400A3AAC8 /* WindowHelper.swift in Sources */ = {isa = PBXBuildFile; fileRef = A81CA4B52D169F1A00A3AAC8 /* WindowHelper.swift */; };
 		A81CA4B82D16A6BD00A3AAC8 /* View+Ex.swift in Sources */ = {isa = PBXBuildFile; fileRef = A81CA4B72D16A6B600A3AAC8 /* View+Ex.swift */; };
 		A81CA4BA2D16B6E300A3AAC8 /* TSHomeCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = A81CA4B92D16B6DC00A3AAC8 /* TSHomeCell.swift */; };
-		A81F5B2B2D18F9C600740085 /* UICollectionView+More.swift in Sources */ = {isa = PBXBuildFile; fileRef = A81F5B2A2D18F9C600740085 /* UICollectionView+More.swift */; };
-		A81F5B322D18FA2E00740085 /* Component.swift in Sources */ = {isa = PBXBuildFile; fileRef = A81F5B2F2D18FA2E00740085 /* Component.swift */; };
-		A81F5B332D18FA2E00740085 /* CommonSectionComponent.swift in Sources */ = {isa = PBXBuildFile; fileRef = A81F5B302D18FA2E00740085 /* CommonSectionComponent.swift */; };
-		A81F5B342D18FA2E00740085 /* CollectionViewComponent.swift in Sources */ = {isa = PBXBuildFile; fileRef = A81F5B2E2D18FA2E00740085 /* CollectionViewComponent.swift */; };
-		A81F5B392D19037800740085 /* TSBaseModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = A81F5B382D19037100740085 /* TSBaseModel.swift */; };
 		A81F5B3C2D19087100740085 /* TSRandomWallpaperCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = A81F5B3B2D19086B00740085 /* TSRandomWallpaperCell.swift */; };
 		A81F5B3E2D19088100740085 /* TSRandomWallpaperBannerCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = A81F5B3D2D19087600740085 /* TSRandomWallpaperBannerCell.swift */; };
 		A81F5B402D194EA900740085 /* UIDevice+Extension.swift in Sources */ = {isa = PBXBuildFile; fileRef = A81F5B3F2D194EA900740085 /* UIDevice+Extension.swift */; };
@@ -158,10 +135,8 @@
 		A81F5B472D19562800740085 /* EditorVideoControlMaskView.swift in Sources */ = {isa = PBXBuildFile; fileRef = A81F5B462D19562800740085 /* EditorVideoControlMaskView.swift */; };
 		A81F5B492D1956EA00740085 /* UIScreen.swift in Sources */ = {isa = PBXBuildFile; fileRef = A81F5B482D1956E600740085 /* UIScreen.swift */; };
 		A81F5B4B2D19658300740085 /* PhotoTools.swift in Sources */ = {isa = PBXBuildFile; fileRef = A81F5B4A2D19658300740085 /* PhotoTools.swift */; };
-		A81F5B4D2D1965F800740085 /* UIImage+Ex.swift in Sources */ = {isa = PBXBuildFile; fileRef = A81F5B4C2D1965EF00740085 /* UIImage+Ex.swift */; };
 		A81F5B4F2D19674600740085 /* AVAsset+Ex.swift in Sources */ = {isa = PBXBuildFile; fileRef = A81F5B4E2D19673500740085 /* AVAsset+Ex.swift */; };
 		A81F5B522D19685900740085 /* response.json in Resources */ = {isa = PBXBuildFile; fileRef = A81F5B512D19685900740085 /* response.json */; };
-		A81F5B542D1969E000740085 /* CGFloat+Ex.swift in Sources */ = {isa = PBXBuildFile; fileRef = A81F5B532D1969D500740085 /* CGFloat+Ex.swift */; };
 		A81F5B562D1982BF00740085 /* TSImageDataCenter.swift in Sources */ = {isa = PBXBuildFile; fileRef = A81F5B552D1982A900740085 /* TSImageDataCenter.swift */; };
 		A81F5B5B2D1A5F2300740085 /* TSHomeTopBannerCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = A81F5B5A2D1A5F1800740085 /* TSHomeTopBannerCell.swift */; };
 		A81F5B5D2D1A906C00740085 /* TSHomeDataModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = A81F5B5C2D1A905800740085 /* TSHomeDataModel.swift */; };
@@ -177,7 +152,6 @@
 		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 */; };
 		A8477C9F2D22ABDA00DF0B93 /* TSEditLiveEidtCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = A8477C9E2D22ABD500DF0B93 /* TSEditLiveEidtCell.swift */; };
 		A84C239A2D1E3A4300B61B55 /* GPVideoPlayerView.swift in Sources */ = {isa = PBXBuildFile; fileRef = A84C23962D1E3A4300B61B55 /* GPVideoPlayerView.swift */; };
 		A84C239B2D1E3A4300B61B55 /* GPVideoClipperController.swift in Sources */ = {isa = PBXBuildFile; fileRef = A84C23982D1E3A4300B61B55 /* GPVideoClipperController.swift */; };
@@ -190,8 +164,6 @@
 		A86857872DF81B660089D222 /* TSNetWork+Business.swift in Sources */ = {isa = PBXBuildFile; fileRef = A86857852DF81B660089D222 /* TSNetWork+Business.swift */; };
 		A86857882DF81B660089D222 /* TSNetworkManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = A86857842DF81B660089D222 /* TSNetworkManager.swift */; };
 		A86857892DF81B660089D222 /* TSNetworkManager+Loading.swift in Sources */ = {isa = PBXBuildFile; fileRef = A86857862DF81B660089D222 /* TSNetworkManager+Loading.swift */; };
-		A87833202D293EEC00E47F2C /* TSSimpleTableView.swift in Sources */ = {isa = PBXBuildFile; fileRef = A878331F2D293ED300E47F2C /* TSSimpleTableView.swift */; };
-		A8C4C01D2D2397B9003C46FC /* UIViewController+Ex.swift in Sources */ = {isa = PBXBuildFile; fileRef = A8C4C01C2D2397B4003C46FC /* UIViewController+Ex.swift */; };
 		A8C4C0982D242154003C46FC /* LivePhoto.swift in Sources */ = {isa = PBXBuildFile; fileRef = A858EE162D1CF49B004B680F /* LivePhoto.swift */; };
 		A8C4C0A42D24218A003C46FC /* metadata.mov in Resources */ = {isa = PBXBuildFile; fileRef = A8C4C09E2D24218A003C46FC /* metadata.mov */; };
 		A8C4C0A52D24218A003C46FC /* Converter4Video.swift in Sources */ = {isa = PBXBuildFile; fileRef = A8C4C09B2D24218A003C46FC /* Converter4Video.swift */; };
@@ -208,10 +180,7 @@
 		A8F76C3C2D35026200AA6E93 /* TSPurchaseMembershipVC.swift in Sources */ = {isa = PBXBuildFile; fileRef = A8F76C3B2D35026100AA6E93 /* TSPurchaseMembershipVC.swift */; };
 		A8F76C422D350A9600AA6E93 /* TSPurchaseManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = A8F76C3E2D350A9600AA6E93 /* TSPurchaseManager.swift */; };
 		A8F76C4D2D3747B400AA6E93 /* TSPurchaseVC.swift in Sources */ = {isa = PBXBuildFile; fileRef = A8F76C4C2D3747AB00AA6E93 /* TSPurchaseVC.swift */; };
-		A8F774522D3757E700AA6E93 /* Color+Ex.swift in Sources */ = {isa = PBXBuildFile; fileRef = A8F774512D3757DF00AA6E93 /* Color+Ex.swift */; };
-		A8F774542D37581F00AA6E93 /* Font+Ex.swift in Sources */ = {isa = PBXBuildFile; fileRef = A8F774532D37581700AA6E93 /* Font+Ex.swift */; };
 		A8F778AE2D1AC12400BF55D5 /* TSRandomWallpaperBrowseView.swift in Sources */ = {isa = PBXBuildFile; fileRef = A8F778AD2D1AC12100BF55D5 /* TSRandomWallpaperBrowseView.swift */; };
-		A8F778B02D1AC17500BF55D5 /* TSBaseView.swift in Sources */ = {isa = PBXBuildFile; fileRef = A8F778AF2D1AC16F00BF55D5 /* TSBaseView.swift */; };
 		A8F778B22D1BA07200BF55D5 /* TSRandomWallpaperBrowseSelectView.swift in Sources */ = {isa = PBXBuildFile; fileRef = A8F778B12D1BA07000BF55D5 /* TSRandomWallpaperBrowseSelectView.swift */; };
 		A8F778B42D1BB8F600BF55D5 /* PhotoManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = A8F778B32D1BB8F300BF55D5 /* PhotoManager.swift */; };
 		A8F778B72D1BE9A500BF55D5 /* TSLiveWallpaperBrowseVC.swift in Sources */ = {isa = PBXBuildFile; fileRef = A8F778B62D1BE9A100BF55D5 /* TSLiveWallpaperBrowseVC.swift */; };
@@ -313,7 +282,6 @@
 		60553FCE2D3B54A400BAAD7F /* GradientBackgroundModifier.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = GradientBackgroundModifier.swift; sourceTree = "<group>"; };
 		60553FDA2D3B7CC600BAAD7F /* FitManager.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FitManager.swift; sourceTree = "<group>"; };
 		60553FDC2D3B84E700BAAD7F /* UIScrollView+Ext.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "UIScrollView+Ext.swift"; sourceTree = "<group>"; };
-		60553FDE2D3B850C00BAAD7F /* TimeInterval+Ext.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "TimeInterval+Ext.swift"; sourceTree = "<group>"; };
 		60553FE22D3DF12200BAAD7F /* CustomSegementItem.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CustomSegementItem.swift; sourceTree = "<group>"; };
 		606372D72D545E6C005C82CF /* Example Music.mp3 */ = {isa = PBXFileReference; lastKnownFileType = audio.mp3; path = "Example Music.mp3"; sourceTree = "<group>"; };
 		606372D92D545F0D005C82CF /* ExampleIniter.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ExampleIniter.swift; sourceTree = "<group>"; };
@@ -336,43 +304,21 @@
 		60F82C102D43298800FFB08D /* MusicContainerViewModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MusicContainerViewModel.swift; sourceTree = "<group>"; };
 		71E5F623537702A8306DF3C8 /* Pods-TSLiveWallpaper.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-TSLiveWallpaper.release.xcconfig"; path = "Target Support Files/Pods-TSLiveWallpaper/Pods-TSLiveWallpaper.release.xcconfig"; sourceTree = "<group>"; };
 		A81CA4642D15685D00A3AAC8 /* TSLaunchVC.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TSLaunchVC.swift; sourceTree = "<group>"; };
-		A81CA4682D156AAB00A3AAC8 /* TSBaseVC.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TSBaseVC.swift; sourceTree = "<group>"; };
-		A81CA46A2D156BC600A3AAC8 /* TSBaseNavigationC.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TSBaseNavigationC.swift; sourceTree = "<group>"; };
 		A81CA46D2D156C6F00A3AAC8 /* GlobalImports.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = GlobalImports.swift; sourceTree = "<group>"; };
-		A81CA4712D1575B800A3AAC8 /* TSBaseNavigationBarView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TSBaseNavigationBarView.swift; sourceTree = "<group>"; };
-		A81CA4762D15779400A3AAC8 /* UIColor+Ex.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "UIColor+Ex.swift"; sourceTree = "<group>"; };
-		A81CA4782D1577E100A3AAC8 /* NSString+Ex.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "NSString+Ex.swift"; sourceTree = "<group>"; };
-		A81CA47A2D15784400A3AAC8 /* Int+Ex.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "Int+Ex.swift"; sourceTree = "<group>"; };
 		A81CA47E2D15789A00A3AAC8 /* TSConfig.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TSConfig.swift; sourceTree = "<group>"; };
-		A81CA4802D157B0A00A3AAC8 /* UIFont+Ex.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "UIFont+Ex.swift"; sourceTree = "<group>"; };
 		A81CA4822D157F5200A3AAC8 /* UIImageView+Ex.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "UIImageView+Ex.swift"; sourceTree = "<group>"; };
 		A81CA4842D15829E00A3AAC8 /* UIButton+Ex.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "UIButton+Ex.swift"; sourceTree = "<group>"; };
-		A81CA4862D15830E00A3AAC8 /* UILabel+Ex.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "UILabel+Ex.swift"; sourceTree = "<group>"; };
 		A81CA48A2D15843500A3AAC8 /* TSCommonTool.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TSCommonTool.swift; sourceTree = "<group>"; };
 		A81CA48E2D15857900A3AAC8 /* TSTabBarController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TSTabBarController.swift; sourceTree = "<group>"; };
 		A81CA4942D1652B300A3AAC8 /* TSEditLiveVC.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TSEditLiveVC.swift; sourceTree = "<group>"; };
 		A81CA4962D1652BB00A3AAC8 /* TSRandomWallpaperVC.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TSRandomWallpaperVC.swift; sourceTree = "<group>"; };
 		A81CA4982D1652C200A3AAC8 /* TSMineVC.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TSMineVC.swift; sourceTree = "<group>"; };
 		A81CA49A2D1652C900A3AAC8 /* TSHomeVC.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TSHomeVC.swift; sourceTree = "<group>"; };
-		A81CA49C2D1654A500A3AAC8 /* UITableView+Ex.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "UITableView+Ex.swift"; sourceTree = "<group>"; };
 		A81CA49E2D1655BE00A3AAC8 /* UICollectionView+Ex.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "UICollectionView+Ex.swift"; sourceTree = "<group>"; };
-		A81CA4A02D166F3A00A3AAC8 /* TSBasicItemModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TSBasicItemModel.swift; sourceTree = "<group>"; };
 		A81CA4A32D16748700A3AAC8 /* TSViewTool.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TSViewTool.swift; sourceTree = "<group>"; };
-		A81CA4A52D16914C00A3AAC8 /* Dictionary+Ex.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "Dictionary+Ex.swift"; sourceTree = "<group>"; };
-		A81CA4A72D16918400A3AAC8 /* Array+Ex.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "Array+Ex.swift"; sourceTree = "<group>"; };
 		A81CA4A92D16943200A3AAC8 /* TSMineCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TSMineCell.swift; sourceTree = "<group>"; };
-		A81CA4AB2D16944B00A3AAC8 /* TSBaseTabViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TSBaseTabViewCell.swift; sourceTree = "<group>"; };
-		A81CA4AC2D16944B00A3AAC8 /* TSBaseCollectionCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TSBaseCollectionCell.swift; sourceTree = "<group>"; };
-		A81CA4AF2D1694C200A3AAC8 /* Date+Ex.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "Date+Ex.swift"; sourceTree = "<group>"; };
-		A81CA4B32D169C2600A3AAC8 /* TSToastTool.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TSToastTool.swift; sourceTree = "<group>"; };
-		A81CA4B52D169F1A00A3AAC8 /* WindowHelper.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = WindowHelper.swift; sourceTree = "<group>"; };
 		A81CA4B72D16A6B600A3AAC8 /* View+Ex.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "View+Ex.swift"; sourceTree = "<group>"; };
 		A81CA4B92D16B6DC00A3AAC8 /* TSHomeCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TSHomeCell.swift; sourceTree = "<group>"; };
-		A81F5B2A2D18F9C600740085 /* UICollectionView+More.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "UICollectionView+More.swift"; sourceTree = "<group>"; };
-		A81F5B2E2D18FA2E00740085 /* CollectionViewComponent.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CollectionViewComponent.swift; sourceTree = "<group>"; };
-		A81F5B2F2D18FA2E00740085 /* Component.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Component.swift; sourceTree = "<group>"; };
-		A81F5B302D18FA2E00740085 /* CommonSectionComponent.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CommonSectionComponent.swift; sourceTree = "<group>"; };
-		A81F5B382D19037100740085 /* TSBaseModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TSBaseModel.swift; sourceTree = "<group>"; };
 		A81F5B3B2D19086B00740085 /* TSRandomWallpaperCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TSRandomWallpaperCell.swift; sourceTree = "<group>"; };
 		A81F5B3D2D19087600740085 /* TSRandomWallpaperBannerCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TSRandomWallpaperBannerCell.swift; sourceTree = "<group>"; };
 		A81F5B3F2D194EA900740085 /* UIDevice+Extension.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "UIDevice+Extension.swift"; sourceTree = "<group>"; };
@@ -381,10 +327,8 @@
 		A81F5B462D19562800740085 /* EditorVideoControlMaskView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = EditorVideoControlMaskView.swift; sourceTree = "<group>"; };
 		A81F5B482D1956E600740085 /* UIScreen.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UIScreen.swift; sourceTree = "<group>"; };
 		A81F5B4A2D19658300740085 /* PhotoTools.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PhotoTools.swift; sourceTree = "<group>"; };
-		A81F5B4C2D1965EF00740085 /* UIImage+Ex.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "UIImage+Ex.swift"; sourceTree = "<group>"; };
 		A81F5B4E2D19673500740085 /* AVAsset+Ex.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "AVAsset+Ex.swift"; sourceTree = "<group>"; };
 		A81F5B512D19685900740085 /* response.json */ = {isa = PBXFileReference; lastKnownFileType = text.json; path = response.json; sourceTree = "<group>"; };
-		A81F5B532D1969D500740085 /* CGFloat+Ex.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "CGFloat+Ex.swift"; sourceTree = "<group>"; };
 		A81F5B552D1982A900740085 /* TSImageDataCenter.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TSImageDataCenter.swift; sourceTree = "<group>"; };
 		A81F5B5A2D1A5F1800740085 /* TSHomeTopBannerCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TSHomeTopBannerCell.swift; sourceTree = "<group>"; };
 		A81F5B5C2D1A905800740085 /* TSHomeDataModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TSHomeDataModel.swift; sourceTree = "<group>"; };
@@ -400,7 +344,6 @@
 		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>"; };
 		A8477C9E2D22ABD500DF0B93 /* TSEditLiveEidtCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TSEditLiveEidtCell.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>"; };
@@ -414,8 +357,6 @@
 		A86857842DF81B660089D222 /* TSNetworkManager.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TSNetworkManager.swift; sourceTree = "<group>"; };
 		A86857852DF81B660089D222 /* TSNetWork+Business.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "TSNetWork+Business.swift"; sourceTree = "<group>"; };
 		A86857862DF81B660089D222 /* TSNetworkManager+Loading.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "TSNetworkManager+Loading.swift"; sourceTree = "<group>"; };
-		A878331F2D293ED300E47F2C /* TSSimpleTableView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TSSimpleTableView.swift; sourceTree = "<group>"; };
-		A8C4C01C2D2397B4003C46FC /* UIViewController+Ex.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "UIViewController+Ex.swift"; sourceTree = "<group>"; };
 		A8C4C0992D24218A003C46FC /* AVAssetExtension.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AVAssetExtension.swift; sourceTree = "<group>"; };
 		A8C4C09A2D24218A003C46FC /* Converter4Image.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Converter4Image.swift; sourceTree = "<group>"; };
 		A8C4C09B2D24218A003C46FC /* Converter4Video.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Converter4Video.swift; sourceTree = "<group>"; };
@@ -435,10 +376,7 @@
 		A8F76C3B2D35026100AA6E93 /* TSPurchaseMembershipVC.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TSPurchaseMembershipVC.swift; sourceTree = "<group>"; };
 		A8F76C3E2D350A9600AA6E93 /* TSPurchaseManager.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TSPurchaseManager.swift; sourceTree = "<group>"; };
 		A8F76C4C2D3747AB00AA6E93 /* TSPurchaseVC.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TSPurchaseVC.swift; sourceTree = "<group>"; };
-		A8F774512D3757DF00AA6E93 /* Color+Ex.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "Color+Ex.swift"; sourceTree = "<group>"; };
-		A8F774532D37581700AA6E93 /* Font+Ex.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "Font+Ex.swift"; sourceTree = "<group>"; };
 		A8F778AD2D1AC12100BF55D5 /* TSRandomWallpaperBrowseView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TSRandomWallpaperBrowseView.swift; sourceTree = "<group>"; };
-		A8F778AF2D1AC16F00BF55D5 /* TSBaseView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TSBaseView.swift; sourceTree = "<group>"; };
 		A8F778B12D1BA07000BF55D5 /* TSRandomWallpaperBrowseSelectView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TSRandomWallpaperBrowseSelectView.swift; sourceTree = "<group>"; };
 		A8F778B32D1BB8F300BF55D5 /* PhotoManager.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PhotoManager.swift; sourceTree = "<group>"; };
 		A8F778B62D1BE9A100BF55D5 /* TSLiveWallpaperBrowseVC.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TSLiveWallpaperBrowseVC.swift; sourceTree = "<group>"; };
@@ -799,31 +737,14 @@
 				A86857832DF81B510089D222 /* TSNetWork */,
 				A8F76C452D3510E700AA6E93 /* NetworkManager */,
 				A8F76C402D350A9600AA6E93 /* Purchase */,
-				A878331D2D293E9300E47F2C /* View */,
 				A858EE182D1CF635004B680F /* ThirdParty */,
 				A81CA4882D15840F00A3AAC8 /* Tool */,
 				A81CA4752D15778800A3AAC8 /* Ex */,
 				A81CA46C2D156C6800A3AAC8 /* GlobalImports */,
-				A81CA4672D156A9400A3AAC8 /* BaseClass */,
 			);
 			path = Common;
 			sourceTree = "<group>";
 		};
-		A81CA4672D156A9400A3AAC8 /* BaseClass */ = {
-			isa = PBXGroup;
-			children = (
-				A81F5B382D19037100740085 /* TSBaseModel.swift */,
-				A8F778AF2D1AC16F00BF55D5 /* TSBaseView.swift */,
-				A81CA4AB2D16944B00A3AAC8 /* TSBaseTabViewCell.swift */,
-				A81CA4AC2D16944B00A3AAC8 /* TSBaseCollectionCell.swift */,
-				A81CA4A02D166F3A00A3AAC8 /* TSBasicItemModel.swift */,
-				A81CA4712D1575B800A3AAC8 /* TSBaseNavigationBarView.swift */,
-				A81CA46A2D156BC600A3AAC8 /* TSBaseNavigationC.swift */,
-				A81CA4682D156AAB00A3AAC8 /* TSBaseVC.swift */,
-			);
-			path = BaseClass;
-			sourceTree = "<group>";
-		};
 		A81CA46C2D156C6800A3AAC8 /* GlobalImports */ = {
 			isa = PBXGroup;
 			children = (
@@ -835,27 +756,12 @@
 		A81CA4752D15778800A3AAC8 /* Ex */ = {
 			isa = PBXGroup;
 			children = (
-				A8F774502D3757D300AA6E93 /* SwiftUI */,
-				A8C4C01C2D2397B4003C46FC /* UIViewController+Ex.swift */,
-				A8477C982D2291F100DF0B93 /* UserDefault+Ex.swift */,
 				A81F5B4E2D19673500740085 /* AVAsset+Ex.swift */,
 				A81CA4B72D16A6B600A3AAC8 /* View+Ex.swift */,
-				A81CA4AF2D1694C200A3AAC8 /* Date+Ex.swift */,
-				A81CA4A52D16914C00A3AAC8 /* Dictionary+Ex.swift */,
-				A81F5B4C2D1965EF00740085 /* UIImage+Ex.swift */,
-				A81CA4A72D16918400A3AAC8 /* Array+Ex.swift */,
 				A81CA49E2D1655BE00A3AAC8 /* UICollectionView+Ex.swift */,
 				A81F5B3F2D194EA900740085 /* UIDevice+Extension.swift */,
-				A81CA49C2D1654A500A3AAC8 /* UITableView+Ex.swift */,
-				A81CA4802D157B0A00A3AAC8 /* UIFont+Ex.swift */,
-				A81CA4762D15779400A3AAC8 /* UIColor+Ex.swift */,
-				A81CA4782D1577E100A3AAC8 /* NSString+Ex.swift */,
-				60553FDE2D3B850C00BAAD7F /* TimeInterval+Ext.swift */,
-				A81CA47A2D15784400A3AAC8 /* Int+Ex.swift */,
 				A81CA4822D157F5200A3AAC8 /* UIImageView+Ex.swift */,
 				A81CA4842D15829E00A3AAC8 /* UIButton+Ex.swift */,
-				A81CA4862D15830E00A3AAC8 /* UILabel+Ex.swift */,
-				A81F5B532D1969D500740085 /* CGFloat+Ex.swift */,
 				A81F5B482D1956E600740085 /* UIScreen.swift */,
 				60553FDC2D3B84E700BAAD7F /* UIScrollView+Ext.swift */,
 			);
@@ -887,8 +793,6 @@
 				A8C4C0EE2D27BFEA003C46FC /* TSNetworkTool.swift */,
 				A84C239E2D1E88C500B61B55 /* TSFileManagerTool.swift */,
 				A81F5B4A2D19658300740085 /* PhotoTools.swift */,
-				A81CA4B52D169F1A00A3AAC8 /* WindowHelper.swift */,
-				A81CA4B32D169C2600A3AAC8 /* TSToastTool.swift */,
 				A81CA4892D15841600A3AAC8 /* TSCommonTool */,
 			);
 			path = Tool;
@@ -994,17 +898,6 @@
 			path = Font;
 			sourceTree = "<group>";
 		};
-		A81F5B312D18FA2E00740085 /* UICollectionView+Component */ = {
-			isa = PBXGroup;
-			children = (
-				A81F5B2A2D18F9C600740085 /* UICollectionView+More.swift */,
-				A81F5B2E2D18FA2E00740085 /* CollectionViewComponent.swift */,
-				A81F5B2F2D18FA2E00740085 /* Component.swift */,
-				A81F5B302D18FA2E00740085 /* CommonSectionComponent.swift */,
-			);
-			path = "UICollectionView+Component";
-			sourceTree = "<group>";
-		};
 		A81F5B3A2D19085F00740085 /* TSRandomWallpaperView */ = {
 			isa = PBXGroup;
 			children = (
@@ -1163,23 +1056,6 @@
 			path = TSNetWork;
 			sourceTree = "<group>";
 		};
-		A878331D2D293E9300E47F2C /* View */ = {
-			isa = PBXGroup;
-			children = (
-				A878331E2D293EB700E47F2C /* UITableView+TSItemModel */,
-				A81F5B312D18FA2E00740085 /* UICollectionView+Component */,
-			);
-			path = View;
-			sourceTree = "<group>";
-		};
-		A878331E2D293EB700E47F2C /* UITableView+TSItemModel */ = {
-			isa = PBXGroup;
-			children = (
-				A878331F2D293ED300E47F2C /* TSSimpleTableView.swift */,
-			);
-			path = "UITableView+TSItemModel";
-			sourceTree = "<group>";
-		};
 		A8C4C0A12D24218A003C46FC /* Util */ = {
 			isa = PBXGroup;
 			children = (
@@ -1256,15 +1132,6 @@
 			path = NetworkManager;
 			sourceTree = "<group>";
 		};
-		A8F774502D3757D300AA6E93 /* SwiftUI */ = {
-			isa = PBXGroup;
-			children = (
-				A8F774512D3757DF00AA6E93 /* Color+Ex.swift */,
-				A8F774532D37581700AA6E93 /* Font+Ex.swift */,
-			);
-			path = SwiftUI;
-			sourceTree = "<group>";
-		};
 		A8F778B52D1BE98D00BF55D5 /* TSLiveWallpaperBrowseVC */ = {
 			isa = PBXGroup;
 			children = (
@@ -1427,41 +1294,28 @@
 			isa = PBXSourcesBuildPhase;
 			buildActionMask = 2147483647;
 			files = (
-				A81CA49D2D1654B600A3AAC8 /* UITableView+Ex.swift in Sources */,
 				60553FDB2D3B7CC600BAAD7F /* FitManager.swift in Sources */,
-				A81CA4692D156AB600A3AAC8 /* TSBaseVC.swift in Sources */,
 				A81CA4992D1652C400A3AAC8 /* TSMineVC.swift in Sources */,
-				A8477C992D2291F800DF0B93 /* UserDefault+Ex.swift in Sources */,
 				A8C4C0EF2D27BFF7003C46FC /* TSNetworkTool.swift in Sources */,
 				A8F76C3C2D35026200AA6E93 /* TSPurchaseMembershipVC.swift in Sources */,
 				A81CA46E2D156C7000A3AAC8 /* GlobalImports.swift in Sources */,
-				A87833202D293EEC00E47F2C /* TSSimpleTableView.swift in Sources */,
 				606372E52D55BAB8005C82CF /* GuideBubbleView.swift in Sources */,
-				A8F774522D3757E700AA6E93 /* Color+Ex.swift in Sources */,
-				A81F5B4D2D1965F800740085 /* UIImage+Ex.swift in Sources */,
 				A81CA4832D157F5C00A3AAC8 /* UIImageView+Ex.swift in Sources */,
 				60F82C112D43298800FFB08D /* MusicContainerViewModel.swift in Sources */,
-				A81F5B322D18FA2E00740085 /* Component.swift in Sources */,
-				A81F5B332D18FA2E00740085 /* CommonSectionComponent.swift in Sources */,
 				A81F5B492D1956EA00740085 /* UIScreen.swift in Sources */,
 				A8C4C0E62D268D02003C46FC /* LivePhotoCreater.swift in Sources */,
 				A8C4C0E72D268D02003C46FC /* VideoRecorder.swift in Sources */,
-				A81F5B342D18FA2E00740085 /* CollectionViewComponent.swift in Sources */,
 				A8F76C4D2D3747B400AA6E93 /* TSPurchaseVC.swift in Sources */,
-				A81CA4722D1575B900A3AAC8 /* TSBaseNavigationBarView.swift in Sources */,
 				A81F5B5B2D1A5F2300740085 /* TSHomeTopBannerCell.swift in Sources */,
 				A83946312D1D66A000ABFF0D /* TSTermsServiceVC.swift in Sources */,
 				A8C4C0982D242154003C46FC /* LivePhoto.swift in Sources */,
 				A81F5B472D19562800740085 /* EditorVideoControlMaskView.swift in Sources */,
-				A81F5B392D19037800740085 /* TSBaseModel.swift in Sources */,
-				A81CA4A62D16915F00A3AAC8 /* Dictionary+Ex.swift in Sources */,
 				606372DA2D545F0D005C82CF /* ExampleIniter.swift in Sources */,
 				A81CA4AA2D16943800A3AAC8 /* TSMineCell.swift in Sources */,
 				A83946212D1D61D600ABFF0D /* TSRateUsVC.swift in Sources */,
 				A81F5B4F2D19674600740085 /* AVAsset+Ex.swift in Sources */,
 				A8E56BF62D1520EC003C54AF /* AppDelegate.swift in Sources */,
 				A8F778B42D1BB8F600BF55D5 /* PhotoManager.swift in Sources */,
-				A81CA4872D15832900A3AAC8 /* UILabel+Ex.swift in Sources */,
 				60553FD02D3B54A400BAAD7F /* LWNavigationBar.swift in Sources */,
 				60553FD22D3B54A400BAAD7F /* GradientButton.swift in Sources */,
 				60553FD42D3B54A400BAAD7F /* LWBaseViewController.swift in Sources */,
@@ -1471,18 +1325,14 @@
 				60553FD92D3B54A400BAAD7F /* GradientBackgroundModifier.swift in Sources */,
 				606372DD2D54999C005C82CF /* ADScene.swift in Sources */,
 				A81F5B5D2D1A906C00740085 /* TSHomeDataModel.swift in Sources */,
-				A8F778B02D1AC17500BF55D5 /* TSBaseView.swift in Sources */,
 				A81CA49B2D1652CA00A3AAC8 /* TSHomeVC.swift in Sources */,
 				A81CA4B82D16A6BD00A3AAC8 /* View+Ex.swift in Sources */,
 				A8F76C422D350A9600AA6E93 /* TSPurchaseManager.swift in Sources */,
 				60553FDD2D3B84E700BAAD7F /* UIScrollView+Ext.swift in Sources */,
-				A81CA4792D1577E800A3AAC8 /* NSString+Ex.swift in Sources */,
 				A81CA4852D1582A600A3AAC8 /* UIButton+Ex.swift in Sources */,
 				606372E72D5705F4005C82CF /* MusicPlaylistContainerViewController.swift in Sources */,
-				A81CA46B2D156BDC00A3AAC8 /* TSBaseNavigationC.swift in Sources */,
 				A81CA47F2D15789C00A3AAC8 /* TSConfig.swift in Sources */,
 				A81CA49F2D1655CE00A3AAC8 /* UICollectionView+Ex.swift in Sources */,
-				A81F5B2B2D18F9C600740085 /* UICollectionView+More.swift in Sources */,
 				A81CA4BA2D16B6E300A3AAC8 /* TSHomeCell.swift in Sources */,
 				A8F778B22D1BA07200BF55D5 /* TSRandomWallpaperBrowseSelectView.swift in Sources */,
 				A8477C9F2D22ABDA00DF0B93 /* TSEditLiveEidtCell.swift in Sources */,
@@ -1491,10 +1341,7 @@
 				A8F778AE2D1AC12400BF55D5 /* TSRandomWallpaperBrowseView.swift in Sources */,
 				A81F5B4B2D19658300740085 /* PhotoTools.swift in Sources */,
 				A83946272D1D623800ABFF0D /* TSShareUsVC.swift in Sources */,
-				A8C4C01D2D2397B9003C46FC /* UIViewController+Ex.swift in Sources */,
-				A81F5B542D1969E000740085 /* CGFloat+Ex.swift in Sources */,
 				A81CA48B2D15843700A3AAC8 /* TSCommonTool.swift in Sources */,
-				A81CA4AD2D16944B00A3AAC8 /* TSBaseTabViewCell.swift in Sources */,
 				A84C239A2D1E3A4300B61B55 /* GPVideoPlayerView.swift in Sources */,
 				60553F722D3B528A00BAAD7F /* PlayDetailListViewContoller.swift in Sources */,
 				60553F732D3B528A00BAAD7F /* SearchResultViewModel.swift in Sources */,
@@ -1582,7 +1429,6 @@
 				60553FBC2D3B528A00BAAD7F /* SearchOnlineViewController.swift in Sources */,
 				60553FBD2D3B528A00BAAD7F /* SpacedButton.swift in Sources */,
 				60553FBE2D3B528A00BAAD7F /* BasePresentViewController.swift in Sources */,
-				60553FDF2D3B850C00BAAD7F /* TimeInterval+Ext.swift in Sources */,
 				60553FBF2D3B528A00BAAD7F /* PlayListCell.swift in Sources */,
 				60553FC12D3B528A00BAAD7F /* MusicSearchBar.swift in Sources */,
 				60553FC22D3B528A00BAAD7F /* PlayerManager.swift in Sources */,
@@ -1592,35 +1438,25 @@
 				A84C239C2D1E3A4300B61B55 /* GPVideoClipperView.swift in Sources */,
 				A84C239D2D1E3A4300B61B55 /* GPVideoConfigMaker.swift in Sources */,
 				A839463C2D1D6E3600ABFF0D /* TSRandomWallpaperCopyrightVC.swift in Sources */,
-				A81CA4AE2D16944B00A3AAC8 /* TSBaseCollectionCell.swift in Sources */,
-				A81CA4772D15779E00A3AAC8 /* UIColor+Ex.swift in Sources */,
 				A81CA4952D1652B500A3AAC8 /* TSEditLiveVC.swift in Sources */,
 				606372E12D54BC37005C82CF /* GoogleMobileAdsConsentManager.swift in Sources */,
 				A83946332D1D66A900ABFF0D /* TSPrivacyPolicyVC.swift in Sources */,
-				A81CA47B2D15784800A3AAC8 /* Int+Ex.swift in Sources */,
 				A839463A2D1D6E3000ABFF0D /* TSRandomWallpaperTutorialsVC.swift in Sources */,
 				A84C239F2D1E88CD00B61B55 /* TSFileManagerTool.swift in Sources */,
 				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 */,
 				A81F5B622D1AB17E00740085 /* TSRandomWallpaperBrowseVC.swift in Sources */,
 				A839463F2D1D6FB700ABFF0D /* TSLiveWallpaperTutorialsVC.swift in Sources */,
-				A81CA4A12D166F3C00A3AAC8 /* TSBasicItemModel.swift in Sources */,
-				A81CA4B42D169C2E00A3AAC8 /* TSToastTool.swift in Sources */,
 				A81F5B5F2D1A909300740085 /* TSRandomWallpaperModel.swift in Sources */,
 				A8F778B72D1BE9A500BF55D5 /* TSLiveWallpaperBrowseVC.swift in Sources */,
 				A81CA48F2D15857B00A3AAC8 /* TSTabBarController.swift in Sources */,
-				A81CA4B02D1694C900A3AAC8 /* Date+Ex.swift in Sources */,
 				A8C4C0A52D24218A003C46FC /* Converter4Video.swift in Sources */,
 				A8C4C0A62D24218A003C46FC /* AVAssetExtension.swift in Sources */,
 				A8C4C0A72D24218A003C46FC /* LivePhotoUtil.m in Sources */,
 				A8C4C0A82D24218A003C46FC /* Converter4Image.swift in Sources */,
 				A83946432D1D701500ABFF0D /* TSLiveWallpaperCopyrightVC.swift in Sources */,
-				A8F774542D37581F00AA6E93 /* Font+Ex.swift in Sources */,
 				A8C4C0AB2D2427E7003C46FC /* LivePhotoConverter.swift in Sources */,
 				A81F5B3C2D19087100740085 /* TSRandomWallpaperCell.swift in Sources */,
 				A81F5B442D19559C00740085 /* EditorVideoControlViewCell.swift in Sources */,

+ 7 - 8
TSLiveWallpaper/Business/TSEditLiveVC/TSEditLiveEidtCell.swift

@@ -6,7 +6,7 @@
 //
 
 
-class TSEditLiveSectionModel: CollectionViewSectionComponent{
+class TSEditLiveSectionModel: TSCollectionViewSectionComponent{
     var style:ImageDataStyple = .homeLiveBanner
     var items:[TSEditLiveItemModel] = [TSEditLiveItemModel]()
 
@@ -21,16 +21,16 @@ class TSEditLiveSectionModel: CollectionViewSectionComponent{
     var itemSpacing: CGFloat {
         return 0
     }
-    var headerComponent: CollectionViewReuseViewComponent? {
+    var headerComponent: TSCollectionViewReuseViewComponent? {
         return nil
     }
     
-    var cells: [CollectionViewCellComponent] {
+    var cells: [TSCollectionViewCellComponent] {
         return items
     }
 
 }
-class TSEditLiveItemModel: CollectionViewCellComponent {
+class TSEditLiveItemModel: TSCollectionViewCellComponent {
     var style:ImageDataStyple = .homeLiveBanner
     
     var imageUrl:String = ""
@@ -46,9 +46,9 @@ class TSEditLiveItemModel: CollectionViewCellComponent {
 }
 
 
-class TSEditLiveEidtCell : TSBaseCollectionCell , ComponentView{
+class TSEditLiveEidtCell : TSBaseCollectionCell{
     
-    var component:CollectionViewComponent?
+    var component:TSCollectionViewComponent?
     lazy var diyBtn: UIButton = {
         let diyBtn: UIButton = TSViewTool.createNormalSubmitBtn(title: getVipText(), imageNamed: "edit_black") { [weak self]  in
             guard let self = self else { return }
@@ -106,8 +106,7 @@ class TSEditLiveEidtCell : TSBaseCollectionCell , ComponentView{
         
         return bgView
     }
-    
-    func renderView(with object: Any?, component: CollectionViewComponent, attributes: [String : Any]?) {
+    override func renderView(with object: Any?, component: TSCollectionViewComponent, attributes: [String: Any]?){
         self.component = component
         diyBtn.setTitle(getVipText(), for: .normal)
     }

+ 5 - 5
TSLiveWallpaper/Business/TSEditLiveVC/TSEditLiveVC.swift

@@ -18,7 +18,7 @@ class TSEditLiveVC: TSBaseVC, UINavigationControllerDelegate {
         kImageDataCenterShared.editLiveHistoryListArray.first!
     }()
 
-    var dataArray: [Component] = [Component]()
+    var dataArray: [TSComponent] = [TSComponent]()
 
     lazy var navBarView: LWSubNavigationBar = {
         let navBarView = LWSubNavigationBar()
@@ -28,9 +28,9 @@ class TSEditLiveVC: TSBaseVC, UINavigationControllerDelegate {
         return navBarView
     }()
 
-    lazy var collectionComponent: CollectionViewComponent = {
+    lazy var collectionComponent: TSCollectionViewComponent = {
         let layout = UICollectionViewFlowLayout()
-        let cp = CollectionViewComponent(frame: CGRect.zero, layout: layout, attributes: [:])
+        let cp = TSCollectionViewComponent(frame: CGRect.zero, layout: layout, attributes: [:])
         cp.collectionView.contentInset = UIEdgeInsets(top: 0, left: 0, bottom: k_Height_TabBar, right: 0)
 
         cp.itemActionHandler = { [weak self] _, _ in
@@ -108,7 +108,7 @@ class TSEditLiveVC: TSBaseVC, UINavigationControllerDelegate {
 import UniformTypeIdentifiers
 extension TSEditLiveVC: UIImagePickerControllerDelegate {
     func openVideoPicker() {
-        TSToastShared.showLoading()
+        TSToastShared.showLoading(containerView: self.view)
         let picker = UIImagePickerController()
         picker.sourceType = .photoLibrary
         picker.mediaTypes = [UTType.movie.identifier] // 仅允许选择视频
@@ -179,7 +179,7 @@ extension TSEditLiveVC {
     }
 
     func saveLive(videoPath: URL) {
-        TSToastShared.showLoading()
+        TSToastShared.showLoading(containerView: self.view)
         LivePhotoConverter.convertVideo(videoPath) { success, imageURL, videoURL, _ in
             if success {
                 debugPrint("Live Photo Saved,The live photo was successfully saved to Photos.")

+ 1 - 1
TSLiveWallpaper/Business/TSEditLiveVC/TSEditVideoVC/EditorVideo/EditorVideoControlMaskView.swift

@@ -61,7 +61,7 @@ class EditorVideoControlMaskView: UIView {
     
     var arrowNormalColor: UIColor = .white
     var arrowHighlightedColor: UIColor = .black
-    var frameHighlightedColor: UIColor = "#FDCC00".color
+    var frameHighlightedColor: UIColor = "#FDCC00".uiColor
     
     init() {
         super.init(frame: .zero)

+ 1 - 1
TSLiveWallpaper/Business/TSEditLiveVC/TSEditVideoVC/EditorVideo/EditorVideoControlView.swift

@@ -79,7 +79,7 @@ struct Video {
         
         /// The color of the highlighted border
         /// 边框高亮状态下的颜色
-        public var frameHighlightedColor: UIColor = "#FDCC00".color
+        public var frameHighlightedColor: UIColor = "#FDCC00".uiColor
         
         public init() { }
     }

+ 5 - 4
TSLiveWallpaper/Business/TSHomeVC/TSHomeCell.swift

@@ -5,13 +5,14 @@
 //  Created by 100Years on 2024/12/21.
 //
 
-class TSHomeCollectionCell : TSBaseCollectionCell ,ComponentView{
+class TSHomeCollectionCell : TSBaseCollectionCell{
     
     static let reuseIdentifier = "TSHomeCollectionCell"
     
     lazy var imageView: UIImageView = {
         let imageView = UIImageView()
         imageView.image = kWapppaperPlaceholderImage
+        imageView.contentMode = .scaleAspectFill
         return imageView
     }()
     
@@ -37,7 +38,7 @@ class TSHomeCollectionCell : TSBaseCollectionCell ,ComponentView{
         }
     }
 
-    func renderView(with object: Any?, component: CollectionViewComponent, attributes: [String : Any]?) {
+    override func renderView(with object: Any?, component: TSCollectionViewComponent, attributes: [String : Any]?) {
         if let itemModel = object as? TSImageDataItemModel{
             imageView.setAsyncImage(urlString: itemModel.imageUrl,placeholder: kWapppaperPlaceholderImage,showLoading: true)
         }
@@ -47,7 +48,7 @@ class TSHomeCollectionCell : TSBaseCollectionCell ,ComponentView{
 
 
 //MARK: TSHomeCollectionReusableView
-class TSHomeCollectionReusableView: TSBaseCollectionnReusableView,ComponentView{
+class TSHomeCollectionReusableView: TSBaseCollectionnReusableView{
     
     static let reuseIdentifier = "TSHomeCollectionReusableView"
     
@@ -62,7 +63,7 @@ class TSHomeCollectionReusableView: TSBaseCollectionnReusableView,ComponentView{
         }
     }
     
-    func renderView(with object: Any?, component: CollectionViewComponent, attributes: [String : Any]?) {
+    override func renderView(with object: Any?, component: TSCollectionViewComponent, attributes: [String : Any]?) {
         if let componentReuseViewModel = object as? TSComponentReuseViewModel {
             leftLab.text = componentReuseViewModel.sectionModel.name
         }

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

@@ -54,9 +54,9 @@ class TSHomeVC: TSBaseVC {
         return btn
     }()
 
-    lazy var collectionComponent: CollectionViewComponent = {
+    lazy var collectionComponent: TSCollectionViewComponent = {
         let layout = UICollectionViewFlowLayout()
-        let cp = CollectionViewComponent(frame: CGRect.zero, layout: layout, attributes: [:])
+        let cp = TSCollectionViewComponent(frame: CGRect.zero, layout: layout, attributes: [:])
         cp.collectionView.contentInset = UIEdgeInsets(top: 0, left: 0, bottom: k_Height_TabBar, right: 0)
         cp.itemDidSelectedHandler = { [weak self] _, indexPath in
             guard let self = self else { return }
@@ -74,7 +74,7 @@ class TSHomeVC: TSBaseVC {
         return cp
     }()
 
-    var dataArray: [Component] = kImageDataCenterShared.liveBannerArray + kImageDataCenterShared.liveListArray
+    var dataArray: [TSComponent] = kImageDataCenterShared.liveBannerArray + kImageDataCenterShared.liveListArray
     override func createView() {
         setViewBgImageNamed(named: "view_main_bg")
 

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

@@ -428,7 +428,7 @@ extension TSLiveWallpaperBrowseVC:UICollectionViewDataSource,UICollectionViewDel
 class TSLiveWallpaperBrowseCell : TSBaseCollectionCell,PHLivePhotoViewDelegate{
     
     private let showImageViewW = k_ScreenWidth - 32
-    private let livePhotoTool = LivePhoto()
+     private lazy var livePhotoTool = LivePhoto()
     private var isCanPlay = true
     lazy var livePhotoView: PHLivePhotoView = {
         let liveIv = PHLivePhotoView()

+ 6 - 6
TSLiveWallpaper/Business/TSHomeVC/View/TSHomeTopBannerCell.swift

@@ -9,11 +9,10 @@
 import TYCyclePagerView
 
 //MARK: TSHomeTopBannerCell
-class TSHomeTopBannerCell : TSBaseCollectionCell , TYCyclePagerViewDelegate, TYCyclePagerViewDataSource,ComponentView {
+private let topBarnerItemW = 225.0
+private let topBarnerItemH = 486.41
 
-    let topBarnerItemW = 225.0
-    let topBarnerItemH = 486.41
-    
+class TSHomeTopBannerCell : TSBaseCollectionCell , TYCyclePagerViewDelegate, TYCyclePagerViewDataSource {
     var itemDidSelectedHandler: ((Any?, IndexPath) -> Void)?
     
     lazy var cyclePagerView: TYCyclePagerView = {
@@ -39,12 +38,13 @@ class TSHomeTopBannerCell : TSBaseCollectionCell , TYCyclePagerViewDelegate, TYC
         return topBarnerView
     }()
     
-    var itemModelArray:[TSImageDataItemModel] = [TSImageDataItemModel]()
+    lazy var itemModelArray:[TSImageDataItemModel] = []
     
     override func creatUI() {
         bgContentView.addSubview(topBarnerView)
         topBarnerView.snp.makeConstraints { make in
             make.edges.equalToSuperview()
+            make.height.equalToSuperview()
         }
         
         let previewImageView = UIImageView.createImageView(imageName: "iPhone_lock_screen_preview")
@@ -80,7 +80,7 @@ class TSHomeTopBannerCell : TSBaseCollectionCell , TYCyclePagerViewDelegate, TYC
         return layout
     }
 
-    func renderView(with object: Any?, component: CollectionViewComponent, attributes: [String : Any]?) {
+    override func renderView(with object: Any?, component: TSCollectionViewComponent, attributes: [String : Any]?) {
         if let model = object as? TSHomeBannerDataItemModel {
             if itemModelArray.isEmpty {
                 itemModelArray = model.items

+ 4 - 4
TSLiveWallpaper/Business/TSMineVC/TSMineVC.swift

@@ -4,7 +4,7 @@
 //
 //  Created by 100Years on 2024/12/20.
 //
-
+let appid = "6740220736"
 class TSMineVC: TSBaseVC {
     lazy var navBarView: TSBaseNavContentBarView = {
         let navBarView = TSBaseNavContentBarView()
@@ -98,7 +98,7 @@ class TSMineVC: TSBaseVC {
                 height: 80,
                 rectCorner: .allCorners,
                 tapBlock: { [weak self] _, _, _ in
-                    let httpAppStoreLink = "https://apps.apple.com/app/id\(TSConfig.appid)"
+                    let httpAppStoreLink = "https://apps.apple.com/app/id\(appid)"
                     guard let appStoreURL = URL(string: httpAppStoreLink) else { return }
 
                     if UIApplication.shared.canOpenURL(appStoreURL) {
@@ -117,7 +117,7 @@ class TSMineVC: TSBaseVC {
                 tapBlock: { [weak self] _, _, _ in
 
                     guard let self = self else { return }
-                    let appStoreLink = "itms-apps://itunes.apple.com/app/id\(TSConfig.appid)"
+                    let appStoreLink = "itms-apps://itunes.apple.com/app/id\(appid)"
                     if let url = URL(string: appStoreLink + "?action=write-review"),
                        UIApplication.shared.canOpenURL(url) {
                         UIApplication.shared.open(url)
@@ -135,7 +135,7 @@ class TSMineVC: TSBaseVC {
                 tapBlock: { [weak self] _, _, _ in
                     guard let self = self else { return }
 
-                    let httpAppStoreLink = "https://apps.apple.com/app/id\(TSConfig.appid)"
+                    let httpAppStoreLink = "https://apps.apple.com/app/id\(appid)"
                     let text = ""
                     let url = URL(string: httpAppStoreLink)!
                     let image = UIImage(named: "App-Icon")!

+ 1 - 1
TSLiveWallpaper/Business/TSMusic/Custom/ManageMenuAlertView.swift

@@ -41,7 +41,7 @@ class ManageMenuAlertView: UIControl {
     }
 
     func addChildren() {
-        bgView.customCornerRadius = 20
+        bgView.cornerRadius = 20
         addSubview(bgView)
         bgView.addSubview(vStack)
         vStack.addArrangedSubview(sortButton)

+ 1 - 1
TSLiveWallpaper/Business/TSMusic/Custom/MusicEmptyView.swift

@@ -25,7 +25,7 @@ class MusicEmptyView: UIView {
         btn.setTitle("Go to Add".localized(), for: .normal)
         btn.setTitleColor(.black, for: .normal)
         btn.titleLabel?.font = .systemFont(ofSize: 16)
-        btn.customCornerRadius = 25
+        btn.cornerRadius = 25
         return btn
     }()
 

+ 1 - 1
TSLiveWallpaper/Business/TSMusic/Custom/PlayMiniBar.swift

@@ -98,7 +98,7 @@ class PlayMiniBar: UIView {
     }
 
     func addChildren() {
-        iconView.customCornerRadius = 19
+        iconView.cornerRadius = 19
         iconView.contentMode = .scaleAspectFill
 
         playButton.addTarget(self, action: #selector(playButtonAction), for: .touchUpInside)

+ 1 - 1
TSLiveWallpaper/Business/TSMusic/Custom/TipsView.swift

@@ -44,7 +44,7 @@ class TipsView: UIView, THUDViewProtocol {
     
     override init(frame: CGRect) {
         super.init(frame: frame)
-        customCornerRadius = 12
+        cornerRadius = 12
         
         messageLabel.numberOfLines = 0
         messageLabel.font = UIFont.systemFont(ofSize: 14)

+ 2 - 2
TSLiveWallpaper/Business/TSMusic/Custom/ToastView.swift

@@ -66,7 +66,7 @@ class ToastView: UIView, THUDViewProtocol {
         bt.setTitleColor(.white, for: .normal)
         bt.titleLabel?.font = UIFont.systemFont(ofSize: 14)
         bt.backgroundColor = UIColor.white.withAlphaComponent(0.1)
-        bt.customCornerRadius = 18
+        bt.cornerRadius = 18
         bt.addTarget(self, action: #selector(buttonClick(_:)), for: .touchUpInside)
         return bt
     }()
@@ -83,7 +83,7 @@ class ToastView: UIView, THUDViewProtocol {
         super.init(frame: .zero)
         self.model = model
         
-        customCornerRadius = 16
+        cornerRadius = 16
         backgroundColor = model.backgroundColor ?? .hexColor("#262626")
         
         let stackView = UIStackView(arrangedSubviews:

+ 1 - 1
TSLiveWallpaper/Business/TSMusic/Detail/Controller/PlayDetailViewController.swift

@@ -34,7 +34,7 @@ class PlayDetailViewController: LWBGViewController {
         btn.setTitle("Reload", for: .normal)
         btn.setTitleColor(.white, for: .normal)
         btn.titleLabel?.font = .systemFont(ofSize: 14)
-        btn.customCornerRadius = 20
+        btn.cornerRadius = 20
         btn.isHidden = true
         return btn
     }()

+ 1 - 1
TSLiveWallpaper/Business/TSMusic/Detail/View/PlayDetailTopView.swift

@@ -25,7 +25,7 @@ class PlayDetailTopView: UIView {
         let button = UIButton()
         button.frame = CGRect(x: 0, y: 0, width: 100, height: 32)
         button.backgroundColor = .white.withAlphaComponent(0.2)
-        button.customCornerRadius = 16
+        button.cornerRadius = 16
         button.setTitle("00:00:00", for: .normal)
         button.setTitleColor(.white.withAlphaComponent(0.5), for: .normal)
         button.setTitleColor(.white, for: .selected)

+ 1 - 1
TSLiveWallpaper/Business/TSMusic/Helper/CWOperateButton.swift

@@ -28,7 +28,7 @@ class CWOperateButton : UIControl {
     }
     
     func addChildren(){
-        bgView.customCornerRadius = 16
+        bgView.cornerRadius = 16
         addSubview(bgView)
         bgView.addSubview(iconView)
         addSubview(titleLabel)

+ 1 - 1
TSLiveWallpaper/Business/TSMusic/Helper/CWOperateViewController+Ext.swift

@@ -64,7 +64,7 @@ extension CWOperateViewController {
 
     @objc func shareApp() {
         dismiss(animated: true) {
-            let httpAppStoreLink = "https://apps.apple.com/app/id\(TSConfig.appid)"
+            let httpAppStoreLink = "https://apps.apple.com/app/id\(appid)"
             let text = ""
             let url = URL(string: httpAppStoreLink)!
             let image = UIImage(named: "App-Icon")!

+ 1 - 1
TSLiveWallpaper/Business/TSMusic/Helper/OperateTopView.swift

@@ -33,7 +33,7 @@ class OperateTopView: UIView {
 
     lazy var iconView: UIImageView = {
         let img: UIImageView = .init(image: UIImage(named: ""))
-        img.customCornerRadius = 8
+        img.cornerRadius = 8
         img.contentMode = .scaleAspectFill
         return img
     }()

+ 1 - 1
TSLiveWallpaper/Business/TSMusic/List/Controller/SongListViewController.swift

@@ -29,7 +29,7 @@ class SongListViewController: LWBGViewController {
         let bt = UIButton(frame: CGRect(x: 0, y: 0, width: 42, height: 42))
         bt.backgroundColor = UIColor.white.withAlphaComponent(0.1)
         bt.setImage(.icPlaylistMore, for: .normal)
-        bt.customCornerRadius = 20
+        bt.cornerRadius = 20
         bt.backgroundColor = .white
         bt.addTarget(self, action: #selector(showMenuAlert), for: .touchUpInside)
         return bt

+ 1 - 1
TSLiveWallpaper/Business/TSMusic/List/View/SongDownloadCell.swift

@@ -17,7 +17,7 @@ class SongDownloadCell: UITableViewCell {
 
     lazy var iconView: UIImageView = {
         let img: UIImageView = .init()
-        img.customCornerRadius = 12
+        img.cornerRadius = 12
         img.contentMode = .scaleAspectFill
         return img
     }()

+ 1 - 1
TSLiveWallpaper/Business/TSMusic/List/View/SongListCell.swift

@@ -35,7 +35,7 @@ class SongListCell: UITableViewCell {
 
     lazy var iconView: UIImageView = {
         let img: UIImageView = .init(image: UIImage(named: ""))
-        img.customCornerRadius = 8
+        img.cornerRadius = 8
         img.contentMode = .scaleAspectFill
         return img
     }()

+ 1 - 1
TSLiveWallpaper/Business/TSMusic/List/View/SongListTopView.swift

@@ -28,7 +28,7 @@ class SongListTopView: UIView {
 
     func createButton(title: String, image: UIImage?, space: CGFloat = 8) -> UIButton {
         let btn = UIButton()
-        btn.customCornerRadius = 22
+        btn.cornerRadius = 22
         btn.setTitle(title, for: .normal)
         btn.setTitleColor(.black, for: .normal)
         btn.setImage(image, for: .normal)

+ 1 - 1
TSLiveWallpaper/Business/TSMusic/PlayList/Controller/PlayDetailListViewContoller.swift

@@ -19,7 +19,7 @@ class PlayDetailListViewContoller: UIViewController, UITableViewDelegate {
 
     lazy var lineView: UIView = {
         let line: UIView = .simpleView(color: .white.withAlphaComponent(0.2))
-        line.customCornerRadius = 2
+        line.cornerRadius = 2
         return line
     }()
 

+ 2 - 2
TSLiveWallpaper/Business/TSMusic/PlayList/Controller/PlaylistDetailViewController.swift

@@ -30,7 +30,7 @@ class PlaylistDetailViewController: LWBGViewController, UITableViewDelegate {
         let bt = UIButton(frame: CGRect(x: 0, y: 0, width: 42, height: 42))
         bt.backgroundColor = UIColor.white.withAlphaComponent(0.1)
         bt.setImage(.icNavSort, for: .normal)
-        bt.customCornerRadius = 16
+        bt.cornerRadius = 16
         bt.backgroundColor = .white
         bt.addTarget(self, action: #selector(showSortOperateView), for: .touchUpInside)
 
@@ -41,7 +41,7 @@ class PlaylistDetailViewController: LWBGViewController, UITableViewDelegate {
         let bt = UIButton(frame: CGRect(x: 0, y: 0, width: 42, height: 42))
         bt.backgroundColor = UIColor.white.withAlphaComponent(0.1)
         bt.setImage(.icNavManage, for: .normal)
-        bt.customCornerRadius = 16
+        bt.cornerRadius = 16
         bt.backgroundColor = .white
         bt.addTarget(self, action: #selector(showManageViewController), for: .touchUpInside)
         return bt

+ 1 - 1
TSLiveWallpaper/Business/TSMusic/PlayList/Views/PlayDetailListViewCell.swift

@@ -16,7 +16,7 @@ class PlayDetailListViewCell: UITableViewCell {
 
     lazy var iconView: UIImageView = {
         let img: UIImageView = .init(image: UIImage(named: ""))
-        img.customCornerRadius = 12
+        img.cornerRadius = 12
         img.contentMode = .scaleAspectFill
         return img
     }()

+ 1 - 1
TSLiveWallpaper/Business/TSMusic/PlayList/Views/PlayListCell.swift

@@ -17,7 +17,7 @@ class PlayListCell: UITableViewCell {
 
     lazy var iconView: UIImageView = {
         let img: UIImageView = .init(image: .icDefault)
-        img.customCornerRadius = 8
+        img.cornerRadius = 8
         img.contentMode = .scaleAspectFill
         return img
     }()

+ 2 - 2
TSLiveWallpaper/Business/TSMusic/PlayList/Views/PlayListManageView.swift

@@ -20,7 +20,7 @@ class PlayListManageView: UIView {
         let bt = UIButton(frame: CGRect(x: 0, y: 0, width: 42, height: 42))
         bt.backgroundColor = UIColor.white.withAlphaComponent(0.1)
         bt.setImage(.icNavSort, for: .normal)
-        bt.customCornerRadius = 20
+        bt.cornerRadius = 20
         bt.backgroundColor = .white
         return bt
     }()
@@ -29,7 +29,7 @@ class PlayListManageView: UIView {
         let bt = UIButton(frame: CGRect(x: 0, y: 0, width: 42, height: 42))
         bt.backgroundColor = UIColor.white.withAlphaComponent(0.1)
         bt.setImage(.icNavManage, for: .normal)
-        bt.customCornerRadius = 20
+        bt.cornerRadius = 20
         bt.backgroundColor = .white
         return bt
     }()

+ 1 - 1
TSLiveWallpaper/Business/TSMusic/Search/Controller/SearchOnlineViewController.swift

@@ -22,7 +22,7 @@ class SearchOnlineViewController: LWBGViewController {
         bar.textFiled.attributedPlaceholder = NSAttributedString(string: "Search Music".localized(), attributes: [
             .foregroundColor: UIColor.hexColor("#FFFFFF").withAlphaComponent(0.4),
             .font: UIFont.systemFont(ofSize: 14)])
-        bar.customCornerRadius = 8
+        bar.cornerRadius = 8
         return bar
     }()
 

+ 1 - 1
TSLiveWallpaper/Business/TSMusic/SearchResult/SearchResultStateView.swift

@@ -65,7 +65,7 @@ class SearchResultStateView: UIView {
         btn.setTitle("Reload".localized(), for: .normal)
         btn.setTitleColor(.white, for: .normal)
         btn.titleLabel?.font = .systemFont(ofSize: 14)
-        btn.customCornerRadius = 20
+        btn.cornerRadius = 20
         btn.backgroundColor = .hexColor("#6EF4F4")
         return btn
     }()

+ 1 - 1
TSLiveWallpaper/Business/TSMusic/SearchResult/SearchResultViewController.swift

@@ -57,7 +57,7 @@ class SearchResultViewController: LWBGViewController {
     lazy var searchBar: CWSearchTextBar = {
         let bar = CWSearchTextBar()
         bar.textFiled.delegate = self
-        bar.customCornerRadius = 8
+        bar.cornerRadius = 8
         return bar
     }()
 

+ 4 - 4
TSLiveWallpaper/Business/TSPurchaseMembershipVC/TSPurchaseMembershipVC.swift

@@ -136,7 +136,7 @@ class TSPurchaseMembership111VC: TSBaseVC {
                 case .none:
                     break
                 case .loading:
-                    TSToastShared.showLoading(text: "Getting price".localized)
+                    TSToastShared.showLoading(text: "Getting price".localized,containerView: self.view)
                 case .loadSuccess:
                     TSToastShared.hideLoading()
                 case .loadFail:
@@ -147,7 +147,7 @@ class TSPurchaseMembership111VC: TSBaseVC {
                         PurchaseManager.default.requestProducts()
                     }
                 case .paying:
-                    TSToastShared.showLoading(text: "Purchasing now".localized)
+                    TSToastShared.showLoading(text: "Purchasing now".localized,containerView: self.view)
                 case .paySuccess:
                     TSToastShared.hideLoading()
                     let loadingText = manager.isVip ? "Congratulation you have become VIP".localized : "Finish".localized
@@ -165,7 +165,7 @@ class TSPurchaseMembership111VC: TSBaseVC {
                     }
                     
                 case .restoreing:
-                    TSToastShared.showLoading(text: "Restoring now".localized)
+                    TSToastShared.showLoading(text: "Restoring now".localized,containerView: self.view)
                 case .restoreSuccess:
                     TSToastShared.hideLoading()
                     let loadingText = manager.isVip ? "Congratulation you have become VIP".localized : "Couldn't Restore Subscription".localized
@@ -184,7 +184,7 @@ class TSPurchaseMembership111VC: TSBaseVC {
                     TSToastShared.showToast(text: loadingText)
                 case .verifying:
                     #if DEBUG
-                    TSToastShared.showLoading(text: "Verifying receipt...".localized)
+                    TSToastShared.showLoading(text: "Verifying receipt...".localized,containerView: self.view)
                     #endif
                 case .verifySuccess:
                     break

+ 4 - 4
TSLiveWallpaper/Business/TSPurchaseMembershipVC/TSPurchaseVC.swift

@@ -105,7 +105,7 @@ class TSPurchaseVC: TSBaseVC {
                 case .none:
                     break
                 case .loading:
-                    TSToastShared.showLoading(text: "Getting price".localized)
+                    TSToastShared.showLoading(text: "Getting price".localized,containerView: self.view)
                 case .loadSuccess:
                     TSToastShared.hideLoading()
                 case .loadFail:
@@ -116,7 +116,7 @@ class TSPurchaseVC: TSBaseVC {
                         PurchaseManager.default.requestProducts()
                     }
                 case .paying:
-                    TSToastShared.showLoading(text: "Purchasing now".localized)
+                    TSToastShared.showLoading(text: "Purchasing now".localized,containerView: self.view)
                 case .paySuccess:
                     TSToastShared.hideLoading()
                     let loadingText = manager.isVip ? "Congratulation you have become VIP".localized : "Finish".localized
@@ -134,7 +134,7 @@ class TSPurchaseVC: TSBaseVC {
                     }
                     
                 case .restoreing:
-                    TSToastShared.showLoading(text: "Restoring now".localized)
+                    TSToastShared.showLoading(text: "Restoring now".localized,containerView: self.view)
                 case .restoreSuccess:
                     TSToastShared.hideLoading()
                     let loadingText = manager.isVip ? "Congratulation you have become VIP".localized : "Couldn't Restore Subscription".localized
@@ -153,7 +153,7 @@ class TSPurchaseVC: TSBaseVC {
                     TSToastShared.showToast(text: loadingText)
                 case .verifying:
                     #if DEBUG
-                    TSToastShared.showLoading(text: "Verifying receipt...".localized)
+                    TSToastShared.showLoading(text: "Verifying receipt...".localized,containerView: self.view)
                     #endif
                 case .verifySuccess:
                     break

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

@@ -9,7 +9,7 @@ class TSViewTool: UIView {
     
     static func createNormalSubmitBtn(title:String, imageNamed:String? = nil, action: (() -> Void)? = nil) -> UIButton {
         let image = UIImage(named:imageNamed ?? "")
-        let btn = UIButton.createButton(title:title,image: image,font: UIFont.font(size: 18,weight: .medium),titleColor:"#010101".color,action: action)
+        let btn = UIButton.createButton(title:title,image: image,font: UIFont.font(size: 18,weight: .medium),titleColor:"#010101".uiColor,action: action)
    
         var buttonBgImage = UIImage(named: "normal_submit_bg")!
 //        if UIDevice.isPad {
@@ -18,7 +18,7 @@ class TSViewTool: UIView {
           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))
+//            btn.addGradientBg(colors: ["#B3FFAB".uiColor.cgColor,"12FFF7".uiColor.cgColor],startPoint: CGPoint(x: 0, y: 1),endPoint: CGPoint(x: 1, y: 0))
 //        }
 
         
@@ -67,7 +67,7 @@ class TSSavePhotoSuccessTool {
     
     private lazy var textLabel:UILabel = {
         let textLabel = UILabel()
-        textLabel.textColor = "#4A5178".color
+        textLabel.textColor = "#4A5178".uiColor
         textLabel.text = "Save Successfully".localized
         textLabel.font = UIFont.font(size: 14)
         return textLabel

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

@@ -143,7 +143,7 @@ class TSRandomWallpaperBrowseVC: TSBaseVC {
                 return
             }
             
-            TSToastShared.showLoading()
+            TSToastShared.showLoading(containerView: self.view)
             
             let group = DispatchGroup()
             

+ 2 - 2
TSLiveWallpaper/Business/TSRandomWallpaperVC/TSRandomWallpaperVC.swift

@@ -34,9 +34,9 @@ class TSRandomWallpaperVC: TSBaseVC {
         return navBarView
     }()
     
-    lazy var collectionComponent: CollectionViewComponent = {
+    lazy var collectionComponent: TSCollectionViewComponent = {
         let layout = UICollectionViewFlowLayout()
-        let cp = CollectionViewComponent(frame: CGRect.zero, layout: layout, attributes: [ :])
+        let cp = TSCollectionViewComponent(frame: CGRect.zero, layout: layout, attributes: [ :])
         cp.collectionView.contentInset = UIEdgeInsets(top: 0, left: 0, bottom: k_Height_TabBar, right: 0)
         cp.itemDidSelectedHandler = { [weak self] (object, indexPath) in
             guard let self = self else { return }

+ 7 - 7
TSLiveWallpaper/Business/TSRandomWallpaperVC/TSRandomWallpaperView/TSRandomWallpaperBannerCell.swift

@@ -6,9 +6,9 @@
 //
 
 //MARK: TSRandomWallpaperBannerCell
-class TSRandomWallpaperBannerCell: TSBaseCollectionCell , ComponentView {
+class TSRandomWallpaperBannerCell: TSBaseCollectionCell  {
     
-    var component:CollectionViewComponent?
+    var component:TSCollectionViewComponent?
     lazy var bannerImageBgView: UIImageView = {
         return UIImageView.createImageView(imageName: "random_guided_top_bg",corner: 16)
     }()
@@ -18,8 +18,8 @@ class TSRandomWallpaperBannerCell: TSBaseCollectionCell , ComponentView {
     }()
     
     
-    lazy var closeBtn: UIExpandedTouchButton = {
-        let btn = UIExpandedTouchButton()
+    lazy var closeBtn: TSUIExpandedTouchButton = {
+        let btn = TSUIExpandedTouchButton()
         btn.setUpButton(image: UIImage(named:"close_gary")) { [weak self]  in
             guard let self = self else { return }
         
@@ -59,14 +59,14 @@ class TSRandomWallpaperBannerCell: TSBaseCollectionCell , ComponentView {
         }
     }
     
-    func renderView(with object: Any?, component: CollectionViewComponent, attributes: [String : Any]?) {
+    override func renderView(with object: Any?, component: TSCollectionViewComponent, attributes: [String : Any]?) {
         self.component = component
     }
 }
 
 
-class TSRandomWallpaperHeaderView: UICollectionReusableView , ComponentView{
-    func renderView(with object: Any?, component: CollectionViewComponent, attributes: [String : Any]?) {
+class TSRandomWallpaperHeaderView: UICollectionReusableView {
+    func renderView(with object: Any?, component: TSCollectionViewComponent, attributes: [String : Any]?) {
       
     }
 }

+ 2 - 2
TSLiveWallpaper/Business/TSRandomWallpaperVC/TSRandomWallpaperView/TSRandomWallpaperCell.swift

@@ -7,7 +7,7 @@
 
 
 //MARK: TSRandomWallpaperCell
-class TSRandomWallpaperCell: TSBaseCollectionCell , ComponentView {
+class TSRandomWallpaperCell: TSBaseCollectionCell {
 
     
     static let reuseIdentifier = "TSHomeCyclePagerViewCell"
@@ -53,7 +53,7 @@ class TSRandomWallpaperCell: TSBaseCollectionCell , ComponentView {
         }
     }
     
-    func renderView(with object: Any?, component: CollectionViewComponent, attributes: [String : Any]?) {
+    override func renderView(with object: Any?, component: TSCollectionViewComponent, attributes: [String : Any]?) {
         if let itemModel = object as? TSRandomWallpaperDataItemModel {
             
             if let model = itemModel.items.safeObj(At: 0), model.imageUrl.contains("http") {

+ 0 - 76
TSLiveWallpaper/Common/BaseClass/TSBaseCollectionCell.swift

@@ -1,76 +0,0 @@
-//
-//  CWBaseCollectionViewCell.swift
-//  ClockWidget
-//
-//  Created by fff on 2024/11/12.
-//
-
-
-class TSBaseCollectionCell: UICollectionViewCell {
-    
-    lazy var bgContentView:UIView = {
-        let view = UIView()
-        view.backgroundColor = .clear
-        return view
-    }()
-    
-    override init(frame: CGRect) {
-        super.init(frame: frame)
-        self.backgroundColor = .clear
-        self.addSubview(bgContentView)
-        bgContentView.snp.makeConstraints { make in
-            make.top.leading.trailing.bottom.equalTo(0)
-        }
-        creatUI()
-        dealThings()
-    }
-    
-    required init?(coder: NSCoder) {
-        fatalError("init(coder:) has not been implemented")
-    }
-    
-    func creatUI(){
-        
-    }
-    
-    func dealThings(){
-        
-    }
-    
-    deinit {
-        debugPrint("<---deinit \(String(describing: self))")
-    }
-    
-}
-
-
-class TSBaseCollectionnReusableView : UICollectionReusableView {
-    lazy var bgContentView:UIView = {
-        let view = UIView()
-        view.backgroundColor = .clear
-        return view
-    }()
-    
-    override init(frame: CGRect) {
-        super.init(frame: frame)
-        self.backgroundColor = .clear
-        self.addSubview(bgContentView)
-        bgContentView.snp.makeConstraints { make in
-            make.top.leading.trailing.bottom.equalTo(0)
-        }
-        creatUI()
-    }
-    
-    required init?(coder: NSCoder) {
-        fatalError("init(coder:) has not been implemented")
-    }
-    
-    func creatUI(){
-        
-    }
-    
-    deinit {
-        debugPrint("<---deinit \(String(describing: self))")
-    }
-    
-}

+ 0 - 52
TSLiveWallpaper/Common/BaseClass/TSBaseModel.swift

@@ -1,52 +0,0 @@
-//
-//  TSBaseModel.swift
-//  TSLiveWallpaper
-//
-//  Created by 100Years on 2024/12/22.
-//
-
-import ObjectMapper
-
-class TSBaseModel: NSObject, Mappable, NSCopying {
-    static func model(data: Data) -> TSBaseModel? {
-        do {
-            let object = try JSONSerialization.jsonObject(with: data)
-            if let dict = object as? [String: AnyHashable] {
-                return Self.init(json: dict)
-            }
-        } catch _ {
-            return nil
-        }
-        return nil
-    }
-    
-    var data: Data? {
-        let json = toJSON()
-        do {
-            let data = try JSONSerialization.data(withJSONObject: json)
-            return data
-        } catch _ {
-            return nil
-        }
-    }
-    
-    required convenience init?(map: ObjectMapper.Map) {
-        self.init()
-        mapping(map: map)
-    }
-    
-    required convenience init?(json: [String: Any]) {
-        self.init(JSON: json)
-    }
-    
-    func mapping(map: ObjectMapper.Map) {}
-    
-    func copy(with zone: NSZone? = nil) -> Any {
-        let json = toJSON()
-        return Self.init(JSON: json) ?? Self.init(JSON: [:])!
-    }
-    
-//    deinit {
-//        debugPrint("♻️♻️♻️ TGRootViewController -> \(type(of: self)) deinit ♻️♻️♻️")
-//    }
-}

+ 0 - 166
TSLiveWallpaper/Common/BaseClass/TSBaseNavigationBarView.swift

@@ -1,166 +0,0 @@
-//
-//  TSBaseNavigationBarView.swift
-//  TSLiveWallpaper
-//
-//  Created by 100Years on 2024/12/20.
-//
-
-
-class TSBaseNavContentBarView: UIView {
-    
-    lazy var statuView: UIView = {
-       let view = UIView()
-       return view
-   }()
-
-    lazy var barView: UIView = {
-       let view = UIView()
-       return view
-   }()
-    
-    
-    override init(frame: CGRect) {
-        super.init(frame: frame)
-        
-        addSubview(statuView)
-        addSubview(barView)
-        
-        statuView.snp.makeConstraints { make in
-            make.top.leading.trailing.equalTo(0)
-            make.height.equalTo(k_Height_StatusBar)
-        }
-
-        barView.snp.makeConstraints { make in
-            make.leading.trailing.equalTo(0)
-            make.top.equalTo(k_Height_StatusBar)
-            make.height.equalTo(k_Height_NavBar)
-        }
-
-    }
-    
-    
-    required init?(coder: NSCoder) {
-        fatalError("init(coder:) has not been implemented")
-    }
-}
-
-class TSNormalNavigationBarView: TSBaseNavContentBarView {
-
-    // MARK: - Properties
-     var navBgColor: UIColor!
-     var navTitleColor: UIColor!
-     var navTitleFont: UIFont!
-     var navLeftFont: UIFont!
-     var navRightFont: UIFont!
-
-     lazy var leftNavBtn: UIButton = {
-        let button = createNavButton()
-        button.contentHorizontalAlignment = .left
-        button.contentEdgeInsets = UIEdgeInsets(top: 0, left: 10, bottom: 0, right: 0)
-        return button
-    }()
-
-     lazy var titleNavBtn: UIButton = {
-        let button = createNavButton()
-        button.titleLabel?.font = navTitleFont
-        return button
-    }()
-
-     lazy var rightNavBtn: UIButton = {
-        let button = createNavButton()
-        button.titleLabel?.font = navRightFont
-        button.titleLabel?.adjustsFontSizeToFitWidth = true
-        button.contentHorizontalAlignment = .right
-        button.setTitleColor(.themeColor, for: .normal)
-        button.contentEdgeInsets = UIEdgeInsets(top: 0, left: 0, bottom: 0, right: 10)
-        return button
-    }()
-
-    // MARK: - Initializers
-    override init(frame: CGRect) {
-        super.init(frame: frame)
-        createData()
-        createView()
-    }
-    
-    @MainActor required init?(coder: NSCoder) {
-        fatalError("init(coder:) has not been implemented")
-    }
-    
-
-    // MARK: - Setup Methods
-    private func createData() {
-        navBgColor = .naviMianBgColor
-        navTitleColor = .naviMianTextColor
-        navTitleFont = .font(size: 18,weight:.medium)
-        navLeftFont = .font(size: 16,weight:.medium)
-        navRightFont = .font(size: 16,weight:.medium)
-    }
-
-    private func createView() {
-        let space: CGFloat = 10
-        let margins: CGFloat = 6
-
-        backgroundColor = navBgColor
-
-  
-        barView.addSubview(leftNavBtn)
-        barView.addSubview(titleNavBtn)
-        barView.addSubview(rightNavBtn)
-
-        leftNavBtn.snp.makeConstraints { make in
-            make.leading.equalTo(margins)
-            make.centerY.equalToSuperview()
-            make.width.height.equalTo(44.0)
-        }
-        
-        rightNavBtn.snp.makeConstraints { make in
-            make.trailing.equalTo(-margins)
-            make.centerY.equalToSuperview()
-            make.width.height.equalTo(44.0)
-        }
-        
-         titleNavBtn.snp.makeConstraints { make in
-             make.leading.equalTo(leftNavBtn.snp.trailing).offset(margins)
-             make.trailing.equalTo(rightNavBtn.snp.leading).offset(-margins)
-             make.centerY.equalToSuperview()
-             make.height.equalTo(44.0)
-         }
-         
-    }
-
-    // MARK: - Helper Methods
-    func setTitleName(_ name: String) -> UIButton {
-        titleNavBtn.setTitle(name.localized, for: .normal)
-        return titleNavBtn
-    }
-
-    func setTitleNavigationItem(name: String, imageName: String, target: Any?, action: Selector) -> UIButton {
-        setNavButton(button: titleNavBtn, name: name, imageName: imageName, target: target, action: action)
-        return titleNavBtn
-    }
-
-    func setLeftNavigationItem(name: String, imageName: String, target: Any?, action: Selector) -> UIButton {
-        setNavButton(button: leftNavBtn, name: name, imageName: imageName, target: target, action: action)
-        return leftNavBtn
-    }
-
-    func setRightNavigationItem(name: String, imageName: String, target: Any?, action: Selector) -> UIButton {
-        setNavButton(button: rightNavBtn, name: name, imageName: imageName, target: target, action: action)
-        return rightNavBtn
-    }
-
-    private func setNavButton(button: UIButton, name: String, imageName: String, target: Any?, action: Selector) {
-        button.setTitle(name.localized, for: .normal)
-        button.setImage(UIImage(named: imageName), for: .normal)
-        button.addTarget(target, action: action, for: .touchUpInside)
-    }
-
-    private func createNavButton() -> UIButton {
-        let button = UIButton()
-        button.setTitleColor(navTitleColor, for: .normal)
-        button.titleLabel?.font = navRightFont
-        button.titleLabel?.adjustsFontSizeToFitWidth = true
-        return button
-    }
-}

+ 0 - 110
TSLiveWallpaper/Common/BaseClass/TSBaseNavigationC.swift

@@ -1,110 +0,0 @@
-//
-//  TSBaseNavigationC.swift
-//  TSLiveWallpaper
-//
-//  Created by 100Years on 2024/12/20.
-//
-
-import UIKit
-
-class TSBaseNavigationC: UINavigationController, UIGestureRecognizerDelegate, UINavigationControllerDelegate, UINavigationBarDelegate {
-
-//    /// Whether to use system pop gesture. If false, full-screen pop gesture will be set.
-//    static let useSystemGesture: Bool = false
-//    /// Whether to enable global pop gestures. The default is true.
-//    static let popGestureEnabled: Bool = true
-//
-//    private var vcsDic: [String: Bool] = [:]
-
-    override func viewDidLoad() {
-        super.viewDidLoad()
-        configureNavigationBar()
-//        configureNavigationGestures()
-        view.backgroundColor = .clear
-        interactivePopGestureRecognizer?.isEnabled = true;
-    }
-
-    private func configureNavigationBar() {
-        self.navigationBar.isHidden = true
-    }
-//
-//    private func configureNavigationGestures() {
-//        vcsDic = [:]
-//        self.interactivePopGestureRecognizer?.delegate = self
-//    }
-//
-//    // Override pushViewController to initialize interactive pop gesture here.
-//    override func pushViewController(_ viewController: UIViewController, animated: Bool) {
-//        // Hide bottom bar only for the first pushed view controller
-//        viewController.hidesBottomBarWhenPushed = self.viewControllers.count == 1
-//        super.pushViewController(viewController, animated: animated)
-//        self.interactivePopGestureRecognizer?.isEnabled = TSBaseNavigationC.popGestureEnabled
-//    }
-//
-//    // MARK: - UIGestureRecognizerDelegate
-//
-//    func gestureRecognizerShouldBegin(_ gestureRecognizer: UIGestureRecognizer) -> Bool {
-//        // Disable pop gesture if it's the root view controller
-//        if self.viewControllers.count == 1 {
-//            return false
-//        }
-//        let vcKey = vcKeyFromVC(self.topViewController)
-//        if let vcKey = vcKey, let isEnabled = vcsDic[vcKey] {
-//            return isEnabled
-//        }
-//        return self.interactivePopGestureRecognizer?.isEnabled ?? true
-//    }
-//
-//    // MARK: - UINavigationControllerDelegate
-//
-//    func navigationController(_ navigationController: UINavigationController,
-//                              willShow viewController: UIViewController,
-//                              animated: Bool) {
-//        if #available(iOS 10.0, *) {
-//            viewController.transitionCoordinator?.notifyWhenInteractionChanges { context in
-//                if context.isCancelled { return }
-//                debugPrint("notifyWhenInteractionChanges context.isCancelled=\(context.isCancelled)")
-//            }
-//        }
-//    }
-//
-//    func navigationController(_ navigationController: UINavigationController,
-//                              didShow viewController: UIViewController,
-//                              animated: Bool) {
-//        let vcKey = vcKeyFromVC(viewController)
-//        if let vcKey = vcKey, vcsDic[vcKey] == nil {
-//            // Save pop gesture enabled value for each child view controller
-//            vcsDic[vcKey] = self.interactivePopGestureRecognizer?.isEnabled ?? true
-//        }
-//    }
-//
-//    // MARK: - UINavigationBarDelegate
-//
-//    func navigationBar(_ navigationBar: UINavigationBar, shouldPop item: UINavigationItem) -> Bool {
-//        return true
-//    }
-//
-//    // MARK: - Convenience Methods
-//
-//    private func vcKeyFromVC(_ viewController: UIViewController?) -> String? {
-//        guard let viewController = viewController else { return nil }
-//        return String(describing: type(of: viewController))
-//    }
-//
-//    func setSpecifiedViewControllerInteractivePopGestureEnabled(_ enabled: Bool) {
-//        let vcKey = vcKeyFromVC(self.topViewController)
-//        if let vcKey = vcKey {
-//            vcsDic[vcKey] = enabled
-//        }
-//    }
-//
-//    // MARK: - Status Bar
-//
-//    override var childForStatusBarStyle: UIViewController? {
-//        return self.topViewController
-//    }
-//
-//    deinit {
-////        debugPrint("TGRootNavigationController deinitialized")
-//    }
-}

+ 0 - 40
TSLiveWallpaper/Common/BaseClass/TSBaseTabViewCell.swift

@@ -1,40 +0,0 @@
-//
-//  CWBaseTabViewCell.swift
-//  ClockWidget
-//
-//  Created by fff on 2024/11/12.
-//
-
-
-class TSBaseTabViewCell: UITableViewCell {
-    
-    lazy var bgContentView:UIView = {
-        let view = UIView()
-        view.backgroundColor = .clear
-        return view
-    }()
-    
-    override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) {
-        super.init(style: style, reuseIdentifier: reuseIdentifier)
-        
-        self.selectionStyle = .none
-        self.backgroundColor = .clear
-        self.addSubview(bgContentView)
-        bgContentView.snp.makeConstraints { make in
-            make.top.leading.trailing.bottom.equalTo(0)
-        }
-        creatUI()
-    }
-    
-    required init?(coder: NSCoder) {
-        fatalError("init(coder:) has not been implemented")
-    }
-    
-    func creatUI(){
-        
-    }
-    
-    deinit {
-        debugPrint("<---deinit \(String(describing: self))")
-    }
-}

+ 0 - 285
TSLiveWallpaper/Common/BaseClass/TSBaseVC.swift

@@ -1,285 +0,0 @@
-//
-//  TSBaseVC.swift
-//  TSLiveWallpaper
-//
-//  Created by 100Years on 2024/12/20.
-//
-
-import UIKit
-
-
-class TSBaseVC: UIViewController {
-    
-    private var blurEffect: UIBlurEffect?
-    private lazy var navBlurView: UIVisualEffectView = {
-        let view = UIVisualEffectView()
-        return view
-    }()
-    
-    lazy var contentView: UIView = {
-        let view = UIView()
-        return view
-    }()
-    
-    
-    lazy var navBarContentView: UIView = {
-        let view = UIView()
-        view.backgroundColor = .clear
-        return view
-    }()
-    
-    private lazy var normalNavBarView: TSNormalNavigationBarView = {
-        let view = TSNormalNavigationBarView()
-        return view
-    }()
-    
-    
-    lazy var viewBgImageView: UIImageView = {
-        let view = UIImageView()
-        view.backgroundColor = .clear
-        return view
-    }()
-    
-    lazy var nullView: UIView = {
-        let view = UIView()
-        view.backgroundColor = .clear
-        return view
-    }()
-    
-    lazy var netWorkView: UIView = {
-        let view = UIView()
-        view.backgroundColor = .clear
-        return view
-    }()
-    
-    
-    override init(nibName nibNameOrNil: String?, bundle nibBundleOrNil: Bundle?) {
-        super.init(nibName: nibNameOrNil, bundle: nibBundleOrNil)
-    }
-
-    required init?(coder: NSCoder) {
-        super.init(coder: coder)
-    }
-
-    /// 提供一个无参数的默认初始化方法
-    init() {
-        super.init(nibName: nil, bundle: nil)
-    }
-    
-    override func viewDidLoad() {
-        super.viewDidLoad()
-        setupSuperSomeView()
-        createData()
-        createView()
-        dealThings()
-    }
-    
-    private func setupSuperSomeView() {
-        edgesForExtendedLayout = [.all]
-        
-        view.addSubview(contentView)
-        view.addSubview(navBarContentView)
-        
-        contentView.snp.makeConstraints { make in
-            make.top.equalTo(k_Nav_Height)
-            make.leading.trailing.bottom.equalToSuperview()
-        }
-        
-        navBarContentView.snp.makeConstraints { make in
-            make.leading.top.trailing.equalToSuperview()
-            make.height.equalTo(k_Nav_Height)
-        }
-    
-
-        view.backgroundColor = .mainBg
-        view.layoutIfNeeded()
-    }
-    
-    
-    
-    
-    func setViewBgImageNamed(named:String){
-        if viewBgImageView.superview == nil {
-            view.insertSubview(viewBgImageView, at: 0)
-            viewBgImageView.snp.makeConstraints { make in
-                make.edges.equalToSuperview()
-            }
-        }
-        viewBgImageView.image = UIImage(named: named)
-    }
-    
-    
-    //子类重写
-    func createData(){
-        
-        
-    }
-    func createView(){
-        
-        
-    }
-    
-    func dealThings(){
-        
-        
-    }
-    
-
-    func addNormalNavBarView(){
-        navBarContentView.addSubview(normalNavBarView)
-        normalNavBarView.snp.makeConstraints { make in
-            make.edges.equalToSuperview()
-        }
-    }
-    
-//    func useTransparentBlurredNavigationBar() {
-//        navBarView.removeFromSuperview()
-//        edgesForExtendedLayout = .all
-//        
-//        view.addSubview(navBlurView)
-//        navBlurView.snp.makeConstraints { make in
-//            make.left.top.right.equalToSuperview()
-//            make.height.equalTo(k_Nav_Height)
-//        }
-//        
-//        setClearNavigationBar()
-//        navBarView.titleNavBtn?.titleLabel?.alpha = 0.0
-//        navBlurView.contentView.addSubview(navBarView)
-//        
-//        navBarView.snp.makeConstraints { make in
-//            make.edges.equalToSuperview()
-//        }
-//        
-//        contentView.snp.updateConstraints { make in
-//            make.top.equalToSuperview()
-//        }
-//    }
-//    
-//    func handleTransparentBlurredNavigationBar(scrollViewY: CGFloat) {
-//        if scrollViewY >= - kStatusBar_Height {
-//            navBlurView.effect = blurEffect
-//            navBarView.titleNavBtn?.titleLabel?.alpha = 1.0
-//        } else {
-//            navBlurView.effect = nil
-//            navBarView.titleNavBtn?.titleLabel?.alpha = 0.0
-//        }
-//    }
-    
-    
-
-    
-    // ... 其他方法根据需要重写 ...
-    
-    
-    
-    
-    
-    override func viewWillAppear(_ animated: Bool) {
-//        super.viewWillAppear(animated)
-        debugPrint("进入------>\(String(describing: type(of: self)))")
-    }
-
-    deinit {
-        NotificationCenter.default.removeObserver(self)
-        debugPrint("♻️♻️♻️ TGRootViewController -> \(type(of: self)) deinit ♻️♻️♻️")
-    }
-
-    // MARK: - 导航栏方法
-
-    func setTitleText(_ title: String) {
-       _ = normalNavBarView.setTitleName(NSLocalizedString(title, comment: ""))
-    }
-
-    func setPageTitle(_ title: String) {
-        let pageTitle = title
-        let backTitle = " "
-        setTitleText(pageTitle)
-        _ = setNavigationItem(backTitle, imageName: "navi_back_white", direction: .left, action: #selector(navBarClickLeftAction))
-    }
-
-    func setNavigationItem(_ name: String, imageName: String, direction: NSTextAlignment, action: Selector) -> UIButton {
-        if direction == .left {
-            return normalNavBarView.setLeftNavigationItem(name: name, imageName: imageName, target: self, action: action)
-        } else {
-            return normalNavBarView.setRightNavigationItem(name: name, imageName: imageName, target: self, action: action)
-        }
-    }
-
-    @objc func navBarClickLeftAction() {
-        debugPrint("navBarClickLeftAction -> \(type(of: self))")
-        pop()
-    }
-//
-//    func pageCloseHandle() {
-//        // 子类可重写
-//    }
-//
-    @objc func pop() {
-        if navigationController == nil {
-            dismiss(animated: true, completion: nil)
-        } else if navigationController?.presentingViewController != nil, navigationController?.viewControllers.count == 1 {
-            navigationController?.dismiss(animated: true, completion: nil)
-        } else {
-            navigationController?.popViewController(animated: true)
-        }
-    }
-//
-//    func popToPageName(_ pageName: String) {
-//        guard let viewControllers = navigationController?.viewControllers else {
-//            navigationController?.popToRootViewController(animated: true)
-//            return
-//        }
-//        for viewController in viewControllers {
-//            if NSStringFromClass(type(of: viewController)) == pageName {
-//                navigationController?.popToViewController(viewController, animated: true)
-//                return
-//            }
-//        }
-//        navigationController?.popToRootViewController(animated: true)
-//    }
-//
-//    
-//    func setPagePopGestureEnabled(_ enabled: Bool) {
-//        if let navController = navigationController as? TSBaseNavigationC {
-//            navController.setSpecifiedViewControllerInteractivePopGestureEnabled(enabled)
-//        }
-//    }
-//
-
-    
-//    override var preferredStatusBarStyle: UIStatusBarStyle {
-//        return TJThemeShared.normalStatusBarStyle
-//    }
-
-
-
-//    func setNavBarOverlayContentView(_ isOverlay: Bool) {
-//        contentView.snp.updateConstraints { make in
-//            make.top.equalTo(isOverlay ? 0 : kNav_Height)
-//        }
-//    }
-//
-//    func setHiddenNavBar(_ hidden: Bool) {
-//        hiddenNavBar = hidden
-//        navBarView.isHidden = hidden
-//        if contentView.superview != nil {
-//            contentView.snp.updateConstraints { make in
-//                make.top.equalTo(hidden ? 0 : kNav_Height)
-//            }
-//        }
-//    }
-}
-
-
-extension TSBaseVC {
-    
-    func setNavBarViewHidden(_ isHidden: Bool) {
-        navBarContentView.snp.updateConstraints { make in
-            make.height.equalTo(isHidden ? 0 : k_Nav_Height)
-        }
-        
-        contentView.snp.updateConstraints { make in
-            make.top.equalTo(isHidden ? 0 : k_Nav_Height)
-        }
-    }
-}

+ 0 - 34
TSLiveWallpaper/Common/BaseClass/TSBaseView.swift

@@ -1,34 +0,0 @@
-//
-//  TSBaseView.swift
-//  TSLiveWallpaper
-//
-//  Created by 100Years on 2024/12/24.
-//
-
-class TSBaseView : UIView {
-    
-    lazy var contentView:UIView = {
-        let view = UIView()
-        view.backgroundColor = .clear
-        return view
-    }()
-    
-    override init(frame: CGRect) {
-        super.init(frame: frame)
-        self.backgroundColor = .clear
-        self.addSubview(contentView)
-        contentView.snp.makeConstraints { make in
-            make.top.leading.trailing.bottom.equalTo(0)
-        }
-        creatUI()
-    }
-    
-    required init?(coder: NSCoder) {
-        fatalError("init(coder:) has not been implemented")
-    }
-    
-    func creatUI(){
-        
-    }
-    
-}

+ 0 - 144
TSLiveWallpaper/Common/BaseClass/TSBasicItemModel.swift

@@ -1,144 +0,0 @@
-//
-//  TSBasicItemModel.swift
-//  TSLiveWallpaper
-//
-//  Created by 100Years on 2024/12/20.
-//
-
-class TSBasicItemModel {
-    // MARK: - Properties
-    var index: Int = 0
-//    var clickBlock: ((Any?) -> Void)?
-    var tapBlock: ((TSBasicItemModel, Int, Any?) -> Void)?
-    var updateDataBlock: ((TSBasicItemModel) -> Void)?
-    
-    var leftImageName: String?
-    var leftImage: UIImage?
-    var leftImagePath: String?
-    var leftTitle: String?
-    var leftSubTitle: String?
-    var rightString: String?
-    var rightSubString: String?
-    var rightIntValue: Int = 0
-    var itemData: Any?
-    var identifier: String?
-    var parametView: UIView?
-    var rightIsHave: Bool = false
-    var bottomIsHave: Bool = false
-    var isSelected: Bool = false
-    var isWhether: Bool = false
-    var rightViewStyle: Int = 0
-    var rectCorner: UIRectCorner = []
-    var topSpace: Bool = false
-    var bottomSpace: Bool = false
-    var height: CGFloat = 0.0
-    var width: CGFloat = 0.0
-    var type: Int = 0
-    weak var attributionSection: TSBasicSectionModel?
-    
-    // MARK: - Methods
-    func setCornerView(_ view: UIView, corner: CGFloat) {
-        if rectCorner.isEmpty {
-            view.layer.cornerRadius = 0
-        } else {
-            let path = UIBezierPath(roundedRect: view.bounds, byRoundingCorners: rectCorner, cornerRadii: CGSize(width: corner, height: corner))
-            let mask = CAShapeLayer()
-            mask.path = path.cgPath
-            view.layer.mask = mask
-        }
-    }
-    
-    func updateData() {
-        updateDataBlock?(self)
-    }
-    
-    
-    static func createItemModel(leftTitle: String,
-                                rightViewStyle: Int,
-                                rightString: String,
-                                rightIsHave: Bool,
-                                height: CGFloat,
-                                rectCorner: UIRectCorner,
-                                tapBlock: @escaping ((TSBasicItemModel, Int, Any?) -> Void)) -> TSBasicItemModel {
-        let model = TSBasicItemModel()
-        model.leftTitle = leftTitle
-        model.rightViewStyle = rightViewStyle
-        model.rightString = rightString
-        model.rightIsHave = rightIsHave
-        model.height = height
-        model.rectCorner = rectCorner
-        model.tapBlock = tapBlock
-        return model
-    }
-    
-    
-    static func setEdge(with dataArray: [TSBasicItemModel]) {
-        guard !dataArray.isEmpty else { return }
-        if dataArray.count == 1 {
-            dataArray.first?.rectCorner = .allCorners
-        } else {
-            dataArray.first?.rectCorner = [.topLeft, .topRight]
-            dataArray.last?.rectCorner = [.bottomLeft, .bottomRight]
-        }
-    }
-}
-
-
-
-class TSBasicSectionModel {
-    // MARK: - Properties
-    var index: Int = 0
-    var sectionData: Any?
-    var leftTitle: String?
-    var leftSubTitle: String?
-    var rightString: String?
-    var rightSubString: String?
-    var rightIsHave: Bool = false
-    var bottomIsHave: Bool = false
-    var topIsHave: Bool = false
-    var isOpen: Bool = false
-    var type: Int = 0
-    var rectCorner: UIRectCorner = []
-    var height: CGFloat = 0.0
-    var isFooter: Bool = false
-    var itemsArray: [TSBasicItemModel] = []
-    var selectedItemsIndex: Int = 0
-    
-    // MARK: - Methods
-    func setCornerView(_ view: UIView, corner: CGFloat) {
-        if rectCorner.isEmpty {
-            view.layer.cornerRadius = 0
-        } else {
-            let path = UIBezierPath(roundedRect: view.bounds, byRoundingCorners: rectCorner, cornerRadii: CGSize(width: corner, height: corner))
-            let mask = CAShapeLayer()
-            mask.path = path.cgPath
-            view.layer.mask = mask
-        }
-    }
-    
-    func addSubItemModel(_ itemModel: TSBasicItemModel) {
-        itemModel.attributionSection = self
-        itemsArray.append(itemModel)
-    }
-    
-    static func createSectionModel(leftTitle: String, height: CGFloat, index: Int = 0) -> TSBasicSectionModel {
-        let model = TSBasicSectionModel()
-        model.leftTitle = leftTitle
-        model.height = height
-        model.index = index
-        return model
-    }
-    
-    static func setEdge(with dataArray: [TSBasicSectionModel]) {
-        for section in dataArray {
-            let itemsArray = section.itemsArray
-            guard !itemsArray.isEmpty else { continue }
-            if itemsArray.count == 1 {
-                itemsArray.first?.rectCorner = .allCorners
-            } else {
-                itemsArray.first?.rectCorner = [.topLeft, .topRight]
-                itemsArray.last?.rectCorner = [.bottomLeft, .bottomRight]
-            }
-        }
-    }
-}

+ 0 - 70
TSLiveWallpaper/Common/Ex/AVAsset+Ex.swift

@@ -8,76 +8,6 @@
 import AVFoundation
 import UIKit
 
-extension AVAsset {
-    func getImage(at time: TimeInterval, videoComposition: AVVideoComposition? = nil) -> UIImage? {
-        let assetImageGenerator = AVAssetImageGenerator(asset: self)
-        assetImageGenerator.appliesPreferredTrackTransform = true
-        assetImageGenerator.videoComposition = videoComposition
-        assetImageGenerator.apertureMode = .encodedPixels
-        do {
-            let thumbnailImageRef = try assetImageGenerator.copyCGImage(
-                at: CMTime(
-                    value: CMTimeValue(time),
-                    timescale: duration.timescale
-                ),
-                actualTime: nil
-            )
-            let image = UIImage(cgImage: thumbnailImageRef)
-            return image
-        } catch {
-            return nil
-        }
-    }
-
-    func getImage(
-        at time: TimeInterval,
-        videoComposition: AVVideoComposition? = nil,
-        imageGenerator: ((AVAssetImageGenerator) -> Void)? = nil,
-        completion: @escaping (AVAsset, UIImage?, AVAssetImageGenerator.Result) -> Void
-    ) {
-        loadValuesAsynchronously(forKeys: ["duration"]) { [weak self] in
-            guard let self = self else {
-                DispatchQueue.main.async {
-                    completion(.init(), nil, .failed)
-                }
-                return
-            }
-            if self.statusOfValue(forKey: "duration", error: nil) != .loaded {
-                DispatchQueue.main.async {
-                    completion(self, nil, .failed)
-                }
-                return
-            }
-            let generator = AVAssetImageGenerator(asset: self)
-            generator.appliesPreferredTrackTransform = true
-            generator.videoComposition = videoComposition
-            let time = CMTime(value: CMTimeValue(time), timescale: self.duration.timescale)
-            let array = [NSValue(time: time)]
-            generator.generateCGImagesAsynchronously(
-                forTimes: array
-            ) { _, cgImage, _, result, _ in
-                if let image = cgImage, result == .succeeded {
-                    var image = UIImage(cgImage: image)
-                    if image.imageOrientation != .up,
-                       let img = image.normalizedImage() {
-                        image = img
-                    }
-                    DispatchQueue.main.async {
-                        completion(self, image, result)
-                    }
-                } else {
-                    DispatchQueue.main.async {
-                        completion(self, nil, result)
-                    }
-                }
-            }
-            DispatchQueue.main.async {
-                imageGenerator?(generator)
-            }
-        }
-    }
-}
-
 extension AVAsset {
     func generateThumbnail() async -> UIImage? {
         await withCheckedContinuation { continuation in

+ 0 - 47
TSLiveWallpaper/Common/Ex/Array+Ex.swift

@@ -1,47 +0,0 @@
-//
-//  Array+Ex.swift
-//  TSLiveWallpaper
-//
-//  Created by 100Years on 2024/12/20.
-//
-
-extension Array {
-    
-    func safeString(At index: Int) -> String {
-        return safeObject(At: index, defaultValue: "")
-    }
-    
-    func safeStringInt(At index: Int) -> String {
-        return safeObject(At: index, defaultValue: "0")
-    }
-    
-    func safeArray(At index: Int) -> [Any] {
-        return safeObject(At: index, defaultValue: [])
-    }
-    
-    func safeDictionary(At index: Int) -> [String: Any] {
-        return safeObject(At: index, defaultValue: [:])
-    }
-    
-    func safeNumber(At index: Int) -> NSNumber {
-        return safeObject(At: index, defaultValue: NSNumber(value: 0))
-    }
-    
-    func safeObject(At index: Int) -> Any {
-        return safeObject(At: index, defaultValue: NSObject())
-    }
-    
-    private func safeObject<T>(At index: Int, defaultValue: T) -> T {
-        guard index >= 0 && index < count else { return defaultValue }
-        let value = self[index]
-        if value is NSNull { return defaultValue }
-        return value as? T ?? defaultValue
-    }
-    
-    func safeObj(At index: Int) -> Element? {
-        guard index >= 0, count > index else {
-            return nil
-        }
-        return self[index]
-    }
-}

+ 0 - 37
TSLiveWallpaper/Common/Ex/CGFloat+Ex.swift

@@ -1,37 +0,0 @@
-//
-//  CGFloat+Ex.swift
-//  TSLiveWallpaper
-//
-//  Created by 100Years on 2024/12/23.
-//
-
-extension CGFloat {
-    
-    static var max: CGFloat {
-        CGFloat(MAXFLOAT)
-    }
-    
-    var compressionQuality: CGFloat {
-        if self > 30000000 {
-            return 30000000 / self
-        }else if self > 15000000 {
-            return 10000000 / self
-        }else if self > 10000000 {
-            return 6000000 / self
-        }else {
-            return 3000000 / self
-        }
-    }
-    
-    var transitionCompressionQuality: CGFloat {
-        if self > 6000000 {
-            return 3000000 / self
-        }else if self > 3000000 {
-            return 1000000 / self
-        }else if self > 1000000 {
-            return 600000 / self
-        }else {
-            return 1000000 / self
-        }
-    }
-}

+ 0 - 24
TSLiveWallpaper/Common/Ex/Date+Ex.swift

@@ -1,24 +0,0 @@
-//
-//  Date+Ex.swift
-//  TSLiveWallpaper
-//
-//  Created by 100Years on 2024/12/20.
-//
-
-extension Date {
-    private static var HmsFormatter: DateFormatter {
-        let formatter = DateFormatter()
-        formatter.dateFormat = "HH:mm:ss:SSS"
-        formatter.locale = Locale(identifier: "en")
-        return formatter
-    }
-    
-    static var hmsString: String {
-        return HmsFormatter.string(from: Date())
-    }
-    
-    static var timestampString: String {
-        return String(Int(Date().timeIntervalSince1970))
-    }
-
-}

+ 0 - 41
TSLiveWallpaper/Common/Ex/Dictionary+Ex.swift

@@ -1,41 +0,0 @@
-//
-//  Dictionary+Ex.swift
-//  TSLiveWallpaper
-//
-//  Created by 100Years on 2024/12/20.
-//
-
-import Foundation
-
-extension Dictionary where Key == String {
-    
-    func safeString(forKey key: String) -> String {
-        return safeObject(forKey: key, defaultValue: "")
-    }
-    
-    func safeStringInt(forKey key: String) -> String {
-        return safeObject(forKey: key, defaultValue: "0")
-    }
-    
-    func safeArray(forKey key: String) -> [Any] {
-        return safeObject(forKey: key, defaultValue: [])
-    }
-    
-    func safeDictionary(forKey key: String) -> [String: Any] {
-        return safeObject(forKey: key, defaultValue: [:])
-    }
-    
-    func safeNumber(forKey key: String) -> NSNumber {
-        return safeObject(forKey: key, defaultValue: NSNumber(value: 0))
-    }
-    
-    func safeObject(forKey key: String) -> Any {
-        return safeObject(forKey: key, defaultValue: NSObject())
-    }
-    
-    private func safeObject<T>(forKey key: String, defaultValue: T) -> T {
-        guard let value = self[key] else { return defaultValue }
-        if value is NSNull { return defaultValue }
-        return value as? T ?? defaultValue
-    }
-}

+ 0 - 33
TSLiveWallpaper/Common/Ex/Int+Ex.swift

@@ -1,33 +0,0 @@
-//
-//  Int+Ex.swift
-//  TSLiveWallpaper
-//
-//  Created by 100Years on 2024/12/20.
-//
-
-extension Int {
-    var localNumber: String? {
-        return localNumber()
-    }
-    
-    func localNumber(_ minimumIntegerDigits: Int? = nil, locale: Locale? = nil) -> String? {
-        let formatter = NumberFormatter()
-        if let locale = locale {
-            formatter.locale = locale
-        }
-        else {
-            formatter.locale = Locale.local
-        }
-        
-        formatter.numberStyle = .decimal
-        if let value = minimumIntegerDigits {
-            formatter.minimumIntegerDigits = value
-        }
-        return formatter.string(for: self);
-    }
-}
-extension Locale {
-    static var local: Locale {
-        return Locale(identifier: TSConfig.appLanguage)
-    }
-}

+ 0 - 294
TSLiveWallpaper/Common/Ex/NSString+Ex.swift

@@ -1,294 +0,0 @@
-//
-//  NSString+Ex.swift
-//  TSLiveWallpaper
-//
-//  Created by 100Years on 2024/12/20.
-//
-import CommonCrypto
-extension String {
-    
-    var color: UIColor {
-        if isEmpty {
-            return .clear
-        }
-        return UIColor.fromHex(self)
-    }
-    
-    var localFilePath: String {
-        var path = self
-        if path.lowercased().hasPrefix("file://") {
-            path.removeFirst("file://".count)
-        }
-        return path
-    }
-    
-    func toCgRect() -> CGRect {
-        NSCoder.cgRect(for: self)
-    }
-    
-    func toCgPoint() -> CGPoint {
-        NSCoder.cgPoint(for: self)
-    }
-
-
-    func toRgba() -> (r: CGFloat, g: CGFloat, b: CGFloat, a: CGFloat)? {
-        var r:CGFloat = 0;
-        var g:CGFloat = 0;
-        var b:CGFloat = 0;
-        var a:CGFloat = 0;
-        var prefix: Int = 0;
-
-        let color: String = trimmingCharacters(in: .whitespacesAndNewlines).uppercased()
-        if (color.hasPrefix("#")) {
-            prefix = 1
-        }
-        else if (color.hasPrefix("0X")) {
-            prefix = 2
-        }
-        let length: Int = color.count - prefix
-        //         RGB            RGBA          RRGGBB        RRGGBBAA
-        
-        func componentFrom(string: String, start: Int, length: Int) -> CGFloat {
-            guard start >= 0, start + length <= string.count else {
-                return 0
-            }
-            
-            let begin = string.index(startIndex, offsetBy: start)
-            let end = string.index(startIndex, offsetBy: start + length)
-            
-            let sub = string[begin..<end]
-            var full = String(sub)
-            if length == 1 {
-                full += full
-            }
-            
-            var hex: UInt64 = 0
-            Scanner(string: full).scanHexInt64(&hex)
-            
-            let float = CGFloat(hex) / 255.0
-            return float
-        }
-        
-        switch length {
-        case 3: // RGB
-            r = componentFrom(string: color, start: prefix, length: 1)
-            g = componentFrom(string: color, start: prefix + 1, length: 1)
-            b = componentFrom(string: color, start: prefix + 2, length: 1)
-            a = 1
-        case 4: // RGBA
-            r = componentFrom(string: color, start: prefix, length: 1)
-            g = componentFrom(string: color, start: prefix + 1, length: 1)
-            b = componentFrom(string: color, start: prefix + 2, length: 1)
-            a = componentFrom(string: color, start: prefix + 3, length: 1)
-        case 6: // RRGGBB
-            r = componentFrom(string: color, start: prefix, length: 2)
-            g = componentFrom(string: color, start: prefix + 2, length: 2)
-            b = componentFrom(string: color, start: prefix + 4, length: 2)
-            a = 1
-        case 8: // RRGGBBAA
-            r = componentFrom(string: color, start: prefix, length: 2)
-            g = componentFrom(string: color, start: prefix + 2, length: 2)
-            b = componentFrom(string: color, start: prefix + 4, length: 2)
-            a = componentFrom(string: color, start: prefix + 6, length: 2)
-        default:
-            return nil
-        }
-        
-        return (r, g, b, a)
-
-    }
-    
-    func toColor() -> UIColor? {
-        if let rgba = toRgba() {
-            return UIColor(red: rgba.r, green: rgba.g, blue: rgba.b, alpha: rgba.a)
-        }
-        
-        return nil
-    }
-}
-
-extension String {
-    
-    var localized:String{
-        return self.localized()
-    }
-}
-
-
-extension String {
-    var doubleValue: Double? {
-        Double(self)
-    }
-    
-    var localNumber: String {
-        if let value = Int(self), let numberString = value.localNumber {
-            return numberString
-        }
-        return self
-    }
-    
-    var md5:String {
-        let data = Data(self.utf8)
-        var digest = [UInt8](repeating: 0, count: Int(CC_MD5_DIGEST_LENGTH))
-        data.withUnsafeBytes {
-            _ = CC_MD5($0.baseAddress, CC_LONG(data.count), &digest)
-        }
-        return digest.map { String(format: "%02x", $0) }.joined()
-    }
-}
-
-
-extension String {
-    // 移除逗号
-    func deleteDotSymbol() -> String {
-        // 超过1000的数字,格式化成文本后会带 ','(en)/'٬'(ar)
-        return replacingOccurrences(of: ",", with: "").replacingOccurrences(of: "٬", with: "")
-    }
-    
-}
-
-
-
-
-extension String {
-    /// 根据字符串动态创建类实例
-    /// - Parameters:
-    ///   - type: 要创建的类类型(泛型)
-    ///   - bundle: 模块的命名空间(默认为 `nil`,即当前模块)
-    /// - Returns: 创建的实例或 `nil`
-    func toInstance<T:NSObject>(of type: T.Type, bundle: String? = nil) -> T? {
-        // 获取完整的类名
-        let namespace = bundle ?? Bundle.main.infoDictionary?["CFBundleName"] as? String ?? ""
-        let className = "\(namespace).\(self)"
-        
-        // 通过类名获取类型
-        guard let targetClass = NSClassFromString(className) as? T.Type else {
-            return nil
-        }
-        
-        // 创建实例
-        return targetClass.init()
-        
-    }
-    
-    
-    func toClass(bundle: String? = nil) -> AnyClass? {
-        // 获取完整的类名
-        let namespace = bundle ?? Bundle.main.infoDictionary?["CFBundleName"] as? String ?? ""
-        let className = "\(namespace).\(self)"
-        
-        // 通过类名获取类型
-        guard let targetClass = NSClassFromString(className) else {
-            return nil
-        }
-        
-        // 创建实例
-        return targetClass
-    }
-}
-
-
-
-
-extension String {
-    
-
-    func boundingRect(ofAttributes attributes: [NSAttributedString.Key: Any], size: CGSize) -> CGRect {
-        let boundingBox = boundingRect(
-            with: size,
-            options: [.usesLineFragmentOrigin, .usesFontLeading],
-            attributes: attributes,
-            context: nil
-        )
-        return boundingBox
-    }
-    
-    func size(ofAttributes attributes: [NSAttributedString.Key: Any], maxWidth: CGFloat, maxHeight: CGFloat) -> CGSize {
-        boundingRect(ofAttributes: attributes, size: .init(width: maxWidth, height: maxHeight)).size
-    }
-    
-    func size(ofFont font: UIFont, maxWidth: CGFloat, maxHeight: CGFloat) -> CGSize {
-        let constraintRect = CGSize(width: maxWidth, height: maxHeight)
-        let boundingBox = boundingRect(
-            with: constraintRect,
-            options: [.usesLineFragmentOrigin, .usesFontLeading],
-            attributes: [.font: font],
-            context: nil
-        )
-        return boundingBox.size
-    }
-    
-    func width(ofSize size: CGFloat, maxHeight: CGFloat) -> CGFloat {
-        width(
-            ofFont: UIFont.systemFont(ofSize: size),
-            maxHeight: maxHeight
-        )
-    }
-    
-    func width(ofFont font: UIFont, maxHeight: CGFloat) -> CGFloat {
-        size(
-            ofAttributes: [NSAttributedString.Key.font: font],
-            maxWidth: CGFloat(MAXFLOAT),
-            maxHeight: maxHeight
-        ).width
-    }
-    
-    func height(ofSize size: CGFloat, maxWidth: CGFloat) -> CGFloat {
-        height(
-            ofFont: UIFont.systemFont(ofSize: size),
-            maxWidth: maxWidth
-        )
-    }
-    
-    func height(ofFont font: UIFont, maxWidth: CGFloat) -> CGFloat {
-        size(
-            ofAttributes: [NSAttributedString.Key.font: font],
-            maxWidth: maxWidth,
-            maxHeight: CGFloat(MAXFLOAT)
-        ).height
-    }
-    
-    subscript(_ indexs: ClosedRange<Int>) -> String {
-            let beginIndex = index(startIndex, offsetBy: indexs.lowerBound)
-            let endIndex = index(startIndex, offsetBy: indexs.upperBound)
-            return String(self[beginIndex...endIndex])
-        }
-        
-    subscript(_ indexs: Range<Int>) -> String {
-        let beginIndex = index(startIndex, offsetBy: indexs.lowerBound)
-        let endIndex = index(startIndex, offsetBy: indexs.upperBound)
-        return String(self[beginIndex..<endIndex])
-    }
-    
-    subscript(_ indexs: PartialRangeThrough<Int>) -> String {
-        let endIndex = index(startIndex, offsetBy: indexs.upperBound)
-        return String(self[startIndex...endIndex])
-    }
-    
-    subscript(_ indexs: PartialRangeFrom<Int>) -> String {
-        let beginIndex = index(startIndex, offsetBy: indexs.lowerBound)
-        return String(self[beginIndex..<endIndex])
-    }
-    
-    subscript(_ indexs: PartialRangeUpTo<Int>) -> String {
-        let endIndex = index(startIndex, offsetBy: indexs.upperBound)
-        return String(self[startIndex..<endIndex])
-    }
-    
-    var assetFormat: String? {
-        let lowercased = lowercased()
-        if lowercased.hasSuffix("heic") {
-            return "heic"
-        }
-        if lowercased.hasSuffix("jpg") || lowercased.hasSuffix("jpeg") {
-            return "jpeg"
-        }
-        if lowercased.hasSuffix("png") {
-            return "png"
-        }
-        if lowercased.hasSuffix("gif") {
-            return "gif"
-        }
-        return nil
-    }
-}

+ 0 - 47
TSLiveWallpaper/Common/Ex/SwiftUI/Color+Ex.swift

@@ -1,47 +0,0 @@
-//
-//  Color+Ex.swift
-//  TSLiveWallpaper
-//
-//  Created by 100Years on 2025/1/14.
-//
-
-import SwiftUI
-
-extension Color {
-    static func hex(_ hex: String) -> Color {
-        let hex = hex.trimmingCharacters(in: CharacterSet.alphanumerics.inverted)
-        var int: UInt64 = 0
-        Scanner(string: hex).scanHexInt64(&int)
-
-        let a, r, g, b: UInt64
-        switch hex.count {
-        case 3: // RGB (12-bit)
-            (a, r, g, b) = (255, (int >> 8) * 17, (int >> 4 & 0xF) * 17, (int & 0xF) * 17)
-        case 6: // RGB (24-bit)
-            (a, r, g, b) = (255, int >> 16, int >> 8 & 0xFF, int & 0xFF)
-        case 8: // ARGB (32-bit)
-            (a, r, g, b) = (int >> 24, int >> 16 & 0xFF, int >> 8 & 0xFF, int & 0xFF)
-        default:
-            (a, r, g, b) = (255, 0, 0, 0)
-        }
-
-        return Self(
-            .sRGB,
-            red: Double(r) / 255,
-            green: Double(g) / 255,
-            blue: Double(b) / 255,
-            opacity: Double(a) / 255
-        )
-    }
-
-    // 随机生成一个颜色
-    static var randomColor: Color {
-        // 随机生成 R, G, B 和 alpha(透明度)值
-        let red = Double.random(in: 0 ... 1)
-        let green = Double.random(in: 0 ... 1)
-        let blue = Double.random(in: 0 ... 1)
-        let alpha = Double.random(in: 0.5 ... 1) // 可选,透明度的范围
-
-        return Color(red: red, green: green, blue: blue, opacity: alpha)
-    }
-}

+ 0 - 16
TSLiveWallpaper/Common/Ex/SwiftUI/Font+Ex.swift

@@ -1,16 +0,0 @@
-//
-//  Font+Ex.swift
-//  TSLiveWallpaper
-//
-//  Created by 100Years on 2025/1/14.
-//
-
-
-import SwiftUI
-extension Font {
-    static func font(name: FontName = .PingFangSC, size: CGFloat, weight: UIFont.Weight = .regular) -> Font {
-        let uiFont =  UIFont.font(name: name,size: size,weight: weight)
-        return Font(uiFont as CTFont)
-    }
-}
-

+ 0 - 35
TSLiveWallpaper/Common/Ex/TimeInterval+Ext.swift

@@ -1,35 +0,0 @@
-//
-//  TimeInterval+Ext.swift
-//  TSLiveWallpaper
-//
-//  Created by nkl on 2025/1/18.
-//
-
-import Foundation
-
-extension TimeInterval {
-    var mmss: String {
-        let minute = Int(self) / 60
-        let second = Int(self) % 60
-        return String(format: "%02d", minute) + ":" + String(format: "%02d", second)
-    }
-
-    var mmsshh: String {
-        let hour = Int(self) / 3600
-        let minute = (Int(self) % 3600) / 60
-        let second = Int(self) % 60
-
-        if hour > 0 {
-            return String(format: "%02d:%02d:%02d", hour, minute, second)
-        } else {
-            return mmss
-        }
-    }
-
-    var hhmmss: String {
-        let hour = Int(self) / 3600
-        let minute = (Int(self) % 3600) / 60
-        let second = Int(self) % 60
-        return String(format: "%02d:%02d:%02d", hour, minute, second)
-    }
-}

+ 30 - 139
TSLiveWallpaper/Common/Ex/UIButton+Ex.swift

@@ -6,144 +6,35 @@
 //
 
 extension UIButton {
-    private struct AssociatedKeys {
-        static var actionKey = "UIButtonActionKey"
-    }
-
-    // 存储回调闭包
-    private var actionClosure: (() -> Void)? {
-        get {
-            return objc_getAssociatedObject(self, &AssociatedKeys.actionKey) as? (() -> Void)
-        }
-        set {
-            objc_setAssociatedObject(self, &AssociatedKeys.actionKey, newValue, .OBJC_ASSOCIATION_RETAIN_NONATOMIC)
-        }
-    }
-
-    /// 快速创建 UIButton
-    /// - Parameters:
-    ///   - title: 按钮的标题
-    ///   - image: 按钮的图标
-    ///   - backgroundImage: 按钮的背景图
-    ///   - backgroundColor: 按钮的背景色
-    ///   - font: 按钮的字体
-    ///   - titleColor: 按钮的字体颜色
-    ///   - action: 按钮点击事件的回调
-    static func createButton(title: String? = nil,
-                             image: UIImage? = nil,
-                             backgroundImage: UIImage? = nil,
-                             backgroundColor: UIColor? = nil,
-                             font: UIFont? = nil,
-                             titleColor: UIColor? = nil,
-                             corner: CGFloat = 0,
-                             action: (() -> Void)? = nil) -> UIButton {
-        let button = UIButton(type: .custom)
-        button.setUpButton(title: title,
-                           image: image,
-                           backgroundImage: backgroundImage,
-                           backgroundColor: backgroundColor,
-                           font: font,
-                           titleColor: titleColor,
-                           corner: corner,
-                           action: action)
-        return button
-    }
-
-    func setUpButton(title: String? = nil,
-                     image: UIImage? = nil,
-                     backgroundImage: UIImage? = nil,
-                     backgroundColor: UIColor? = nil,
-                     font: UIFont? = nil,
-                     titleColor: UIColor? = nil,
-                     corner: CGFloat = 0,
-                     action: (() -> Void)? = nil) {
-        let button = self
-        button.showsTouchWhenHighlighted = false
-        button.adjustsImageWhenHighlighted = false
-        // 设置标题
-        if let title = title {
-            button.setTitle(title, for: .normal)
-        }
-
-        // 设置图片
-        if let image = image {
-            button.setImage(image, for: .normal)
-        }
-
-        // 设置背景图片
-        if let backgroundImage = backgroundImage {
-            button.setBackgroundImage(backgroundImage, for: .normal)
-        }
-
-        // 设置背景色
-        if let backgroundColor = backgroundColor {
-            button.backgroundColor = backgroundColor
-        }
-
-        // 设置字体
-        if let font = font {
-            button.titleLabel?.font = font
-        }
-
-        // 设置字体颜色
-        if let titleColor = titleColor {
-            button.setTitleColor(titleColor, for: .normal)
+        func setLocalizedImageAndTitle(image: UIImage?, title: String, for state: UIControl.State) {
+            setImage(image?.imageFlippedForRightToLeftLayoutDirection(), for: state)
+            setTitle(title, for: state)
+    
+            // 根据布局方向设置 titleEdgeInsets 和 imageEdgeInsets
+            if UIView.userInterfaceLayoutDirection(for: semanticContentAttribute) == .rightToLeft {
+                titleEdgeInsets = UIEdgeInsets(top: 0, left: -10, bottom: 0, right: 10)
+                imageEdgeInsets = UIEdgeInsets(top: 0, left: -10, bottom: 0, right: 0)
+                contentHorizontalAlignment = .right
+            } else {
+                titleEdgeInsets = UIEdgeInsets(top: 0, left: 10, bottom: 0, right: -10)
+                imageEdgeInsets = UIEdgeInsets(top: 0, left: 0, bottom: 0, right: 0)
+                contentHorizontalAlignment = .leading
+            }
+        }
+    
+        func setLocalizedImage(_ image: UIImage?, for state: UIControl.State) {
+            guard let image = image else {
+                setImage(nil, for: state)
+                return
+            }
+            setImage(image.imageFlippedForRightToLeftLayoutDirection(), for: state)
+        }
+    
+        func setLocalizedBackgroundImage(_ image: UIImage?, for state: UIControl.State) {
+            guard let image = image else {
+                setBackgroundImage(nil, for: state)
+                return
+            }
+            setBackgroundImage(image.imageFlippedForRightToLeftLayoutDirection(), for: state)
         }
-
-        if corner > 0 {
-            button.cornerRadius = corner
-        }
-
-        if let action = action {
-            button.actionClosure = action
-            button.addTarget(button, action: #selector(buttonTapped), for: .touchUpInside)
-        }
-    }
-
-    // 按钮点击事件
-    @objc private func buttonTapped() {
-        actionClosure?()
-    }
-
-    func setLocalizedImageAndTitle(image: UIImage?, title: String, for state: UIControl.State) {
-        setImage(image?.imageFlippedForRightToLeftLayoutDirection(), for: state)
-        setTitle(title, for: state)
-
-        // 根据布局方向设置 titleEdgeInsets 和 imageEdgeInsets
-        if UIView.userInterfaceLayoutDirection(for: semanticContentAttribute) == .rightToLeft {
-            titleEdgeInsets = UIEdgeInsets(top: 0, left: -10, bottom: 0, right: 10)
-            imageEdgeInsets = UIEdgeInsets(top: 0, left: -10, bottom: 0, right: 0)
-            contentHorizontalAlignment = .right
-        } else {
-            titleEdgeInsets = UIEdgeInsets(top: 0, left: 10, bottom: 0, right: -10)
-            imageEdgeInsets = UIEdgeInsets(top: 0, left: 0, bottom: 0, right: 0)
-            contentHorizontalAlignment = .leading
-        }
-    }
-
-    func setLocalizedImage(_ image: UIImage?, for state: UIControl.State) {
-        guard let image = image else {
-            setImage(nil, for: state)
-            return
-        }
-        setImage(image.imageFlippedForRightToLeftLayoutDirection(), for: state)
-    }
-
-    func setLocalizedBackgroundImage(_ image: UIImage?, for state: UIControl.State) {
-        guard let image = image else {
-            setBackgroundImage(nil, for: state)
-            return
-        }
-        setBackgroundImage(image.imageFlippedForRightToLeftLayoutDirection(), for: state)
-    }
-}
-
-class UIExpandedTouchButton: UIButton {
-    override func point(inside point: CGPoint, with event: UIEvent?) -> Bool {
-        let buttonBounds = bounds
-        let widthDelta = width * 0.5 // 增加点击区域的比例,这里增加了50%
-        let heightDelta = height * 0.5
-        let expandedBounds = buttonBounds.insetBy(dx: -widthDelta, dy: -heightDelta)
-        return expandedBounds.contains(point)
-    }
 }

+ 0 - 49
TSLiveWallpaper/Common/Ex/UIColor+Ex.swift

@@ -1,49 +0,0 @@
-//
-//  UIColor+Ex.swift
-//  TSLiveWallpaper
-//
-//  Created by 100Years on 2024/12/20.
-//
-
-import UIKit
-import SwiftUI
-extension UIColor {
-    /// 返回一个随机颜色
-    static var random: UIColor {
-        return UIColor(
-            red: CGFloat.random(in: 0...1),
-            green: CGFloat.random(in: 0...1),
-            blue: CGFloat.random(in: 0...1),
-            alpha: 1.0
-        )
-    }
-    
-    static func fromHex(_ hex: String, alpha: CGFloat = 1.0) -> UIColor {
-        var cleanedHex = hex.trimmingCharacters(in: .whitespacesAndNewlines).uppercased()
-        
-        // Remove leading "#" if present
-        if cleanedHex.hasPrefix("#") {
-            cleanedHex.removeFirst()
-        }
-        
-        // Ensure valid hex length
-        guard cleanedHex.count == 6 else {
-            return UIColor.clear // Return clear color for invalid input
-        }
-        
-        // Extract RGB components
-        var rgbValue: UInt64 = 0
-        Scanner(string: cleanedHex).scanHexInt64(&rgbValue)
-        
-        let red = CGFloat((rgbValue & 0xFF0000) >> 16) / 255.0
-        let green = CGFloat((rgbValue & 0x00FF00) >> 8) / 255.0
-        let blue = CGFloat(rgbValue & 0x0000FF) / 255.0
-        
-        return UIColor(red: red, green: green, blue: blue, alpha: alpha)
-    }
-    
-    var color: Color {
-        return Color(self)
-    }
-
-}

+ 0 - 92
TSLiveWallpaper/Common/Ex/UIDevice+Extension.swift

@@ -5,98 +5,6 @@
 //  Created by Slience on 2021/1/13.
 //
 
-import UIKit
-
-extension UIDevice {
-    class var isPortrait: Bool {
-        if isPad {
-            return true
-        }
-        if statusBarOrientation == .landscapeLeft ||
-            statusBarOrientation == .landscapeRight {
-            return false
-        }
-        return true
-    }
-
-    class var statusBarOrientation: UIInterfaceOrientation {
-        UIApplication.shared.statusBarOrientation
-    }
-
-    class var navigationBarHeight: CGFloat {
-        if isPad {
-            if #available(iOS 12, *) {
-                return statusBarHeight + 50
-            }
-        }
-        return statusBarHeight + 44
-    }
-
-    class var generalStatusBarHeight: CGFloat {
-        isAllIPhoneX ? 44 : 20
-    }
-
-    class var statusBarHeight: CGFloat {
-        let statusBarHeight: CGFloat
-        let window = UIApplication.shared.windows.first
-        if #available(iOS 13.0, *),
-           let height = window?.windowScene?.statusBarManager?.statusBarFrame.size.height {
-            statusBarHeight = height
-        } else {
-            statusBarHeight = UIApplication.shared.statusBarFrame.size.height
-        }
-        return statusBarHeight
-    }
-
-    class var topMargin: CGFloat {
-        if isAllIPhoneX {
-            return statusBarHeight
-        }
-        return safeAreaInsets.top
-    }
-
-    class var leftMargin: CGFloat {
-        safeAreaInsets.left
-    }
-
-    class var rightMargin: CGFloat {
-        safeAreaInsets.right
-    }
-
-    class var bottomMargin: CGFloat {
-        safeAreaInsets.bottom
-    }
-
-    class var isPad: Bool {
-        current.userInterfaceIdiom == .pad
-    }
-
-    class var isAllIPhoneX: Bool {
-        let safeArea = safeAreaInsets
-        let margin: CGFloat
-        if isPortrait {
-            margin = safeArea.bottom
-        } else {
-            margin = safeArea.left
-        }
-        return margin != 0
-    }
-
-    class var safeAreaInsets: UIEdgeInsets {
-        if #available(iOS 11.0, *) {
-            return UIApplication._keyWindow?.safeAreaInsets ?? .zero
-        }
-        return .zero
-    }
-
-    class var screenSize: CGSize {
-        if #available(iOS 14.0, *), ProcessInfo.processInfo.isiOSAppOnMac {
-            return UIApplication._keyWindow?.frame.size ?? UIScreen.main.bounds.size
-        }
-        return UIScreen.main.bounds.size
-    }
-}
-
 extension UIApplication {
     class var _keyWindow: UIWindow? {
         var window: UIWindow?

+ 0 - 66
TSLiveWallpaper/Common/Ex/UIFont+Ex.swift

@@ -1,66 +0,0 @@
-//
-//  UIFont+Ex.swift
-//  TSLiveWallpaper
-//
-//  Created by 100Years on 2024/12/20.
-//
-
-typealias FontName = String
-
-extension FontName {
-    static let PingFangSC           = "PingFangSC"
-}
-
-
-extension UIFont {
-    class func font(name: FontName = .PingFangSC, size: CGFloat, weight: UIFont.Weight = .regular) -> UIFont {
-        guard !name.isEmpty,
-                let _ = UIFont(name: name, size: size) else {
-            return UIFont.systemFont(ofSize: size, weight: weight)
-        }
-        var finalFontName = name
-        
-        let fontNames = UIFont.fontNames(forFamilyName: name)
-        switch weight {
-        case .light://细体 300
-            if let aName = fontNames.first(where: { $0.lowercased().hasSuffix("-light") || $0.lowercased().hasSuffix("_light") }) {
-                finalFontName = aName
-            }
-        case .medium://中黑体 500
-            if let aName = fontNames.first(where: { $0.lowercased().hasSuffix("-medium") || $0.lowercased().hasSuffix("_medium") }) {
-                finalFontName = aName
-            }
-        case .bold:// 粗体 700
-            if let aName = fontNames.first(where: { $0.lowercased().hasSuffix("-bold") || $0.lowercased().hasSuffix("_bold") }) {
-                finalFontName = aName
-            }
-        case .semibold://半粗体 600
-            if let aName = fontNames.first(where: { $0.lowercased().hasSuffix("-semibold") || $0.lowercased().hasSuffix("_semibold") }) {
-                finalFontName = aName
-            }
-        case .heavy: //粗黑体 800
-            if let aName = fontNames.first(where: { $0.lowercased().hasSuffix("-heavy") || $0.lowercased().hasSuffix("_heavy") }) {
-                finalFontName = aName
-            }
-        case .black: // 黑体 900
-            if let aName = fontNames.first(where: { $0.lowercased().hasSuffix("-black") || $0.lowercased().hasSuffix("_black") }) {
-                finalFontName = aName
-            }
-        default:
-            break
-        }
-        
-        return UIFont(name: finalFontName, size: size)!
-    }
-}
-extension UIFont {
-    
-    /// 返回该字体下,对应字符的宽度
-    /// - Parameter word: 字符
-    /// - Returns: 宽度
-    func widthForWord(_ word: String) -> CGFloat {
-        
-        let sizeWidth = (word as NSString).size(withAttributes: [.font: self]).width
-        return sizeWidth//.rounded(.up)
-    }
-}

+ 0 - 90
TSLiveWallpaper/Common/Ex/UIImage+Ex.swift

@@ -1,90 +0,0 @@
-//
-//  UIImage+Ex.swift
-//  TSLiveWallpaper
-//
-//  Created by 100Years on 2024/12/23.
-//
-
-
-extension UIImage {
-    
-    var width: CGFloat { size.width }
-    var height: CGFloat { size.height }
-    
-    func normalizedImage() -> UIImage? {
-        if imageOrientation == .up {
-            return self
-        }
-        return repaintImage()
-    }
-    func repaintImage() -> UIImage? {
-        let format = UIGraphicsImageRendererFormat()
-        format.opaque = false
-        format.scale = scale
-        let renderer = UIGraphicsImageRenderer(size: size, format: format)
-        let image = renderer.image { context in
-            draw(in: CGRect(x: 0, y: 0, width: size.width, height: size.height))
-        }
-        return image
-    }
-
-    func scaleToFillSize(size: CGSize, mode: UIView.ContentMode = .scaleToFill, scale: CGFloat = 0) -> UIImage? {
-        if __CGSizeEqualToSize(self.size, size) {
-            return self
-        }
-        let rect: CGRect
-        let rendererSize: CGSize
-        if mode == .scaleToFill {
-            let isEqualRatio = size.width / size.height == width / height
-            if isEqualRatio {
-                rendererSize = size
-                rect = CGRect(origin: .zero, size: size)
-            }else {
-                let scale = size.width / width
-                var scaleHeight = scale * height
-                var scaleWidth = size.width
-                if scaleHeight < size.height {
-                    scaleWidth = size.height / scaleHeight * size.width
-                    scaleHeight = size.height
-                }
-                rendererSize = .init(width: scaleWidth, height: scaleHeight)
-                rect = .init(origin: .zero, size: rendererSize)
-            }
-        }else {
-            rendererSize = size
-            if mode == .scaleAspectFit {
-                rect = CGRect(origin: .zero, size: size)
-            }else {
-                var x: CGFloat = 0
-                var y: CGFloat = 0
-                let scale = size.width / width
-                var scaleWidth = size.width
-                var scaleHeight = scale * height
-                if scaleHeight < size.height {
-                    scaleWidth = size.height / scaleHeight * scaleWidth
-                    scaleHeight = size.height
-                }
-                if scaleWidth < size.width {
-                    scaleHeight = size.width / scaleWidth * scaleHeight
-                    scaleWidth = size.width
-                }
-                x = -(scaleWidth - size.width) / 2
-                y = -(scaleHeight - size.height) / 2
-                rect = CGRect(
-                    x: x,
-                    y: y,
-                    width: scaleWidth,
-                    height: scaleHeight
-                )
-            }
-        }
-        let format = UIGraphicsImageRendererFormat()
-        format.opaque = false
-        format.scale = scale == 0 ? self.scale : scale
-        let renderer = UIGraphicsImageRenderer(size: rendererSize, format: format)
-        let image = renderer.image { context in
-            draw(in: rect)
-        }
-        return image
-    }
-}

+ 0 - 116
TSLiveWallpaper/Common/Ex/UIImageView+Ex.swift

@@ -4,122 +4,6 @@
 //
 //  Created by 100Years on 2024/12/20.
 //
-import Kingfisher
-extension UIImageView {
-
-    /// 创建并配置 UIImageView
-    /// - Parameters:
-    ///   - imageName: 图片名称
-    ///   - contentMode: 内容模式,默认为 `.scaleAspectFit`
-    ///   - backgroundColor: 背景颜色,默认为透明
-    /// - Returns: 配置完成的 UIImageView 实例
-    static func createImageView(imageName: String,
-                                contentMode: UIView.ContentMode = .scaleAspectFit,
-                                backgroundColor: UIColor = .clear,
-                                corner: CGFloat = 0.0) -> UIImageView {
-        let imageView = UIImageView()
-        imageView.image = UIImage(named: imageName)
-        imageView.contentMode = contentMode
-        imageView.backgroundColor = backgroundColor
-        imageView.cornerRadius = corner
-        return imageView
-    }
-    
-    /// 异步创建并加载图片的 UIImageView
-    /// - Parameters:
-    ///   - imageName: 本地占位图片名称
-    ///   - urlString: 图片的 URL 字符串
-    ///   - contentMode: 内容模式,默认为 `.scaleAspectFit`
-    ///   - backgroundColor: 背景颜色,默认为透明
-    ///   - showLoading: 是否显示加载动画,默认为 `true`
-    ///   - completion: 图片加载成功后的回调
-    static func createAsyncImageView(urlString: String?,
-                                     placeholder:UIImage?,
-                                     contentMode: UIView.ContentMode = .scaleAspectFit,
-                                     backgroundColor: UIColor = .clear,
-                                     showLoading: Bool = false,
-                                     completion: ((UIImage?) -> Void)? = nil) -> UIImageView {
-        let imageView = UIImageView()
-        imageView.setAsyncImage(urlString: urlString,
-                                placeholder:placeholder,
-                                contentMode:contentMode,
-                                backgroundColor:backgroundColor,
-                                showLoading:showLoading,
-                                completion:completion)
-        return imageView
-    }
-
-    
-    
-    func setAsyncImage(urlString: String?,
-                     placeholder: UIImage? = nil,
-                     contentMode: UIView.ContentMode = .scaleAspectFill,
-                 backgroundColor: UIColor = .clear,
-                       showLoading: Bool = false,
-                      completion: ((UIImage?) -> Void)? = nil){
-        let imageView = self
-        imageView.contentMode = contentMode
-        imageView.backgroundColor = backgroundColor
-        
-        guard let urlString = urlString, let url = URL(string: urlString) else {
-            completion?(nil)
-            return
-        }
-        
-
-        if urlString.contains("http") {
-            kf.indicatorType = showLoading ? .activity : .none
-            imageView.kf.setImage(with: url,
-                 placeholder: placeholder,
-                     options: nil,
-               progressBlock: nil) { result in
-                
-                if let image = try? result.get().image {
-                    completion?(image)
-                }else{
-                    completion?(nil)
-                }
-            }
-            
-        }else if urlString.contains("/") {
-            imageView.image = placeholder
-            imageView.image = UIImage(contentsOfFile: urlString.fillCachePath)
-        }else {
-            imageView.image = placeholder
-            if let image = UIImage(named: urlString) {
-                imageView.image = image
-            }
-        }
-    }
-
-}
-
-extension UIImageView {
-    
-    static func createRightArrow() -> UIImageView {
-        let imageView = UIImageView()
-        imageView.image = UIImage(named: "white_right_arrow")
-        return imageView
-    }
-}
-
-extension UIImageView {
-    func setImage(_ image: UIImage?, duration: CFTimeInterval = 0.2, animated: Bool = true) {
-        if let image = image {
-            if animated {
-                UIView.transition(
-                    with: self,
-                    duration: duration,
-                    options: [.transitionCrossDissolve, .curveEaseInOut, .allowUserInteraction]
-                ) {
-                    self.image = image
-                }
-            }else {
-                self.image = image
-            }
-        }
-    }
-}
 
 extension UIImageView {
     func setLocalizedImage(_ image: UIImage?) {

+ 0 - 88
TSLiveWallpaper/Common/Ex/UILabel+Ex.swift

@@ -1,88 +0,0 @@
-//
-//  UILabel+Ex.swift
-//  TSLiveWallpaper
-//
-//  Created by 100Years on 2024/12/20.
-//
-
-extension UILabel {
-    /// 快速创建 UILabel
-    /// - Parameters:
-    ///   - text: 文本内容
-    ///   - font: 字体
-    ///   - textColor: 文本颜色
-    ///   - textAlignment: 文本对齐方式
-    ///   - numberOfLines: 行数,默认 1
-    ///   - backgroundColor: 背景颜色
-    ///   - adjustsFontSizeToFitWidth: 是否自适应宽度,默认 false
-    ///   - cornerRadius: 圆角,默认 0
-    /// - Returns: 配置好的 UILabel 实例
-    static func createLabel(text: String? = nil,
-                            font: UIFont? = nil,
-                            textColor: UIColor? = nil,
-                            textAlignment: NSTextAlignment = .left,
-                            numberOfLines: Int = 1,
-                            backgroundColor: UIColor? = nil,
-                            adjustsFontSizeToFitWidth: Bool = false,
-                            cornerRadius: CGFloat = 0) -> UILabel {
-        let label = UILabel()
-        
-        // 设置文本内容
-        label.text = text
-        
-        // 设置字体
-        if let font = font {
-            label.font = font
-        }
-        
-        // 设置文本颜色
-        if let textColor = textColor {
-            label.textColor = textColor
-        }
-        
-        // 设置文本对齐方式
-        label.textAlignment = textAlignment
-        
-        // 设置行数
-        label.numberOfLines = numberOfLines
-        
-        // 设置背景颜色
-        if let backgroundColor = backgroundColor {
-            label.backgroundColor = backgroundColor
-        }
-        
-        // 设置是否自适应宽度
-        label.adjustsFontSizeToFitWidth = adjustsFontSizeToFitWidth
-        
-        // 设置圆角
-        if cornerRadius > 0 {
-            label.layer.cornerRadius = cornerRadius
-            label.layer.masksToBounds = true
-        }
-        
-        return label
-    }
-}
-
-
-
-extension UILabel {
-    var textHeight: CGFloat {
-        if let textHeight = text?.height(ofFont: font, maxWidth: width > 0 ? width : .max) {
-            return textHeight
-        }
-        return 0
-    }
-    var textWidth: CGFloat {
-        if let textWidth = text?.width(ofFont: font, maxHeight: height > 0 ? height : .max) {
-            return textWidth
-        }
-        return 0
-    }
-    var textSize: CGSize {
-        if let textSize = text?.size(ofFont: font, maxWidth: .max, maxHeight: .max) {
-            return textSize
-        }
-        return .zero
-    }
-}

+ 0 - 195
TSLiveWallpaper/Common/Ex/UITableView+Ex.swift

@@ -1,195 +0,0 @@
-//
-//  UITableView+Ex.swift
-//  TSLiveWallpaper
-//
-//  Created by 100Years on 2024/12/20.
-//
-
-import UIKit
-import MJRefresh
-
-private var isMJRefreshKey = "isMJRefreshKey"
-private var pageNumKey = "pageNumKey"
-private var pageSizeKey = "pageSizeKey"
-private var nullDataImageViewKey = "nullDataImageViewKey"
-private var dataArrayKey = "dataArrayKey"
-
-private let PAGESIZE = 10
-private let PAGENUM = 1
-
-extension UITableView {
-    // MARK: - Properties
-    
-    var isUseMJRefresh: Bool {
-        get { objc_getAssociatedObject(self, &isMJRefreshKey) as? Bool ?? false }
-        set { objc_setAssociatedObject(self, &isMJRefreshKey, newValue, .OBJC_ASSOCIATION_ASSIGN) }
-    }
-
-    var pageNum: Int {
-        get { objc_getAssociatedObject(self, &pageNumKey) as? Int ?? PAGENUM }
-        set { objc_setAssociatedObject(self, &pageNumKey, newValue, .OBJC_ASSOCIATION_ASSIGN) }
-    }
-
-    var pageSize: Int {
-        get { objc_getAssociatedObject(self, &pageSizeKey) as? Int ?? PAGESIZE }
-        set { objc_setAssociatedObject(self, &pageSizeKey, newValue, .OBJC_ASSOCIATION_ASSIGN) }
-    }
-
-    var nullDataImageView: UIImageView? {
-        get { objc_getAssociatedObject(self, &nullDataImageViewKey) as? UIImageView }
-        set { objc_setAssociatedObject(self, &nullDataImageViewKey, newValue, .OBJC_ASSOCIATION_RETAIN_NONATOMIC) }
-    }
-
-    var dataArray: [Any] {
-        get { objc_getAssociatedObject(self, &dataArrayKey) as? [Any] ?? [] }
-        set { objc_setAssociatedObject(self, &dataArrayKey, newValue, .OBJC_ASSOCIATION_RETAIN_NONATOMIC) }
-    }
-
-    // MARK: - Methods
-    
-    func myReloadData() {
-        reloadData()
-        guard let dataSource = dataSource else { return }
-        var isEmpty = true
-        let sections = (dataSource.responds(to: #selector(UITableViewDataSource.numberOfSections(in:))) ? dataSource.numberOfSections?(in: self) : 1) ?? 1
-
-        for section in 0..<sections {
-            if dataSource.tableView(self, numberOfRowsInSection: section) > 0 {
-                isEmpty = false
-                break
-            }
-        }
-
-        if isEmpty {
-            if nullDataImageView == nil {
-                let nullImage = UIImage(named: "nullDataImageView") ?? UIImage()
-                let w = nullImage.size.width
-                let h = nullImage.size.height
-                nullDataImageView = UIImageView(frame: CGRect(x: (bounds.width - w) / 2, y: (bounds.height - h) / 2, width: w, height: h))
-                nullDataImageView?.image = nullImage
-                if let nullDataImageView = nullDataImageView {
-                    addSubview(nullDataImageView)
-                }
-            }
-        } else {
-            nullDataImageView?.removeFromSuperview()
-            nullDataImageView = nil
-        }
-    }
-
-    func handleDataArray(_ networkArray: [Any]) {
-        let count = networkArray.count
-
-        if count > 0 {
-            if pageNum <= PAGENUM {
-                dataArray.removeAll()
-            }
-            dataArray.append(contentsOf: networkArray)
-            myReloadData()
-        } else if pageNum <= PAGENUM {
-            dataArray.removeAll()
-            myReloadData()
-        }
-
-        if isUseMJRefresh {
-            handleMJRefresh(count: count)
-        }
-    }
-
-    func addFooter(refreshingBlock: @escaping () -> Void) {
-        isUseMJRefresh = true
-        mj_footer = MJRefreshAutoNormalFooter(refreshingBlock: { [weak self] in
-            self?.pageNum += 1
-            refreshingBlock()
-        })
-    }
-
-    func addHeader(refreshingBlock: @escaping () -> Void) {
-        isUseMJRefresh = true
-        mj_header = MJRefreshNormalHeader(refreshingBlock: { [weak self] in
-            self?.pageNum = PAGENUM
-            refreshingBlock()
-        })
-    }
-
-    func handleMJRefresh(count: Int) {
-        if count >= pageSize {
-            mj_footer?.resetNoMoreData()
-        } else {
-            mj_footer?.endRefreshingWithNoMoreData()
-        }
-
-        if pageNum <= PAGENUM {
-            mj_header?.endRefreshing()
-        } else {
-            mj_footer?.endRefreshing()
-        }
-    }
-
-    func handleMJRefreshWithError(_ error: String?) {
-        if pageNum <= PAGENUM {
-            mj_header?.endRefreshing()
-        } else {
-            mj_footer?.endRefreshing()
-        }
-    }
-
-    func initBaseTableView(reuseXib cellIds: [String], isUseMJRefresh: Bool, delegate: UITableViewDelegate & UITableViewDataSource) {
-        setUpTableView()
-        self.isUseMJRefresh = isUseMJRefresh
-        self.delegate = delegate
-        self.dataSource = delegate
-
-        cellIds.forEach { cellId in
-            register(UINib(nibName: cellId, bundle: nil), forCellReuseIdentifier: cellId)
-        }
-    }
-
-    func initBaseTableView(reuseClass cellIds: [String], isUseMJRefresh: Bool, delegate: UITableViewDelegate & UITableViewDataSource) {
-        setUpTableView()
-        self.isUseMJRefresh = isUseMJRefresh
-        self.delegate = delegate
-        self.dataSource = delegate
-
-        registerCellClass(cellIds: cellIds)
-    }
-    
-    func registerCellClass(cellIds:[String]) {
-        cellIds.forEach { cellId in
-            if let cellClass = cellId.toClass() {
-                self.register(cellClass, forCellReuseIdentifier: cellId)
-            }
-        }
-    }
-
-    private func setUpTableView() {
-        if #available(iOS 11.0, *) {
-            contentInsetAdjustmentBehavior = .never
-        }
-
-        if #available(iOS 15.0, *) {
-            sectionHeaderTopPadding = 0
-        }
-
-        separatorStyle = .none
-        backgroundColor = .clear
-
-        pageNum = PAGENUM
-        pageSize = PAGESIZE
-        dataArray = []
-
-        estimatedRowHeight = 0
-        estimatedSectionHeaderHeight = 0
-        estimatedSectionFooterHeight = 0
-
-        showsVerticalScrollIndicator = false
-        showsHorizontalScrollIndicator = false
-        
-        
-        backgroundColor = .clear
-
-        if tableFooterView == nil {
-            tableFooterView = UIView(frame: CGRect(x: 0, y: 0, width: 0, height: CGFLOAT_MIN))
-        }
-    }
-}

+ 0 - 54
TSLiveWallpaper/Common/Ex/UIViewController+Ex.swift

@@ -1,54 +0,0 @@
-//
-//  UIViewController+Ex.swift
-//  TSLiveWallpaper
-//
-//  Created by 100Years on 2024/12/30.
-//
-
-extension UIViewController {
-    func showCustomAlert(
-        title: String? = "",
-        message: String?,
-        deleteHandler: (() -> Void)? = nil,
-        cancelHandler: (() -> Void)? = nil
-    ) {
-        let alert = UIAlertController(title: nil, message: nil, preferredStyle: .alert)
-        
-        // 自定义标题
-        if let title = title {
-            let titleAttributes: [NSAttributedString.Key: Any] = [
-                .font: UIFont.boldSystemFont(ofSize: 20),
-                .foregroundColor: UIColor.white
-            ]
-            let attributedTitle = NSAttributedString(string: title, attributes: titleAttributes)
-            alert.setValue(attributedTitle, forKey: "attributedTitle")
-        }
-        
-        // 自定义消息
-        if let message = message {
-            let messageAttributes: [NSAttributedString.Key: Any] = [
-                .font: UIFont.boldSystemFont(ofSize: 17),
-                .foregroundColor: UIColor.white
-            ]
-            let attributedMessage = NSAttributedString(string: message, attributes: messageAttributes)
-            alert.setValue(attributedMessage, forKey: "attributedMessage")
-        }
-        
-        // 添加按钮
-        let cancelAction = UIAlertAction(title: "Cancel".localized, style: .cancel) { _ in
-            cancelHandler?()
-        }
-        alert.addAction(cancelAction)
-        
-        let deleteAction = UIAlertAction(title: "Delete".localized, style: .destructive) { _ in
-            deleteHandler?()
-        }
-        alert.addAction(deleteAction)
-        
-        // 设置黑暗模式
-        alert.overrideUserInterfaceStyle = .dark
-        
-        // 显示弹窗
-        present(alert, animated: true, completion: nil)
-    }
-}

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

@@ -1,30 +0,0 @@
-//
-//  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)
-        }
-    }
-}

+ 0 - 303
TSLiveWallpaper/Common/Ex/View+Ex.swift

@@ -8,99 +8,6 @@
 import UIKit
 
 extension UIView {
-    @IBInspectable
-    var cornerRadius: CGFloat {
-        set {
-            clipsToBounds = true
-            layer.cornerRadius = newValue
-        }
-        get {
-            layer.cornerRadius
-        }
-    }
-
-    @IBInspectable
-    var borderWidth: CGFloat {
-        set {
-            layer.borderWidth = newValue
-        }
-        get {
-            layer.borderWidth
-        }
-    }
-
-    @IBInspectable
-    var borderColor: UIColor? {
-        set {
-            layer.borderColor = newValue?.cgColor
-        }
-        get {
-            if let cgColor = layer.borderColor {
-                return UIColor(cgColor: cgColor)
-            }
-            return nil
-        }
-    }
-
-    /// 增加渐变背景,需要先确定当前 view 的 frame
-    /// - Parameters:
-    ///   - colors: 渐变背景颜色数组
-    ///   - startPoint: 渐变启示位置
-    ///   - endPoint: 渐变结束位置
-    ///   - layerSize: 指定 layer 的 size,否则和自己当前一样大
-    func addGradientBg(colors: [CGColor],
-                       startPoint: CGPoint = .zero,
-                       endPoint: CGPoint = CGPoint(x: 1, y: 1),
-                       layerSize: CGSize? = nil) {
-        let gl = CAGradientLayer()
-        gl.colors = colors
-        gl.startPoint = startPoint
-        gl.endPoint = endPoint
-        gl.frame = CGRect(origin: .zero, size: layerSize ?? bounds.size)
-        layer.insertSublayer(gl, at: 0)
-    }
-
-    /// 慎用
-    /// 给 view 增加圆角阴影,会改变视图结构,慎用,
-    /// 需add 且确定frame后再调用
-    /// > Note: 慎用
-    /// - Parameters:
-    ///   - cornerRadius: 视图圆角
-    ///   - shadowColor: 阴影颜色
-    ///   - shadowOffset: 阴影偏移量
-    ///   - shadowRadius: 阴影扩散距离
-    ///   - shadowOpacity: 阴影透明度
-    @discardableResult
-    func addCornerRadiusShadow(cornerRadius: CGFloat,
-                               shadowColor: CGColor?,
-                               shadowOffset: CGSize,
-                               shadowRadius: CGFloat,
-                               shadowOpacity: Float) -> UIView? {
-        guard let supView = superview else {
-            debugPrint("必须要先add,且确定了frame")
-            return nil
-        }
-
-        let frame = self.frame
-
-        let shadowView = UIView()
-        shadowView.frame = frame
-        shadowView.layer.shadowColor = shadowColor
-        shadowView.layer.shadowOffset = shadowOffset
-        shadowView.layer.shadowOpacity = shadowOpacity
-        shadowView.layer.shadowRadius = shadowRadius
-
-        supView.insertSubview(shadowView, belowSubview: self)
-
-        shadowView.addSubview(self)
-        self.frame = CGRect(origin: .zero, size: frame.size)
-        clipsToBounds = false
-        layer.masksToBounds = true
-        layer.cornerRadius = cornerRadius
-
-        return shadowView
-    }
-
     func setGradient(colors: [UIColor],
                      locations: [NSNumber]? = nil,
                      from point1: CGPoint = CGPoint(x: 0, y: 0),
@@ -125,214 +32,4 @@ extension UIView {
             layer.addSublayer(gradientLayer)
         }
     }
-
-    var customCornerRadius: CGFloat {
-        set {
-            layer.cornerRadius = newValue
-            layer.masksToBounds = true
-        }
-        get {
-            layer.cornerRadius
-        }
-    }
-}
-
-public extension UIScreen {
-    static let size = {
-        UIScreen.main.bounds.size
-    }()
-
-    static var width: CGFloat {
-        return size.width
-    }
-
-    static var height: CGFloat {
-        return size.height
-    }
-}
-
-// Frame
-public extension UIView {
-    var x: CGFloat {
-        set {
-            frame.origin.x = newValue
-        }
-        get {
-            return frame.origin.x
-        }
-    }
-
-    var y: CGFloat {
-        set {
-            frame.origin.y = newValue
-        }
-        get {
-            return frame.origin.y
-        }
-    }
-
-    var width: CGFloat {
-        set {
-            frame.size.width = newValue
-        }
-        get {
-            return frame.size.width
-        }
-    }
-
-    var height: CGFloat {
-        set {
-            frame.size.height = newValue
-        }
-        get {
-            return frame.size.height
-        }
-    }
-
-    var size: CGSize {
-        get { frame.size }
-        set {
-            var rect = frame
-            rect.size = newValue
-            frame = rect
-        }
-    }
-
-    var centerX: CGFloat {
-        set {
-            let newCenter = CGPoint(x: newValue, y: center.y)
-            center = newCenter
-        }
-        get {
-            return center.x
-        }
-    }
-
-    var centerY: CGFloat {
-        set {
-            let newCenter = CGPoint(x: center.x, y: newValue)
-            center = newCenter
-        }
-        get {
-            return center.y
-        }
-    }
-
-    var bottom: CGFloat {
-        return frame.origin.y + frame.size.height
-    }
-
-    var viewController: UIViewController? {
-        var next = superview
-        while next != nil {
-            let nextResponder = next?.next
-            if nextResponder is UINavigationController ||
-                nextResponder is UIViewController {
-                return nextResponder as? UIViewController
-            }
-            next = next?.superview
-        }
-        return nil
-    }
-
-    func convertedToImage(rect: CGRect = .zero) -> UIImage? {
-        var size = bounds.size
-        var origin = bounds.origin
-        if !size.equalTo(rect.size) && !rect.isEmpty {
-            size = rect.size
-            origin = CGPoint(x: -rect.minX, y: -rect.minY)
-        }
-        let format = UIGraphicsImageRendererFormat()
-        format.opaque = false
-        format.scale = UIScreen._scale
-        let renderer = UIGraphicsImageRenderer(size: size, format: format)
-        let image = renderer.image { _ in
-            drawHierarchy(in: CGRect(origin: origin, size: bounds.size), afterScreenUpdates: true)
-        }
-        return image
-    }
-
-    func cornersRound(radius: CGFloat, corner: UIRectCorner) {
-        if #available(iOS 11.0, *) {
-            layer.cornerRadius = radius
-            layer.maskedCorners = corner.mask
-        } else {
-            let path = UIBezierPath(
-                roundedRect: bounds,
-                byRoundingCorners: corner,
-                cornerRadii: CGSize(width: radius, height: radius)
-            )
-            let mask = CAShapeLayer()
-            mask.path = path.cgPath
-            layer.mask = mask
-        }
-    }
-}
-
-extension UIRectCorner {
-    var mask: CACornerMask {
-        switch self {
-        case .allCorners:
-            return [.layerMinXMinYCorner, .layerMinXMaxYCorner, .layerMaxXMinYCorner, .layerMaxXMaxYCorner]
-        default:
-            return .init(rawValue: rawValue)
-        }
-    }
-}
-
-public extension UIView {
-    // 部分圆角(必须Frame已知)
-    func makeCorner(_ corners: UIRectCorner, radius: CGFloat) {
-        let path = UIBezierPath(roundedRect: bounds, byRoundingCorners: corners, cornerRadii: CGSize(width: radius, height: radius))
-        let maskLayer = CAShapeLayer()
-        maskLayer.frame = bounds
-        maskLayer.path = path.cgPath
-        layer.mask = maskLayer
-    }
-}
-
-extension UIView {
-    /// 为视图添加高斯模糊效果
-    /// - Parameters:
-    ///   - blurRadius: 模糊半径(默认 10.0)
-    ///   - fillColor: 填充颜色(可选,默认透明)
-    func applyGaussianBlur(blurRadius: CGFloat = 10.0, fillColor: UIColor? = nil) {
-        // 移除已有的模糊效果
-        removeBlurEffect()
-
-        // 创建模糊效果
-        let blurEffect = UIBlurEffect(style: .light)
-        let blurView = UIVisualEffectView(effect: blurEffect)
-        blurView.frame = bounds
-        blurView.autoresizingMask = [.flexibleWidth, .flexibleHeight]
-
-        // 设置模糊强度
-        if blurRadius != 10.0 {
-            let blurAnimator = CABasicAnimation(keyPath: "inputRadius")
-            blurAnimator.fromValue = blurRadius
-            blurAnimator.toValue = blurRadius
-            blurAnimator.duration = 0
-            blurView.layer.add(blurAnimator, forKey: nil)
-        }
-
-        // 如果指定了填充颜色,添加一个覆盖视图
-        if let color = fillColor {
-            let colorOverlay = UIView(frame: bounds)
-            colorOverlay.backgroundColor = color
-            colorOverlay.autoresizingMask = [.flexibleWidth, .flexibleHeight]
-            colorOverlay.isUserInteractionEnabled = false
-            blurView.contentView.addSubview(colorOverlay)
-        }
-
-        addSubview(blurView)
-    }
-
-    /// 移除模糊效果
-    func removeBlurEffect() {
-        for subview in subviews {
-            if subview is UIVisualEffectView {
-                subview.removeFromSuperview()
-            }
-        }
-    }
 }

+ 1 - 1
TSLiveWallpaper/Common/GlobalImports/GlobalImports.swift

@@ -4,7 +4,7 @@
 //
 //  Created by 100Years on 2024/12/20.
 //
-
+@_exported import TSSmalCoacopods
 @_exported import Foundation
 @_exported import UIKit
 @_exported import SnapKit

+ 1 - 131
TSLiveWallpaper/Common/Tool/TSFileManagerTool.swift

@@ -5,7 +5,7 @@
 //  Created by 100Years on 2024/12/26.
 //
 
-class TSFileManagerTool {
+extension TSFileManagerTool {
     
     /// 获取 Video 下载后保存的的文件件路径
     static var saveDownVideoPathURL:URL = {
@@ -24,134 +24,4 @@ class TSFileManagerTool {
         let saveVideoPathURL = FileManager.default.urls(for: .cachesDirectory, in: .userDomainMask).first!.appendingPathComponent("livePhoto").appendingPathComponent("saveVideo")
         return saveVideoPathURL
     }()
-    
-    
-    /// 获取沙盒 Documents 目录路径
-    static var documentsDirectory: URL {
-        return FileManager.default.urls(for: .documentDirectory, in: .userDomainMask).first!
-    }
-
-    /// 获取沙盒 Cache 目录路径
-    static var cacheDirectory: URL {
-        return FileManager.default.urls(for: .cachesDirectory, in: .userDomainMask).first!
-    }
-
-    /// 获取沙盒 Temporary 目录路径
-    static var temporaryDirectory: URL {
-        return FileManager.default.temporaryDirectory
-    }
-
-    static func copyFileWithOverwrite(from sourceURL: URL, to targetURL: URL) {
-        let fileManager = FileManager.default
-        do {
-            removeItem(from: targetURL)
-            checkFolderAndCreate(from: targetURL)
-            try fileManager.copyItem(at: sourceURL, to: targetURL)
-            debugPrint("文件复制成功!")
-        } catch {
-            debugPrint("文件复制失败: \(error.localizedDescription)")
-        }
-    }
-    
-    static func removeItem(from sourceURL: URL) {
-        let fileManager = FileManager.default
-        do {
-            // 如果目标路径存在同名文件,先删除旧文件
-            if fileManager.fileExists(atPath: sourceURL.path) {
-                try fileManager.removeItem(at: sourceURL)
-            }
-            debugPrint("文件删除成功!")
-        } catch {
-            debugPrint("文件删除失败: \(error.localizedDescription)")
-        }
-    }
-    
-    /// 移动文件的方法(自动创建目标文件夹)
-    /// - Parameters:
-    ///   - sourceURL: 文件的源 URL
-    ///   - destinationURL: 目标 URL
-    /// - Throws: 如果移动失败,会抛出错误
-    static func moveFile(from sourceURL: URL, to destinationURL: URL) {
-        let fileManager = FileManager.default
-        
-        // 检查源文件是否存在
-        guard fileManager.fileExists(atPath: sourceURL.path) else {
-            let error = NSError(domain: "FileMoveError", code: 404, userInfo: [NSLocalizedDescriptionKey: "源文件不存在"])
-            debugPrint(error)
-            return
-        }
-        
-        // 获取目标文件夹的路径
-        let destinationDirectory = destinationURL.deletingLastPathComponent()
-        do {
-            // 如果目标文件夹不存在,创建文件夹
-            if !fileManager.fileExists(atPath: destinationDirectory.path) {
-                try fileManager.createDirectory(at: destinationDirectory, withIntermediateDirectories: true, attributes: nil)
-            }
-            
-            // 检查目标路径是否已经存在文件
-            if fileManager.fileExists(atPath: destinationURL.path) {
-                // 如果需要覆盖,可以选择先删除目标文件
-                try fileManager.removeItem(at: destinationURL)
-            }
-            
-            // 尝试移动文件
-            try fileManager.moveItem(at: sourceURL, to: destinationURL)
-        } catch {
-            debugPrint("尝试移动文件失败: \(error.localizedDescription)")
-        }
-    }
-    
-    static func getFileName(from url: URL, includeExtension: Bool = true) -> String {
-        if includeExtension {
-            return url.lastPathComponent
-        } else {
-            return url.deletingPathExtension().lastPathComponent
-        }
-    }
-    
-    static func checkFolderAndCreate(from destinationURL: URL){
-        let fileManager = FileManager.default
-        let destinationDirectory = destinationURL.deletingLastPathComponent()
-        // 如果目标文件夹不存在,创建文件夹
-        if !fileManager.fileExists(atPath: destinationDirectory.path) {
-            do {
-                try fileManager.createDirectory(at: destinationDirectory, withIntermediateDirectories: true, attributes: nil)
-            } catch {
-                debugPrint("尝试创建文件夹失败: \(error.localizedDescription)")
-            }
-        }
-    }
-
-    // MARK: - 文件操作方法
-
-    /// 检查文件或文件夹是否存在
-    static func fileExists(at url: URL) -> Bool {
-        return FileManager.default.fileExists(atPath: url.path)
-    }
-
-    /// 创建文件夹
-    static func createDirectory(at url: URL) throws {
-        if !fileExists(at: url) {
-            try FileManager.default.createDirectory(at: url, withIntermediateDirectories: true, attributes: nil)
-        }
-    }
-    
-    //获取缓存目录下文件夹路径
-    static func getCacheSubPath(at url: URL) ->String? {
-        let array = url.path.components(separatedBy:"/Caches/")
-        let cashFilePath = array.last
-        return cashFilePath
-    }
-    
-}
-
-extension String {
-    var fillCachePath:String{
-        return TSFileManagerTool.cacheDirectory.appendingPathComponent(self).path
-    }
-    
-    var fillCacheURL:URL{
-        return TSFileManagerTool.cacheDirectory.appendingPathComponent(self)
-    }
 }

+ 0 - 42
TSLiveWallpaper/Common/Tool/TSToastTool.swift

@@ -1,42 +0,0 @@
-//
-//  TSToastTool.swift
-//  TSLiveWallpaper
-//
-//  Created by 100Years on 2024/12/20.
-//
-
-
-import SVProgressHUD
-
-let TSToastShared = TSToastTool.shared
-
-class TSToastTool {
-    static let shared = TSToastTool()
-
-    private init() {
-        SVProgressHUD.setDefaultStyle(.dark)
-        //如果您想要堆叠 HUD,您可以使用以下方法平衡每个节目通话:
-        //[SVProgressHUD popActivity];
-    }
-
-    /// 显示文字提示
-    func showToast(text: String, duration: TimeInterval = 3.0) {
-        kExecuteOnMainThread {
-            SVProgressHUD.showInfo(withStatus: text)
-        }
-    }
-
-    /// 显示加载动画
-    func showLoading(text:String? = nil) {
-        kExecuteOnMainThread {
-            SVProgressHUD.show(withStatus: text)
-        }
-    }
-
-    /// 隐藏加载动画
-    func hideLoading() {
-        kExecuteOnMainThread {
-            SVProgressHUD.dismiss()
-        }
-    }
-}

+ 0 - 44
TSLiveWallpaper/Common/Tool/WindowHelper.swift

@@ -1,44 +0,0 @@
-//
-//  WindowHelper.swift
-//  TSLiveWallpaper
-//
-//  Created by 100Years on 2024/12/20.
-//
-
-import UIKit
-
-class WindowHelper {
-    
-    /// 获取当前窗口,兼容 iOS 13 及以上版本
-    static func getCurrentWindow() -> UIWindow? {
-        if #available(iOS 13.0, *) {
-            // iOS 13 及以上使用 `scene` 获取当前 window
-            guard let scene = UIApplication.shared.connectedScenes.first(where: { $0.activationState == .foregroundActive }) as? UIWindowScene else {
-                return nil
-            }
-            return scene.windows.first { $0.isKeyWindow }
-        } else {
-            // iOS 12 及以下直接从 keyWindow 获取
-            return UIApplication.shared.keyWindow
-        }
-    }
-    
-    /// 获取当前根视图控制器
-    static func getRootViewController() -> UIViewController? {
-        guard let window = getCurrentWindow() else {
-            return nil
-        }
-        return window.rootViewController
-    }
-    
-    /// 获取当前的视图控制器
-    static func getCurrentViewController() -> UIViewController? {
-        var currentViewController = getRootViewController()
-        
-        while let presentedViewController = currentViewController?.presentedViewController {
-            currentViewController = presentedViewController
-        }
-        
-        return currentViewController
-    }
-}

+ 0 - 291
TSLiveWallpaper/Common/View/UICollectionView+Component/CollectionViewComponent.swift

@@ -1,291 +0,0 @@
-//
-//  CollectionViewComponent.swift
-//  ClockWidget
-//
-//  Created by TSYH on 2023/7/18.
-//
-
-import UIKit
-
-public class CollectionView: UICollectionView {
-    lazy var reuseSubviews: [String: UIView] = [:]
-    
-    func cacheReuseView(_ view: UIView, reuseId: String?) {
-        guard let reuseId = reuseId, !reuseId.isEmpty else {
-            return
-        }
-        reuseSubviews[reuseId] = view
-    }
-    
-    func dequeueReuseSubviews(for reuseId: String?) -> UIView? {
-        guard let reuseId = reuseId, !reuseId.isEmpty else {
-            return nil
-        }
-        return reuseSubviews[reuseId]
-    }
-    
-    func clearReuseSubviews() {
-        reuseSubviews.removeAll()
-    }
-}
-
-public class CollectionViewComponent: NSObject {
-    var itemDidSelectedHandler: ((Any?, IndexPath) -> Void)?
-    var itemActionHandler: ((Any?, IndexPath) -> Void)?
-    
-    var itemWillDisplayHandler: ((UICollectionViewCell, Any?, IndexPath) -> Void)?
-    var itemDidEndDisplayingHandler: ((UICollectionViewCell, Any?, IndexPath) -> Void)?
-    
-    var didScrollHandler: ((UIScrollView) -> Void)?
-    var willBeginDraggingHandler: ((UIScrollView) -> Void)?
-    var didEndDraggingHandler: ((UIScrollView, Bool) -> Void)?
-    var didScrollToTopHandler: ((UIScrollView) -> Void)?
-    var willEndDraggingWithVelocityHandler: ((UIScrollView, CGPoint) -> Void)?
-    var didEndDeceleratingHandler: ((UIScrollView) -> Void)?
-    
-    var collectionView: CollectionView!
-    var attributes: [String: Any]?
-    
-    
-    
-    
-    
-    static let defaultCellID: String = "Component_Default_Cell_ID"
-    init(frame: CGRect, layout: UICollectionViewFlowLayout? = nil, attributes: [String: Any]? = nil) {
-        super.init()
-        
-        var clLayout = UICollectionViewFlowLayout()
-        if let direction = attributes?["direction"] as? UICollectionView.ScrollDirection {
-            clLayout.scrollDirection = direction
-        }
-        
-        if let layout = layout {
-            clLayout = layout
-        }
-        collectionView = CollectionView(frame: frame, collectionViewLayout: clLayout)
-        collectionView.delegate = self
-        collectionView.dataSource = self
-        collectionView.contentInsetAdjustmentBehavior = .never
-        collectionView.showsVerticalScrollIndicator = false
-        collectionView.showsHorizontalScrollIndicator = false
-        collectionView.backgroundColor = .clear
-        
-        self.attributes = attributes
-        if let showScrollIndicator = attributes?["showScrollIndicator"] as? Bool {
-            collectionView.showsHorizontalScrollIndicator = showScrollIndicator
-        }
-        
-        collectionView.register(UICollectionViewCell.self, forCellWithReuseIdentifier: Self.defaultCellID)
-    }
-    
-    lazy var dataSource = [Component]()
-    func clear() {
-        dataSource = []
-    }
-    
-    func reloadView(with components: [Component]) {
-        registerClass(components: components)
-        dataSource.append(contentsOf: components)
-        collectionView.clearReuseSubviews()
-        collectionView.reloadData()
-    }
-    
-    func reloadData() {
-        collectionView.clearReuseSubviews()
-        collectionView.reloadData()
-    }
-    
-    // 注册cell
-    private func registerClass(components: [Component]) {
-        for cp in components {
-            if let sectionCp = cp as? CollectionViewSectionComponent {
-                if let header = sectionCp.headerComponent {
-                    collectionView.register(header.viewClass, forSupplementaryViewOfKind: UICollectionView.elementKindSectionHeader, withReuseIdentifier: header.reuseIdentifier)
-                }
-                if let footer = sectionCp.footerComponent {
-                    collectionView.register(footer.viewClass, forSupplementaryViewOfKind: UICollectionView.elementKindSectionFooter, withReuseIdentifier: footer.reuseIdentifier)
-                }
-                for cellCp in sectionCp.cells {
-                    collectionView.register(cellCp.cellClass, forCellWithReuseIdentifier: cellCp.cellClass.description())
-                }
-            } else if let cellCp = cp as? CollectionViewCellComponent {
-                collectionView.register(cellCp.cellClass, forCellWithReuseIdentifier: cellCp.cellClass.description())
-            }
-        }
-    }
-}
-
-extension CollectionViewComponent {
-    private var isSectionFramework: Bool {
-        if dataSource.first is CollectionViewSectionComponent {
-            return true
-        }
-        return false
-    }
-    
-    func cellComponent(at indexPath: IndexPath) -> CollectionViewCellComponent? {
-        var cellCp: Component?
-        if isSectionFramework {
-            if indexPath.section < dataSource.count,
-                let sectionCp = dataSource[indexPath.section] as? CollectionViewSectionComponent,
-                indexPath.item < sectionCp.cells.count {
-                cellCp = sectionCp.cells[indexPath.item]
-            }
-        } else if indexPath.item < dataSource.count {
-            cellCp = dataSource[indexPath.item]
-        }
-        if let cellCp = cellCp as? CollectionViewCellComponent {
-            return cellCp
-        }
-        return nil
-    }
-}
-
-extension CollectionViewComponent: UICollectionViewDataSource {
-    
-    public func numberOfSections(in collectionView: UICollectionView) -> Int {
-        if isSectionFramework {
-            return dataSource.count
-        }
-        return 1
-    }
-    
-    public func collectionView(_ collectionView: UICollectionView, numberOfItemsInSection section: Int) -> Int {
-        if isSectionFramework {
-            if section < dataSource.count {
-                return (dataSource[section] as? CollectionViewSectionComponent)?.cells.count ?? 0
-            }
-            return 0
-        }
-        return dataSource.count
-    }
-    
-    public func collectionView(_ collectionView: UICollectionView, willDisplay cell: UICollectionViewCell, forItemAt indexPath: IndexPath) {
-        itemWillDisplayHandler?(cell, cellComponent(at: indexPath), indexPath)
-    }
-    
-    public func collectionView(_ collectionView: UICollectionView, didEndDisplaying cell: UICollectionViewCell, forItemAt indexPath: IndexPath) {
-        itemDidEndDisplayingHandler?(cell, cellComponent(at: indexPath), indexPath)
-    }
-    
-    public func collectionView(_ collectionView: UICollectionView, cellForItemAt indexPath: IndexPath) -> UICollectionViewCell {
-        guard let cellCp = cellComponent(at: indexPath) else {
-            return collectionView.dequeueReusableCell(withReuseIdentifier: Self.defaultCellID, for: indexPath)
-        }
-        
-        let cellClass = cellCp.cellClass
-        let cell = collectionView.dequeueReusableCell(withReuseIdentifier: cellClass.description(), for: indexPath)
-        if let cell = cell as? ComponentView {
-            var atts = attributes ?? [:]
-            atts["indexPath"] = indexPath
-            cell.renderView(with: cellCp, component: self, attributes: atts)
-        }
-        return cell
-    }
-    
-    public func collectionView(_ collectionView: UICollectionView, viewForSupplementaryElementOfKind kind: String, at indexPath: IndexPath) -> UICollectionReusableView {
-        guard let sectionCp = dataSource[indexPath.section] as? CollectionViewSectionComponent else {
-            return UICollectionReusableView()
-        }
-        if kind == UICollectionView.elementKindSectionHeader {
-            if let headerCp = sectionCp.headerComponent {
-                let header = collectionView.dequeueReusableSupplementaryView(ofKind: kind, withReuseIdentifier: headerCp.reuseIdentifier, for: indexPath)
-                if let headerView = header as? ComponentView {
-                    headerView.renderView(with: headerCp, component: self, attributes: attributes)
-                }
-                return header
-            }
-        } else if kind == UICollectionView.elementKindSectionFooter {
-            if let footerCp = sectionCp.headerComponent {
-                let footer = collectionView.dequeueReusableSupplementaryView(ofKind: kind, withReuseIdentifier: footerCp.reuseIdentifier, for: indexPath)
-                if let footerView = footer as? ComponentView {
-                    footerView.renderView(with: footerCp, component: self, attributes: attributes)
-                }
-                return footer
-            }
-        }
-        return UICollectionReusableView()
-    }
-}
-
-extension CollectionViewComponent: UICollectionViewDelegateFlowLayout {
-    public func collectionView(_ collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, sizeForItemAt indexPath: IndexPath) -> CGSize {
-        guard let cellCp = cellComponent(at: indexPath) else {
-            return .zero
-        }
-        return cellCp.cellSize(with: attributes)
-    }
-    
-    public func collectionView(_ collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, insetForSectionAt section: Int) -> UIEdgeInsets {
-        if isSectionFramework {
-            if section < dataSource.count {
-                return (dataSource[section] as? CollectionViewSectionComponent)?.sectionInset ?? .zero
-            }
-        }
-        return UIEdgeInsets(top: 10, left: 16, bottom: 10, right: 16)
-    }
-    
-    public func collectionView(_ collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, minimumLineSpacingForSectionAt section: Int) -> CGFloat {
-        if section < dataSource.count {
-            return (dataSource[section] as? CollectionViewSectionComponent)?.lineSpacing ?? 12.0
-        }
-        return 12.0
-    }
-    
-    public func collectionView(_ collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, minimumInteritemSpacingForSectionAt section: Int) -> CGFloat {
-        if section < dataSource.count {
-            return (dataSource[section] as? CollectionViewSectionComponent)?.itemSpacing ?? 12.0
-        }
-        return 12.0
-    }
-    
-    public func collectionView(_ collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, referenceSizeForFooterInSection section: Int) -> CGSize {
-        if isSectionFramework {
-            if section < dataSource.count,
-                let sectionCp = dataSource[section] as? CollectionViewSectionComponent {
-                return sectionCp.footerComponent?.viewSize ?? .zero
-            }
-        }
-        return .zero
-    }
-    
-    public func collectionView(_ collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, referenceSizeForHeaderInSection section: Int) -> CGSize {
-        if isSectionFramework {
-            if section < dataSource.count,
-                let sectionCp = dataSource[section] as? CollectionViewSectionComponent {
-                return sectionCp.headerComponent?.viewSize ?? .zero
-            }
-        }
-        return .zero
-    }
-}
-
-extension CollectionViewComponent: UICollectionViewDelegate {
-    public func collectionView(_ collectionView: UICollectionView, didSelectItemAt indexPath: IndexPath) {
-        itemDidSelectedHandler?(cellComponent(at: indexPath), indexPath)
-    }
-    
-    public func scrollViewDidScroll(_ scrollView: UIScrollView) {
-        didScrollHandler?(scrollView)
-    }
-    
-    public func scrollViewWillEndDragging(_ scrollView: UIScrollView, withVelocity velocity: CGPoint, targetContentOffset: UnsafeMutablePointer<CGPoint>) {
-        willEndDraggingWithVelocityHandler?(scrollView, velocity)
-    }
-    
-    public func scrollViewWillBeginDragging(_ scrollView: UIScrollView) {
-        willBeginDraggingHandler?(scrollView)
-    }
-    
-    public func scrollViewDidEndDragging(_ scrollView: UIScrollView, willDecelerate decelerate: Bool) {
-        didEndDraggingHandler?(scrollView, decelerate)
-    }
-    
-    public func scrollViewDidScrollToTop(_ scrollView: UIScrollView) {
-        didScrollToTopHandler?(scrollView)
-    }
-    
-    public func scrollViewDidEndDecelerating(_ scrollView: UIScrollView) {
-        didEndDeceleratingHandler?(scrollView)
-    }
-}

+ 0 - 63
TSLiveWallpaper/Common/View/UICollectionView+Component/CommonSectionComponent.swift

@@ -1,63 +0,0 @@
-//
-//  CommonSectionComponent.swift
-//  ClockWidget
-//
-//  Created by TSYH on 2023/10/17.
-//
-
-import UIKit
-
-class CommonSectionComponent: CollectionViewSectionComponent {
-    var cellComponents: [CollectionViewCellComponent]
-    var header: CollectionViewReuseViewComponent?
-    var footer: CollectionViewReuseViewComponent?
-    var inset: UIEdgeInsets
-    var rowSpacing: CGFloat
-    var columnSpacing: CGFloat
-    
-    init(cellComponents: [CollectionViewCellComponent],
-         header: CollectionViewReuseViewComponent? = nil,
-         footer: CollectionViewReuseViewComponent? = nil,
-         inset: UIEdgeInsets = .zero,
-         rowSpacing: CGFloat = 10.0,
-         columnSpacing: CGFloat = 10.0) {
-        self.cellComponents = cellComponents
-        self.header = header
-        self.footer = footer
-        self.inset = inset
-        self.rowSpacing = rowSpacing
-        self.columnSpacing = columnSpacing
-    }
-    
-    var cells: [CollectionViewCellComponent] {
-        return cellComponents
-    }
-    
-    var headerComponent: CollectionViewReuseViewComponent? {
-        return header
-    }
-    
-    var footerComponent: CollectionViewReuseViewComponent? {
-        return footer
-    }
-    
-    func clear() {
-        cellComponents.removeAll()
-    }
-    
-    func append(_ cellComponents: [CollectionViewCellComponent]) {
-        self.cellComponents.append(contentsOf: cellComponents)
-    }
-   
-    var sectionInset: UIEdgeInsets {
-        return inset
-    }
-    
-    var lineSpacing: CGFloat {
-        return rowSpacing
-    }
-    
-    var itemSpacing: CGFloat {
-        return columnSpacing
-    }
-}

+ 0 - 64
TSLiveWallpaper/Common/View/UICollectionView+Component/Component.swift

@@ -1,64 +0,0 @@
-//
-//  Component.swift
-//  ClockWidget
-//
-//  Created by TSYH on 2023/10/7.
-//
-
-import UIKit
-
-public protocol Component {}
-
-public protocol ComponentView {
-    // UI 渲染
-    func renderView(with object: Any?, component: CollectionViewComponent, attributes: [String: Any]?)
-}
-
-public protocol CollectionViewSectionComponent: Component {
-    var cells: [CollectionViewCellComponent] { get }
-    var headerComponent: CollectionViewReuseViewComponent? { get }
-    var footerComponent: CollectionViewReuseViewComponent? { get }
-    var sectionInset: UIEdgeInsets { get }
-    var lineSpacing: CGFloat { get }
-    var itemSpacing: CGFloat { get }
-}
-
-extension CollectionViewSectionComponent {
-    var headerComponent: CollectionViewReuseViewComponent? { return nil }
-    var footerComponent: CollectionViewReuseViewComponent? { return nil }
-    
-    var sectionInset: UIEdgeInsets {
-        return UIEdgeInsets(top: 10, left: 16, bottom: 10, right: 16)
-    }
-    
-    var lineSpacing: CGFloat {
-        return 12.0
-    }
-    
-    var itemSpacing: CGFloat {
-        return 12.0
-    }
-}
-
-public enum CollectionViewReuseViewType {
-    case header
-    case footer
-}
-
-public protocol CollectionViewReuseViewComponent: Component {
-    var viewClass: UICollectionReusableView.Type { get }
-    var viewType: CollectionViewReuseViewType { get }
-    var viewSize: CGSize { get }
-    var reuseIdentifier: String { get }
-}
-
-extension CollectionViewReuseViewComponent {
-    var reuseIdentifier: String{
-        return viewClass.description()
-    }
-}
-
-public protocol CollectionViewCellComponent: Component {
-    var cellClass: UICollectionViewCell.Type { get }
-    func cellSize(with attrubites: [String: Any]?) -> CGSize
-}

+ 0 - 164
TSLiveWallpaper/Common/View/UICollectionView+Component/UICollectionView+More.swift

@@ -1,164 +0,0 @@
-//
-//  UICollectionView+More.swift
-//  ClockWidget
-//
-//  Created by TSYH on 2023/10/7.
-//
-
-import UIKit
-import MJRefresh
-
-//extension UICollectionView {
-//    func addRefresh(handler: (() -> Void)?) {
-//        let header = MJRefreshNormalHeader {
-//            handler?()
-//        }
-//        header.lastUpdatedTimeLabel?.isHidden = true
-//        header.stateLabel?.isHidden = true
-//        header.setTitle("", for: .idle)
-//        mj_header = header
-//    }
-//    
-//    func addLoadMore(handler: (() -> Void)?) {
-//        let footer = MJRefreshAutoNormalFooter {
-//            handler?()
-//        }
-//        footer.isRefreshingTitleHidden = true
-//        footer.setTitle("", for: .idle)
-//        footer.height = 30
-//        mj_footer = footer
-//    }
-//    
-//    public override func endRefreshing(noMore: Bool = false) {
-//        mj_header?.endRefreshing()
-//        if noMore {
-//            mj_footer?.endRefreshingWithNoMoreData()
-//            (mj_footer as? MJRefreshAutoNormalFooter)?.stateLabel?.isHidden = true
-//            (mj_footer as? FeedBackRefreshFooter)?.shouldShowFeedback = true
-//        } else {
-//            mj_footer?.endRefreshing()
-//            (mj_footer as? MJRefreshAutoNormalFooter)?.stateLabel?.isHidden = false
-//            (mj_footer as? FeedBackRefreshFooter)?.shouldShowFeedback = false
-//        }
-//    }
-//}
-//
-//// Feedback footer
-//extension UICollectionView {
-//    func addFeedbackLoadMore(feedbackText: String?, handler: (() -> Void)?) {
-//        let footer = FeedBackRefreshFooter {
-//            handler?()
-//        }
-//        footer.feedbackText = feedbackText
-//        footer.isRefreshingTitleHidden = true
-//        footer.setTitle("", for: .idle)
-//        footer.height = 68
-//        mj_footer = footer
-//    }
-//}
-//
-//// Feedback footer
-//extension UITableView {
-//    func addFeedbackLoadMore(feedbackText: String?, handler: (() -> Void)?) {
-//        let footer = FeedBackRefreshFooter {
-//            handler?()
-//        }
-//        footer.feedbackText = feedbackText
-//        footer.isRefreshingTitleHidden = true
-//        footer.setTitle("", for: .idle)
-//        footer.height = 68
-//        mj_footer = footer
-//    }
-//}
-
-//class FeedBackRefreshFooter: MJRefreshAutoNormalFooter {
-////    lazy var feedbackView = FooterFeedBackView()
-//    
-//    var feedbackText: String? {
-//        didSet {
-//            feedbackView.feedbackText = feedbackText
-//        }
-//    }
-//    
-//    override init(frame: CGRect) {
-//        super.init(frame: frame)
-//        
-//        feedbackView.isHidden = true
-//        addSubview(feedbackView)
-//        feedbackView.snp.makeConstraints { make in
-//            make.leading.top.trailing.equalToSuperview()
-//            make.height.equalTo(68)
-//        }
-//    }
-//    
-//    required init?(coder: NSCoder) {
-//        fatalError("init(coder:) has not been implemented")
-//    }
-//    
-//    var shouldShowFeedback: Bool = false {
-//        didSet {
-//            feedbackView.isHidden = !shouldShowFeedback
-//        }
-//    }
-//}
-
-//class FooterFeedBackView: UIView {
-//    lazy var textLabel = UILabel()
-//    lazy var actionButton = UIButton()
-//    lazy var feedbackLabel = UILabel()
-//    lazy var arrowImageView = UIImageView()
-//    
-//    var feedbackText: String?
-//    
-//    override init(frame: CGRect) {
-//        super.init(frame: frame)
-//        
-//        backgroundColor = .clear
-//        addSubview(textLabel)
-//        addSubview(actionButton)
-//        actionButton.addSubview(feedbackLabel)
-//        actionButton.addSubview(arrowImageView)
-//        textLabel.snp.makeConstraints { make in
-//            make.centerX.equalToSuperview()
-//            make.centerY.equalToSuperview().offset(-14)
-//        }
-//        actionButton.snp.makeConstraints { make in
-//            make.centerX.equalToSuperview()
-//            make.centerY.equalToSuperview().offset(10)
-//            make.height.equalTo(20)
-//        }
-//        feedbackLabel.snp.makeConstraints { make in
-//            make.leading.equalTo(8)
-//            make.centerY.equalToSuperview()
-//        }
-//        arrowImageView.snp.makeConstraints { make in
-//            make.leading.equalTo(feedbackLabel.snp.trailing).offset(4)
-//            make.trailing.equalTo(-4)
-//            make.centerY.equalToSuperview()
-//            make.width.height.equalTo(12)
-//        }
-//        
-//        textLabel.text = "Didn't find liked?".localization()
-//        textLabel.textColor = UIColor.textDisable
-//        textLabel.font = UIFont.font(name: .Poppins, size: 12)
-//        
-//        feedbackLabel.isUserInteractionEnabled = false
-//        feedbackLabel.text = "Feedback".localization()
-//        feedbackLabel.textColor = UIColor.textAssist
-//        feedbackLabel.font = UIFont.font(name: .Poppins, size: 12)
-//        arrowImageView.image = UIImage(named: "c_arrow_right")?.mirrored()
-//        arrowImageView.isUserInteractionEnabled = false
-//        
-//        actionButton.backgroundColor = "#F3F4F7".toColor()
-//        actionButton.cornerRadius = 10
-//        actionButton.addTarget(self, action: #selector(buttonClick(_:)), for: .touchUpInside)
-//    }
-//    
-//    required init?(coder: NSCoder) {
-//        fatalError("init(coder:) has not been implemented")
-//    }
-//    
-//    @objc func buttonClick(_ sender: UIButton) {
-//        UIApplication.shared.openEmail(from: feedbackText ?? "Widget")
-//    }
-//}

+ 0 - 76
TSLiveWallpaper/Common/View/UITableView+TSItemModel/TSSimpleTableView.swift

@@ -1,76 +0,0 @@
-//
-//  TSTableView.swift
-//  TSLiveWallpaper
-//
-//  Created by 100Years on 2025/1/4.
-//
-
-
-
-class TSSimpleTableView : NSObject{
-
-    lazy var tableView:UITableView = {
-        let tableView = UITableView()
-        tableView.initBaseTableView(reuseClass: reuseClass, isUseMJRefresh: false, delegate: self)
-        return tableView
-    }()
-    
-    var reuseClass:[String] = [] {
-        didSet{
-            tableView.registerCellClass(cellIds: reuseClass)
-        }
-    }
-    
-    var dataArray:[TSBasicSectionModel] = [TSBasicSectionModel](){
-        didSet{
-            tableView.reloadData()
-        }
-    }
-
-}
-
-
-extension TSSimpleTableView : UITableViewDataSource, UITableViewDelegate {
-    
-    func numberOfSections(in tableView: UITableView) -> Int {
-        return dataArray.count
-    }
-    
-    func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
-        if let sectionModel = dataArray.safeObj(At: section){
-            return sectionModel.itemsArray.count
-        }
-        return 0
-    }
-    
-    func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat {
-        if let sectionModel = dataArray.safeObj(At: indexPath.section),let itemModel = sectionModel.itemsArray.safeObj(At: indexPath.row){
-            return itemModel.height
-        }
-        return 0
-    }
-    
-    func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
-        let cell = tableView.dequeueReusableCell(withIdentifier: "TSMineCell")!
-        
-        if let cell = cell as? TSSimpleTableViewCell {
-            if let sectionModel = dataArray.safeObj(At: indexPath.section),let itemModel = sectionModel.itemsArray.safeObj(At: indexPath.row){
-                cell.itemModel = itemModel
-            }
-        }
-        
-        return cell
-    }
-    
-    func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
-        if let sectionModel = dataArray.safeObj(At: indexPath.section),let itemModel = sectionModel.itemsArray.safeObj(At: indexPath.row){
-            itemModel.tapBlock?(itemModel,indexPath.row,nil)
-        }
-    }
-}
-
-
-class TSSimpleTableViewCell: TSBaseTabViewCell {
-    var itemModel:TSBasicItemModel = TSBasicItemModel()
- 
-}

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

@@ -4,61 +4,6 @@
 //
 //  Created by 100Years on 2024/12/20.
 //
-class TSConfig: NSObject {
-    static let appLanguage: String = {
-        let systemLanguages = UserDefaults.standard.value(forKey: "AppleLanguages")
-        var currentLanguage: String?
-        if let arr = systemLanguages as? [String] {
-            currentLanguage = arr.first
-        }
-        else if let str = systemLanguages as? String {
-            currentLanguage = str
-        }
-        return currentLanguage ?? ""
-    }()
-    
-    static let appLanguageShort: String? = {
-        let currentLanguage = Bundle.main.preferredLocalizations.first
-        if let str = currentLanguage?.components(separatedBy: "-").first,
-           str.count >= 2 {
-            return str
-        }
-        return nil
-    }()
-    
-    static let isLanguageZh: Bool = {
-        if appLanguage.lowercased().hasPrefix("zh") {
-            return true
-        }
-        return false
-    }()
-    
-    static let isLanguageJa: Bool = {
-        if appLanguage.lowercased().hasPrefix("ja") {
-            return true
-        }
-        return false
-    }()
-    
-    static var languageSuffix: String {
-        if appLanguage.lowercased().hasPrefix("zh") {
-            return "-zh"
-        }
-        return ""
-    }
-    
-    static var isChinaRegion: Bool {
-#if DEBUG
-        return true
-#endif
-        let localeId = Locale.current.identifier
-        return localeId.contains("_CN")
-    }
-    
-    static let appid = "6447607955" 
-
-}
-
 
 extension UIColor {
     /// 背景色

+ 4 - 4
TSLiveWallpaper/DataManger/TSHomeDataModel.swift

@@ -26,7 +26,7 @@ class TSHomeBannerDataSectionModel: TSBaseModel {
 }
 
 
-extension TSHomeBannerDataSectionModel : CollectionViewSectionComponent{
+extension TSHomeBannerDataSectionModel : TSCollectionViewSectionComponent{
     var sectionInset: UIEdgeInsets {
         return style.sectionInset
     }
@@ -38,10 +38,10 @@ extension TSHomeBannerDataSectionModel : CollectionViewSectionComponent{
     var itemSpacing: CGFloat {
         return style.itemSpacing
     }
-    var headerComponent: CollectionViewReuseViewComponent? {
+    var headerComponent: TSCollectionViewReuseViewComponent? {
         nil
     }
-    var cells: [CollectionViewCellComponent] {
+    var cells: [TSCollectionViewCellComponent] {
         return itemModels
     }
 }
@@ -69,7 +69,7 @@ class TSHomeBannerDataItemModel: TSBaseModel {
     
 }
 
-extension TSHomeBannerDataItemModel : CollectionViewCellComponent {
+extension TSHomeBannerDataItemModel : TSCollectionViewCellComponent {
     
     var cellClass: UICollectionViewCell.Type {
         style.cellClass

+ 6 - 6
TSLiveWallpaper/DataManger/TSImageDataCenter.swift

@@ -262,7 +262,7 @@ class TSImageDataSectionModel: TSBaseModel {
     
 }
 
-extension TSImageDataSectionModel : CollectionViewSectionComponent{
+extension TSImageDataSectionModel : TSCollectionViewSectionComponent{
     
     var sectionInset: UIEdgeInsets {
         return style.sectionInset
@@ -275,11 +275,11 @@ extension TSImageDataSectionModel : CollectionViewSectionComponent{
     var itemSpacing: CGFloat {
         return style.itemSpacing
     }
-    var headerComponent: CollectionViewReuseViewComponent? {
+    var headerComponent: TSCollectionViewReuseViewComponent? {
         return TSComponentReuseViewModel(sectionModel: self)
     }
     
-    var cells: [CollectionViewCellComponent] {
+    var cells: [TSCollectionViewCellComponent] {
         
         if style == .homeLiveBanner {//用分区头来展示 banner
             return []
@@ -306,7 +306,7 @@ class TSImageDataItemModel: TSBaseModel {
     
 }
 
-extension TSImageDataItemModel: CollectionViewCellComponent {
+extension TSImageDataItemModel: TSCollectionViewCellComponent {
     var cellClass: UICollectionViewCell.Type {
         style.cellClass
     }
@@ -318,7 +318,7 @@ extension TSImageDataItemModel: CollectionViewCellComponent {
 
 
 // 头部标题
-class TSComponentReuseViewModel : TSBaseModel ,CollectionViewReuseViewComponent {
+class TSComponentReuseViewModel : TSBaseModel ,TSCollectionViewReuseViewComponent {
     var sectionModel:TSImageDataSectionModel
 
     init(sectionModel:TSImageDataSectionModel) {
@@ -349,7 +349,7 @@ class TSComponentReuseViewModel : TSBaseModel ,CollectionViewReuseViewComponent
         return sectionModel.style.headerViewSize
     }
     
-    var viewType: CollectionViewReuseViewType {
+    var viewType: TSCollectionViewReuseViewType {
         return .header
     }
 }

+ 4 - 4
TSLiveWallpaper/DataManger/TSRandomWallpaperModel.swift

@@ -27,7 +27,7 @@ class TSRandomWallpaperDataSectionModel: TSBaseModel {
 }
 
 
-extension TSRandomWallpaperDataSectionModel : CollectionViewSectionComponent{
+extension TSRandomWallpaperDataSectionModel : TSCollectionViewSectionComponent{
     var sectionInset: UIEdgeInsets {
         return style.sectionInset
     }
@@ -39,10 +39,10 @@ extension TSRandomWallpaperDataSectionModel : CollectionViewSectionComponent{
     var itemSpacing: CGFloat {
         return style.itemSpacing
     }
-    var headerComponent: CollectionViewReuseViewComponent? {
+    var headerComponent: TSCollectionViewReuseViewComponent? {
         nil
     }
-    var cells: [CollectionViewCellComponent] {
+    var cells: [TSCollectionViewCellComponent] {
         return itemModels
     }
 }
@@ -70,7 +70,7 @@ class TSRandomWallpaperDataItemModel: TSBaseModel {
     
 }
 
-extension TSRandomWallpaperDataItemModel : CollectionViewCellComponent {
+extension TSRandomWallpaperDataItemModel : TSCollectionViewCellComponent {
     
     var cellClass: UICollectionViewCell.Type {
         style.cellClass