Переглянути джерело

TSSmallCocoapod 去除无用的类和方法

kln 1 тиждень тому
батько
коміт
cf0bd6e947
68 змінених файлів з 157 додано та 4630 видалено
  1. 5 165
      AIPlayRingtones.xcodeproj/project.pbxproj
  2. 1 1
      AIPlayRingtones/AppPage/APAudioToRingVC/VM/APAudioToRingVM.swift
  3. 1 1
      AIPlayRingtones/AppPage/APAudioToRingVC/View/ASRTRStyleView.swift
  4. 3 3
      AIPlayRingtones/AppPage/APMyRingVC/ASMyRingVC.swift
  5. 2 2
      AIPlayRingtones/AppPage/APRingTonesVC/APRingStyleVC/APRingStyleVC.swift
  6. 1 1
      AIPlayRingtones/AppPage/APRingTonesVC/APRingTonesVC/VM/APRingTonesVM.swift
  7. 1 1
      AIPlayRingtones/AppPage/APRingTonesVC/APRingTonesVC/View/ASDurationColView.swift
  8. 3 3
      AIPlayRingtones/AppPage/APRingTonesVC/APRingTonesVC/View/ASPromptTextView.swift
  9. 3 3
      AIPlayRingtones/AppPage/APSettingVC/APSettingVC+Col.swift
  10. 2 2
      AIPlayRingtones/AppPage/ASRingGeneratorVC/ASRingGeneratorBaseVC.swift
  11. 14 14
      AIPlayRingtones/AppPage/ASTabBarVC/ASTabBarVC.swift
  12. 7 60
      AIPlayRingtones/Classes/BaseClass/TSBaseCollectionCell.swift
  13. 1 1
      AIPlayRingtones/Classes/BaseClass/TSBaseNavigationBarView.swift
  14. 0 78
      AIPlayRingtones/Classes/Ex/AVAsset+Ex.swift
  15. 1 33
      AIPlayRingtones/Classes/Ex/Array+Ex.swift
  16. 0 32
      AIPlayRingtones/Classes/Ex/Bundle+Ex.swift
  17. 0 31
      AIPlayRingtones/Classes/Ex/CGFloat+Ex.swift
  18. 2 32
      AIPlayRingtones/Classes/Ex/Date+Ex.swift
  19. 0 61
      AIPlayRingtones/Classes/Ex/Dictionary+Ex.swift
  20. 0 98
      AIPlayRingtones/Classes/Ex/Int+Ex.swift
  21. 2 336
      AIPlayRingtones/Classes/Ex/NSString+Ex.swift
  22. 0 49
      AIPlayRingtones/Classes/Ex/UIApplication+Ex.swift
  23. 1 21
      AIPlayRingtones/Classes/Ex/UIButton+Ex.swift
  24. 0 40
      AIPlayRingtones/Classes/Ex/UIColor+Ex.swift
  25. 0 128
      AIPlayRingtones/Classes/Ex/UIDevice+Extension.swift
  26. 1 11
      AIPlayRingtones/Classes/Ex/UIFont+Ex.swift
  27. 0 262
      AIPlayRingtones/Classes/Ex/UIImage+Ex.swift
  28. 1 134
      AIPlayRingtones/Classes/Ex/UIImageView+Ex.swift
  29. 0 89
      AIPlayRingtones/Classes/Ex/UILabel+Ex.swift
  30. 0 43
      AIPlayRingtones/Classes/Ex/UIScreen.swift
  31. 0 196
      AIPlayRingtones/Classes/Ex/UITableView+Ex.swift
  32. 0 7
      AIPlayRingtones/Classes/Ex/UITextView+Ex.swift
  33. 0 299
      AIPlayRingtones/Classes/Ex/UIView+Ex.swift
  34. 0 14
      AIPlayRingtones/Classes/Ex/UIView+Frame.swift
  35. 0 24
      AIPlayRingtones/Classes/Ex/UIView+Rotating.swift
  36. 1 97
      AIPlayRingtones/Classes/Ex/UIViewController+Ex.swift
  37. 0 30
      AIPlayRingtones/Classes/Ex/UserDefault+Ex.swift
  38. 7 27
      AIPlayRingtones/Classes/GlobalImports/GlobalImports.swift
  39. 0 147
      AIPlayRingtones/Classes/Tool/PhotoManager.swift
  40. 0 63
      AIPlayRingtones/Classes/Tool/SVProgressHUD+Ex.swift
  41. 0 182
      AIPlayRingtones/Classes/Tool/TSCommonTool/TSCommonTool+Down.swift
  42. 0 89
      AIPlayRingtones/Classes/Tool/TSCommonTool/TSCommonTool+MultDown.swift
  43. 0 191
      AIPlayRingtones/Classes/Tool/TSCommonTool/TSCommonTool.swift
  44. 0 83
      AIPlayRingtones/Classes/Tool/TSCommonTool/TSMultiTaskDownloader.swift
  45. 0 111
      AIPlayRingtones/Classes/Tool/TSDownloadManager.swift
  46. 0 50
      AIPlayRingtones/Classes/Tool/TSGCDTimer.swift
  47. 0 190
      AIPlayRingtones/Classes/Tool/TSImageCompress.swift
  48. 0 40
      AIPlayRingtones/Classes/Tool/TSNetworkTool.swift
  49. 0 0
      AIPlayRingtones/Classes/Tool/TSRandomTextTool.swift
  50. 0 107
      AIPlayRingtones/Classes/Tool/TSToastTool.swift
  51. 0 7
      AIPlayRingtones/Classes/Tool/WindowHelper.swift
  52. 0 120
      AIPlayRingtones/Classes/View/TSCircularProgressView.swift
  53. 0 68
      AIPlayRingtones/Classes/View/TSProgressSlider/TSProgressSlider.swift
  54. 3 5
      AIPlayRingtones/Classes/View/TopLeftLabel.swift
  55. 0 310
      AIPlayRingtones/Classes/View/UICollectionView+Component/CollectionViewComponent.swift
  56. 0 63
      AIPlayRingtones/Classes/View/UICollectionView+Component/CommonSectionComponent.swift
  57. 0 64
      AIPlayRingtones/Classes/View/UICollectionView+Component/Component.swift
  58. 0 148
      AIPlayRingtones/Classes/View/UIStackView/KLMultiScrollContainer.swift
  59. 0 1
      AIPlayRingtones/Classes/View/UIStackView/TSCustomStackView.swift
  60. 0 83
      AIPlayRingtones/Classes/View/UITableView+TSItemModel/TSSimpleTableView.swift
  61. 0 7
      AIPlayRingtones/Common/AIEnums.swift
  62. 0 50
      AIPlayRingtones/Common/ASBusinessFileManager.swift
  63. 82 0
      AIPlayRingtones/Common/Common.swift
  64. 0 10
      AIPlayRingtones/Common/Ex/UIFont+TSEx.swift
  65. 2 3
      AIPlayRingtones/Common/TSNetWork/TSNetworkManager.swift
  66. 6 6
      AIPlayRingtones/CommonView/ASRingToneCellView.swift
  67. 2 2
      AIPlayRingtones/CommonView/ASViewTool.swift
  68. 2 1
      AIPlayRingtones/OperationQueue/Generate/ASGenerateTextToRingOperation.swift

+ 5 - 165
AIPlayRingtones.xcodeproj/project.pbxproj

@@ -18,76 +18,47 @@
 		3DB4D4A52DDC8E830082596A /* APSettingVC+Col.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3DB4D4A42DDC8E7B0082596A /* APSettingVC+Col.swift */; };
 		3DB4D4A82DDC92560082596A /* ASBusinessWebVC.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3DB4D4A72DDC92530082596A /* ASBusinessWebVC.swift */; };
 		3DB4D4AA2DDDCEA50082596A /* Poppins-BoldItalic.otf in Resources */ = {isa = PBXBuildFile; fileRef = 3DB4D4A92DDDCEA50082596A /* Poppins-BoldItalic.otf */; };
-		3DB4D4AE2DDDCED00082596A /* UIFont+TSEx.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3DB4D4AB2DDDCED00082596A /* UIFont+TSEx.swift */; };
 		3DB4D4B22DDF0B960082596A /* FakeBlurView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3DB4D4B12DDF0B940082596A /* FakeBlurView.swift */; };
 		3DB4D4B52DE025920082596A /* ASTutorialsVC.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3DB4D4B42DE025910082596A /* ASTutorialsVC.swift */; };
-		3DBEA0C92DE69B2E000C6859 /* TSToastTool.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3DBEA0AE2DE69B2E000C6859 /* TSToastTool.swift */; };
-		3DBEA0CA2DE69B2E000C6859 /* KLMultiScrollContainer.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3DBEA0BF2DE69B2E000C6859 /* KLMultiScrollContainer.swift */; };
 		3DBEA0CB2DE69B2E000C6859 /* UIImage+Ex.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3DBEA0902DE69B2E000C6859 /* UIImage+Ex.swift */; };
 		3DBEA0CC2DE69B2E000C6859 /* TSBusinessFileManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3DBEA0A62DE69B2E000C6859 /* TSBusinessFileManager.swift */; };
 		3DBEA0CD2DE69B2E000C6859 /* TSSaveSuccessTool.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3DBEA0B72DE69B2E000C6859 /* TSSaveSuccessTool.swift */; };
 		3DBEA0CE2DE69B2E000C6859 /* TSSimpleCollectionView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3DBEA0B52DE69B2E000C6859 /* TSSimpleCollectionView.swift */; };
 		3DBEA0CF2DE69B2E000C6859 /* WindowHelper.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3DBEA0AF2DE69B2E000C6859 /* WindowHelper.swift */; };
-		3DBEA0D02DE69B2E000C6859 /* Bundle+Ex.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3DBEA0852DE69B2E000C6859 /* Bundle+Ex.swift */; };
 		3DBEA0D12DE69B2E000C6859 /* TSBasicItemModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3DBEA07A2DE69B2E000C6859 /* TSBasicItemModel.swift */; };
 		3DBEA0D22DE69B2E000C6859 /* Array+Ex.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3DBEA0832DE69B2E000C6859 /* Array+Ex.swift */; };
-		3DBEA0D32DE69B2E000C6859 /* TSSimpleTableView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3DBEA0C22DE69B2E000C6859 /* TSSimpleTableView.swift */; };
-		3DBEA0D42DE69B2E000C6859 /* TSCommonTool+Down.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3DBEA09F2DE69B2E000C6859 /* TSCommonTool+Down.swift */; };
-		3DBEA0D52DE69B2E000C6859 /* TSDownloadManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3DBEA0A92DE69B2E000C6859 /* TSDownloadManager.swift */; };
-		3DBEA0D62DE69B2E000C6859 /* AVAsset+Ex.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3DBEA0842DE69B2E000C6859 /* AVAsset+Ex.swift */; };
-		3DBEA0D72DE69B2E000C6859 /* UITableView+Ex.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3DBEA0942DE69B2E000C6859 /* UITableView+Ex.swift */; };
 		3DBEA0D82DE69B2E000C6859 /* TSBaseModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3DBEA0732DE69B2E000C6859 /* TSBaseModel.swift */; };
 		3DBEA0D92DE69B2E000C6859 /* UIImageView+Ex.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3DBEA0912DE69B2E000C6859 /* UIImageView+Ex.swift */; };
-		3DBEA0DA2DE69B2E000C6859 /* CommonSectionComponent.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3DBEA0BA2DE69B2E000C6859 /* CommonSectionComponent.swift */; };
 		3DBEA0DC2DE69B2E000C6859 /* TSBaseNavigationC.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3DBEA0752DE69B2E000C6859 /* TSBaseNavigationC.swift */; };
-		3DBEA0DD2DE69B2E000C6859 /* SVProgressHUD+Ex.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3DBEA0A52DE69B2E000C6859 /* SVProgressHUD+Ex.swift */; };
-		3DBEA0DE2DE69B2E000C6859 /* TSCommonTool.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3DBEA09E2DE69B2E000C6859 /* TSCommonTool.swift */; };
-		3DBEA0DF2DE69B2E000C6859 /* UIScreen.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3DBEA0932DE69B2E000C6859 /* UIScreen.swift */; };
 		3DBEA0E02DE69B2E000C6859 /* TSBaseTabViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3DBEA0762DE69B2E000C6859 /* TSBaseTabViewCell.swift */; };
 		3DBEA0E12DE69B2E000C6859 /* Color+Ex.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3DBEA07F2DE69B2E000C6859 /* Color+Ex.swift */; };
-		3DBEA0E22DE69B2E000C6859 /* UIApplication+Ex.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3DBEA08B2DE69B2E000C6859 /* UIApplication+Ex.swift */; };
-		3DBEA0E32DE69B2E000C6859 /* UserDefault+Ex.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3DBEA09A2DE69B2E000C6859 /* UserDefault+Ex.swift */; };
-		3DBEA0E42DE69B2E000C6859 /* UIDevice+Extension.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3DBEA08E2DE69B2E000C6859 /* UIDevice+Extension.swift */; };
-		3DBEA0E52DE69B2E000C6859 /* TSMultiTaskDownloader.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3DBEA0A12DE69B2E000C6859 /* TSMultiTaskDownloader.swift */; };
-		3DBEA0E62DE69B2E000C6859 /* CollectionViewComponent.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3DBEA0B92DE69B2E000C6859 /* CollectionViewComponent.swift */; };
-		3DBEA0E72DE69B2E000C6859 /* Int+Ex.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3DBEA0892DE69B2E000C6859 /* Int+Ex.swift */; };
 		3DBEA0E82DE69B2E000C6859 /* UIView+Ex.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3DBEA0962DE69B2E000C6859 /* UIView+Ex.swift */; };
 		3DBEA0E92DE69B2E000C6859 /* TSBaseVC.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3DBEA0772DE69B2E000C6859 /* TSBaseVC.swift */; };
 		3DBEA0EA2DE69B2E000C6859 /* UIView+Rotating.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3DBEA0982DE69B2E000C6859 /* UIView+Rotating.swift */; };
 		3DBEA0EB2DE69B2E000C6859 /* Text+Ex.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3DBEA0812DE69B2E000C6859 /* Text+Ex.swift */; };
 		3DBEA0EC2DE69B2E000C6859 /* UILabel+Ex.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3DBEA0922DE69B2E000C6859 /* UILabel+Ex.swift */; };
 		3DBEA0ED2DE69B2E000C6859 /* TSBaseCollectionCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3DBEA0722DE69B2E000C6859 /* TSBaseCollectionCell.swift */; };
-		3DBEA0EE2DE69B2E000C6859 /* PhotoManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3DBEA0A42DE69B2E000C6859 /* PhotoManager.swift */; };
 		3DBEA0EF2DE69B2E000C6859 /* UIColor+Ex.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3DBEA08D2DE69B2E000C6859 /* UIColor+Ex.swift */; };
 		3DBEA0F02DE69B2E000C6859 /* Font+Ex.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3DBEA0802DE69B2E000C6859 /* Font+Ex.swift */; };
 		3DBEA0F12DE69B2E000C6859 /* TSFileManagerTool.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3DBEA0AA2DE69B2E000C6859 /* TSFileManagerTool.swift */; };
-		3DBEA0F22DE69B2E000C6859 /* TSCircularProgressView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3DBEA0C42DE69B2E000C6859 /* TSCircularProgressView.swift */; };
 		3DBEA0F32DE69B2E000C6859 /* TSRandomTextTool.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3DBEA0A22DE69B2E000C6859 /* TSRandomTextTool.swift */; };
 		3DBEA0F42DE69B2E000C6859 /* TSBaseView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3DBEA0782DE69B2E000C6859 /* TSBaseView.swift */; };
 		3DBEA0F52DE69B2E000C6859 /* TSBaseViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3DBEA0792DE69B2E000C6859 /* TSBaseViewModel.swift */; };
 		3DBEA0F62DE69B2E000C6859 /* TSCustomAlertController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3DBEA0A82DE69B2E000C6859 /* TSCustomAlertController.swift */; };
-		3DBEA0F72DE69B2E000C6859 /* TSImageCompress.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3DBEA0AC2DE69B2E000C6859 /* TSImageCompress.swift */; };
-		3DBEA0F82DE69B2E000C6859 /* TSGCDTimer.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3DBEA0AB2DE69B2E000C6859 /* TSGCDTimer.swift */; };
 		3DBEA0FA2DE69B2E000C6859 /* TSBaseNavigationBarView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3DBEA0742DE69B2E000C6859 /* TSBaseNavigationBarView.swift */; };
-		3DBEA0FB2DE69B2E000C6859 /* UITextView+Ex.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3DBEA0952DE69B2E000C6859 /* UITextView+Ex.swift */; };
 		3DBEA0FC2DE69B2E000C6859 /* UIFont+Ex.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3DBEA08F2DE69B2E000C6859 /* UIFont+Ex.swift */; };
-		3DBEA0FD2DE69B2E000C6859 /* TSCommonTool+MultDown.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3DBEA0A02DE69B2E000C6859 /* TSCommonTool+MultDown.swift */; };
 		3DBEA0FE2DE69B2E000C6859 /* UIButton+Ex.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3DBEA08C2DE69B2E000C6859 /* UIButton+Ex.swift */; };
 		3DBEA0FF2DE69B2E000C6859 /* TSCustomStackView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3DBEA0C02DE69B2E000C6859 /* TSCustomStackView.swift */; };
 		3DBEA1002DE69B2E000C6859 /* UIViewController+Ex.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3DBEA0992DE69B2E000C6859 /* UIViewController+Ex.swift */; };
 		3DBEA1012DE69B2E000C6859 /* Date+Ex.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3DBEA0872DE69B2E000C6859 /* Date+Ex.swift */; };
-		3DBEA1022DE69B2E000C6859 /* TSNetworkTool.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3DBEA0AD2DE69B2E000C6859 /* TSNetworkTool.swift */; };
 		3DBEA1032DE69B2E000C6859 /* NSString+Ex.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3DBEA08A2DE69B2E000C6859 /* NSString+Ex.swift */; };
-		3DBEA1042DE69B2E000C6859 /* Dictionary+Ex.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3DBEA0882DE69B2E000C6859 /* Dictionary+Ex.swift */; };
-		3DBEA1052DE69B2E000C6859 /* PaddedLabel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3DBEA0BD2DE69B2E000C6859 /* PaddedLabel.swift */; };
 		3DBEA1062DE69B2E000C6859 /* GlobalImports.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3DBEA09C2DE69B2E000C6859 /* GlobalImports.swift */; };
 		3DBEA1072DE69B2E000C6859 /* TSPlaceholderTextView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3DBEA0B12DE69B2E000C6859 /* TSPlaceholderTextView.swift */; };
 		3DBEA1082DE69B2E000C6859 /* UIView+Frame.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3DBEA0972DE69B2E000C6859 /* UIView+Frame.swift */; };
 		3DBEA1092DE69B2E000C6859 /* CGFloat+Ex.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3DBEA0862DE69B2E000C6859 /* CGFloat+Ex.swift */; };
-		3DBEA10A2DE69B2E000C6859 /* TSProgressSlider.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3DBEA0B32DE69B2E000C6859 /* TSProgressSlider.swift */; };
 		3DBEA10B2DE69B2E000C6859 /* TSCollectionViewObserver.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3DBEA0A72DE69B2E000C6859 /* TSCollectionViewObserver.swift */; };
-		3DBEA10C2DE69B2E000C6859 /* Component.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3DBEA0BB2DE69B2E000C6859 /* Component.swift */; };
 		3DBEA1102DE6A04B000C6859 /* SimpleWebViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 3DBEA10F2DE6A04B000C6859 /* SimpleWebViewController.m */; };
+		3DBEA1122DE6A3AA000C6859 /* TopLeftLabel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3DBEA1112DE6A3A6000C6859 /* TopLeftLabel.swift */; };
 		3DCD56F32DDAE3E3004AAB5B /* ASRingToneCellView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3DCD56F22DDAE3DF004AAB5B /* ASRingToneCellView.swift */; };
 		3DCD56F52DDAE42A004AAB5B /* ASViewTool.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3DCD56F42DDAE421004AAB5B /* ASViewTool.swift */; };
 		3DCD56F92DDAE481004AAB5B /* TSBusinessAudioPlayer.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3DCD56F62DDAE481004AAB5B /* TSBusinessAudioPlayer.swift */; };
@@ -126,7 +97,6 @@
 		A848F8862DD6D1AF00B746EC /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = A848F8782DD6D1AF00B746EC /* AppDelegate.swift */; };
 		A848F88E2DD6D38600B746EC /* APLaunchVC.swift in Sources */ = {isa = PBXBuildFile; fileRef = A848F88D2DD6D38300B746EC /* APLaunchVC.swift */; };
 		A848F8912DD6D50000B746EC /* Common.swift in Sources */ = {isa = PBXBuildFile; fileRef = A848F8902DD6D4FD00B746EC /* Common.swift */; };
-		A848F8932DD6D52100B746EC /* AIEnums.swift in Sources */ = {isa = PBXBuildFile; fileRef = A848F8922DD6D51900B746EC /* AIEnums.swift */; };
 		A848F89E2DD6D59C00B746EC /* TSNetWork+Business.swift in Sources */ = {isa = PBXBuildFile; fileRef = A848F89A2DD6D59C00B746EC /* TSNetWork+Business.swift */; };
 		A848F89F2DD6D59C00B746EC /* TSNetworkManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = A848F8992DD6D59C00B746EC /* TSNetworkManager.swift */; };
 		A848F8A42DD6D67000B746EC /* APRingTonesVC.swift in Sources */ = {isa = PBXBuildFile; fileRef = A848F8A32DD6D66D00B746EC /* APRingTonesVC.swift */; };
@@ -176,7 +146,6 @@
 		3DB4D4A42DDC8E7B0082596A /* APSettingVC+Col.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "APSettingVC+Col.swift"; sourceTree = "<group>"; };
 		3DB4D4A72DDC92530082596A /* ASBusinessWebVC.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ASBusinessWebVC.swift; sourceTree = "<group>"; };
 		3DB4D4A92DDDCEA50082596A /* Poppins-BoldItalic.otf */ = {isa = PBXFileReference; lastKnownFileType = file; path = "Poppins-BoldItalic.otf"; sourceTree = "<group>"; };
-		3DB4D4AB2DDDCED00082596A /* UIFont+TSEx.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "UIFont+TSEx.swift"; sourceTree = "<group>"; };
 		3DB4D4B12DDF0B940082596A /* FakeBlurView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FakeBlurView.swift; sourceTree = "<group>"; };
 		3DB4D4B42DE025910082596A /* ASTutorialsVC.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ASTutorialsVC.swift; sourceTree = "<group>"; };
 		3DBEA0722DE69B2E000C6859 /* TSBaseCollectionCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TSBaseCollectionCell.swift; sourceTree = "<group>"; };
@@ -192,61 +161,33 @@
 		3DBEA0802DE69B2E000C6859 /* Font+Ex.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "Font+Ex.swift"; sourceTree = "<group>"; };
 		3DBEA0812DE69B2E000C6859 /* Text+Ex.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "Text+Ex.swift"; sourceTree = "<group>"; };
 		3DBEA0832DE69B2E000C6859 /* Array+Ex.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "Array+Ex.swift"; sourceTree = "<group>"; };
-		3DBEA0842DE69B2E000C6859 /* AVAsset+Ex.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "AVAsset+Ex.swift"; sourceTree = "<group>"; };
-		3DBEA0852DE69B2E000C6859 /* Bundle+Ex.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "Bundle+Ex.swift"; sourceTree = "<group>"; };
 		3DBEA0862DE69B2E000C6859 /* CGFloat+Ex.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "CGFloat+Ex.swift"; sourceTree = "<group>"; };
 		3DBEA0872DE69B2E000C6859 /* Date+Ex.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "Date+Ex.swift"; sourceTree = "<group>"; };
-		3DBEA0882DE69B2E000C6859 /* Dictionary+Ex.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "Dictionary+Ex.swift"; sourceTree = "<group>"; };
-		3DBEA0892DE69B2E000C6859 /* Int+Ex.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "Int+Ex.swift"; sourceTree = "<group>"; };
 		3DBEA08A2DE69B2E000C6859 /* NSString+Ex.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "NSString+Ex.swift"; sourceTree = "<group>"; };
-		3DBEA08B2DE69B2E000C6859 /* UIApplication+Ex.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "UIApplication+Ex.swift"; sourceTree = "<group>"; };
 		3DBEA08C2DE69B2E000C6859 /* UIButton+Ex.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "UIButton+Ex.swift"; sourceTree = "<group>"; };
 		3DBEA08D2DE69B2E000C6859 /* UIColor+Ex.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "UIColor+Ex.swift"; sourceTree = "<group>"; };
-		3DBEA08E2DE69B2E000C6859 /* UIDevice+Extension.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "UIDevice+Extension.swift"; sourceTree = "<group>"; };
 		3DBEA08F2DE69B2E000C6859 /* UIFont+Ex.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "UIFont+Ex.swift"; sourceTree = "<group>"; };
 		3DBEA0902DE69B2E000C6859 /* UIImage+Ex.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "UIImage+Ex.swift"; sourceTree = "<group>"; };
 		3DBEA0912DE69B2E000C6859 /* UIImageView+Ex.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "UIImageView+Ex.swift"; sourceTree = "<group>"; };
 		3DBEA0922DE69B2E000C6859 /* UILabel+Ex.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "UILabel+Ex.swift"; sourceTree = "<group>"; };
-		3DBEA0932DE69B2E000C6859 /* UIScreen.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UIScreen.swift; sourceTree = "<group>"; };
-		3DBEA0942DE69B2E000C6859 /* UITableView+Ex.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "UITableView+Ex.swift"; sourceTree = "<group>"; };
-		3DBEA0952DE69B2E000C6859 /* UITextView+Ex.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "UITextView+Ex.swift"; sourceTree = "<group>"; };
 		3DBEA0962DE69B2E000C6859 /* UIView+Ex.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "UIView+Ex.swift"; sourceTree = "<group>"; };
 		3DBEA0972DE69B2E000C6859 /* UIView+Frame.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "UIView+Frame.swift"; sourceTree = "<group>"; };
 		3DBEA0982DE69B2E000C6859 /* UIView+Rotating.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "UIView+Rotating.swift"; sourceTree = "<group>"; };
 		3DBEA0992DE69B2E000C6859 /* UIViewController+Ex.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "UIViewController+Ex.swift"; sourceTree = "<group>"; };
-		3DBEA09A2DE69B2E000C6859 /* UserDefault+Ex.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "UserDefault+Ex.swift"; sourceTree = "<group>"; };
 		3DBEA09C2DE69B2E000C6859 /* GlobalImports.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = GlobalImports.swift; sourceTree = "<group>"; };
-		3DBEA09E2DE69B2E000C6859 /* TSCommonTool.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TSCommonTool.swift; sourceTree = "<group>"; };
-		3DBEA09F2DE69B2E000C6859 /* TSCommonTool+Down.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "TSCommonTool+Down.swift"; sourceTree = "<group>"; };
-		3DBEA0A02DE69B2E000C6859 /* TSCommonTool+MultDown.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "TSCommonTool+MultDown.swift"; sourceTree = "<group>"; };
-		3DBEA0A12DE69B2E000C6859 /* TSMultiTaskDownloader.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TSMultiTaskDownloader.swift; sourceTree = "<group>"; };
 		3DBEA0A22DE69B2E000C6859 /* TSRandomTextTool.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TSRandomTextTool.swift; sourceTree = "<group>"; };
-		3DBEA0A42DE69B2E000C6859 /* PhotoManager.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PhotoManager.swift; sourceTree = "<group>"; };
-		3DBEA0A52DE69B2E000C6859 /* SVProgressHUD+Ex.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "SVProgressHUD+Ex.swift"; sourceTree = "<group>"; };
 		3DBEA0A62DE69B2E000C6859 /* TSBusinessFileManager.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TSBusinessFileManager.swift; sourceTree = "<group>"; };
 		3DBEA0A72DE69B2E000C6859 /* TSCollectionViewObserver.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TSCollectionViewObserver.swift; sourceTree = "<group>"; };
 		3DBEA0A82DE69B2E000C6859 /* TSCustomAlertController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TSCustomAlertController.swift; sourceTree = "<group>"; };
-		3DBEA0A92DE69B2E000C6859 /* TSDownloadManager.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TSDownloadManager.swift; sourceTree = "<group>"; };
 		3DBEA0AA2DE69B2E000C6859 /* TSFileManagerTool.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TSFileManagerTool.swift; sourceTree = "<group>"; };
-		3DBEA0AB2DE69B2E000C6859 /* TSGCDTimer.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TSGCDTimer.swift; sourceTree = "<group>"; };
-		3DBEA0AC2DE69B2E000C6859 /* TSImageCompress.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TSImageCompress.swift; sourceTree = "<group>"; };
-		3DBEA0AD2DE69B2E000C6859 /* TSNetworkTool.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TSNetworkTool.swift; sourceTree = "<group>"; };
-		3DBEA0AE2DE69B2E000C6859 /* TSToastTool.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TSToastTool.swift; sourceTree = "<group>"; };
 		3DBEA0AF2DE69B2E000C6859 /* WindowHelper.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = WindowHelper.swift; sourceTree = "<group>"; };
 		3DBEA0B12DE69B2E000C6859 /* TSPlaceholderTextView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TSPlaceholderTextView.swift; sourceTree = "<group>"; };
-		3DBEA0B32DE69B2E000C6859 /* TSProgressSlider.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TSProgressSlider.swift; sourceTree = "<group>"; };
 		3DBEA0B52DE69B2E000C6859 /* TSSimpleCollectionView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TSSimpleCollectionView.swift; sourceTree = "<group>"; };
 		3DBEA0B72DE69B2E000C6859 /* TSSaveSuccessTool.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TSSaveSuccessTool.swift; sourceTree = "<group>"; };
-		3DBEA0B92DE69B2E000C6859 /* CollectionViewComponent.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CollectionViewComponent.swift; sourceTree = "<group>"; };
-		3DBEA0BA2DE69B2E000C6859 /* CommonSectionComponent.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CommonSectionComponent.swift; sourceTree = "<group>"; };
-		3DBEA0BB2DE69B2E000C6859 /* Component.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Component.swift; sourceTree = "<group>"; };
-		3DBEA0BD2DE69B2E000C6859 /* PaddedLabel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PaddedLabel.swift; sourceTree = "<group>"; };
-		3DBEA0BF2DE69B2E000C6859 /* KLMultiScrollContainer.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = KLMultiScrollContainer.swift; sourceTree = "<group>"; };
 		3DBEA0C02DE69B2E000C6859 /* TSCustomStackView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TSCustomStackView.swift; sourceTree = "<group>"; };
-		3DBEA0C22DE69B2E000C6859 /* TSSimpleTableView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TSSimpleTableView.swift; sourceTree = "<group>"; };
-		3DBEA0C42DE69B2E000C6859 /* TSCircularProgressView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TSCircularProgressView.swift; sourceTree = "<group>"; };
 		3DBEA10E2DE6A04B000C6859 /* SimpleWebViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SimpleWebViewController.h; sourceTree = "<group>"; };
 		3DBEA10F2DE6A04B000C6859 /* SimpleWebViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SimpleWebViewController.m; sourceTree = "<group>"; };
+		3DBEA1112DE6A3A6000C6859 /* TopLeftLabel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TopLeftLabel.swift; sourceTree = "<group>"; };
 		3DCD56F22DDAE3DF004AAB5B /* ASRingToneCellView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ASRingToneCellView.swift; sourceTree = "<group>"; };
 		3DCD56F42DDAE421004AAB5B /* ASViewTool.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ASViewTool.swift; sourceTree = "<group>"; };
 		3DCD56F62DDAE481004AAB5B /* TSBusinessAudioPlayer.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TSBusinessAudioPlayer.swift; sourceTree = "<group>"; };
@@ -292,7 +233,6 @@
 		A848F87B2DD6D1AF00B746EC /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = "<group>"; };
 		A848F88D2DD6D38300B746EC /* APLaunchVC.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = APLaunchVC.swift; sourceTree = "<group>"; };
 		A848F8902DD6D4FD00B746EC /* Common.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Common.swift; sourceTree = "<group>"; };
-		A848F8922DD6D51900B746EC /* AIEnums.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AIEnums.swift; sourceTree = "<group>"; };
 		A848F8992DD6D59C00B746EC /* TSNetworkManager.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TSNetworkManager.swift; sourceTree = "<group>"; };
 		A848F89A2DD6D59C00B746EC /* TSNetWork+Business.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "TSNetWork+Business.swift"; sourceTree = "<group>"; };
 		A848F8A32DD6D66D00B746EC /* APRingTonesVC.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = APRingTonesVC.swift; sourceTree = "<group>"; };
@@ -372,7 +312,6 @@
 		3DB4D4AD2DDDCED00082596A /* Ex */ = {
 			isa = PBXGroup;
 			children = (
-				3DB4D4AB2DDDCED00082596A /* UIFont+TSEx.swift */,
 			);
 			path = Ex;
 			sourceTree = "<group>";
@@ -423,29 +362,19 @@
 			children = (
 				3DBEA0822DE69B2E000C6859 /* SwiftUI */,
 				3DBEA0832DE69B2E000C6859 /* Array+Ex.swift */,
-				3DBEA0842DE69B2E000C6859 /* AVAsset+Ex.swift */,
-				3DBEA0852DE69B2E000C6859 /* Bundle+Ex.swift */,
 				3DBEA0862DE69B2E000C6859 /* CGFloat+Ex.swift */,
 				3DBEA0872DE69B2E000C6859 /* Date+Ex.swift */,
-				3DBEA0882DE69B2E000C6859 /* Dictionary+Ex.swift */,
-				3DBEA0892DE69B2E000C6859 /* Int+Ex.swift */,
 				3DBEA08A2DE69B2E000C6859 /* NSString+Ex.swift */,
-				3DBEA08B2DE69B2E000C6859 /* UIApplication+Ex.swift */,
 				3DBEA08C2DE69B2E000C6859 /* UIButton+Ex.swift */,
 				3DBEA08D2DE69B2E000C6859 /* UIColor+Ex.swift */,
-				3DBEA08E2DE69B2E000C6859 /* UIDevice+Extension.swift */,
 				3DBEA08F2DE69B2E000C6859 /* UIFont+Ex.swift */,
 				3DBEA0902DE69B2E000C6859 /* UIImage+Ex.swift */,
 				3DBEA0912DE69B2E000C6859 /* UIImageView+Ex.swift */,
 				3DBEA0922DE69B2E000C6859 /* UILabel+Ex.swift */,
-				3DBEA0932DE69B2E000C6859 /* UIScreen.swift */,
-				3DBEA0942DE69B2E000C6859 /* UITableView+Ex.swift */,
-				3DBEA0952DE69B2E000C6859 /* UITextView+Ex.swift */,
 				3DBEA0962DE69B2E000C6859 /* UIView+Ex.swift */,
 				3DBEA0972DE69B2E000C6859 /* UIView+Frame.swift */,
 				3DBEA0982DE69B2E000C6859 /* UIView+Rotating.swift */,
 				3DBEA0992DE69B2E000C6859 /* UIViewController+Ex.swift */,
-				3DBEA09A2DE69B2E000C6859 /* UserDefault+Ex.swift */,
 			);
 			path = Ex;
 			sourceTree = "<group>";
@@ -458,33 +387,14 @@
 			path = GlobalImports;
 			sourceTree = "<group>";
 		};
-		3DBEA0A32DE69B2E000C6859 /* TSCommonTool */ = {
-			isa = PBXGroup;
-			children = (
-				3DBEA09E2DE69B2E000C6859 /* TSCommonTool.swift */,
-				3DBEA09F2DE69B2E000C6859 /* TSCommonTool+Down.swift */,
-				3DBEA0A02DE69B2E000C6859 /* TSCommonTool+MultDown.swift */,
-				3DBEA0A12DE69B2E000C6859 /* TSMultiTaskDownloader.swift */,
-				3DBEA0A22DE69B2E000C6859 /* TSRandomTextTool.swift */,
-			);
-			path = TSCommonTool;
-			sourceTree = "<group>";
-		};
 		3DBEA0B02DE69B2E000C6859 /* Tool */ = {
 			isa = PBXGroup;
 			children = (
-				3DBEA0A32DE69B2E000C6859 /* TSCommonTool */,
-				3DBEA0A42DE69B2E000C6859 /* PhotoManager.swift */,
-				3DBEA0A52DE69B2E000C6859 /* SVProgressHUD+Ex.swift */,
+				3DBEA0A22DE69B2E000C6859 /* TSRandomTextTool.swift */,
 				3DBEA0A62DE69B2E000C6859 /* TSBusinessFileManager.swift */,
 				3DBEA0A72DE69B2E000C6859 /* TSCollectionViewObserver.swift */,
 				3DBEA0A82DE69B2E000C6859 /* TSCustomAlertController.swift */,
-				3DBEA0A92DE69B2E000C6859 /* TSDownloadManager.swift */,
 				3DBEA0AA2DE69B2E000C6859 /* TSFileManagerTool.swift */,
-				3DBEA0AB2DE69B2E000C6859 /* TSGCDTimer.swift */,
-				3DBEA0AC2DE69B2E000C6859 /* TSImageCompress.swift */,
-				3DBEA0AD2DE69B2E000C6859 /* TSNetworkTool.swift */,
-				3DBEA0AE2DE69B2E000C6859 /* TSToastTool.swift */,
 				3DBEA0AF2DE69B2E000C6859 /* WindowHelper.swift */,
 			);
 			path = Tool;
@@ -498,14 +408,6 @@
 			path = TSPlaceholderTextView;
 			sourceTree = "<group>";
 		};
-		3DBEA0B42DE69B2E000C6859 /* TSProgressSlider */ = {
-			isa = PBXGroup;
-			children = (
-				3DBEA0B32DE69B2E000C6859 /* TSProgressSlider.swift */,
-			);
-			path = TSProgressSlider;
-			sourceTree = "<group>";
-		};
 		3DBEA0B62DE69B2E000C6859 /* TSReusableCollectionView */ = {
 			isa = PBXGroup;
 			children = (
@@ -522,53 +424,22 @@
 			path = TSSaveSuccessTool;
 			sourceTree = "<group>";
 		};
-		3DBEA0BC2DE69B2E000C6859 /* UICollectionView+Component */ = {
-			isa = PBXGroup;
-			children = (
-				3DBEA0B92DE69B2E000C6859 /* CollectionViewComponent.swift */,
-				3DBEA0BA2DE69B2E000C6859 /* CommonSectionComponent.swift */,
-				3DBEA0BB2DE69B2E000C6859 /* Component.swift */,
-			);
-			path = "UICollectionView+Component";
-			sourceTree = "<group>";
-		};
-		3DBEA0BE2DE69B2E000C6859 /* UILabel */ = {
-			isa = PBXGroup;
-			children = (
-				3DBEA0BD2DE69B2E000C6859 /* PaddedLabel.swift */,
-			);
-			path = UILabel;
-			sourceTree = "<group>";
-		};
 		3DBEA0C12DE69B2E000C6859 /* UIStackView */ = {
 			isa = PBXGroup;
 			children = (
-				3DBEA0BF2DE69B2E000C6859 /* KLMultiScrollContainer.swift */,
 				3DBEA0C02DE69B2E000C6859 /* TSCustomStackView.swift */,
 			);
 			path = UIStackView;
 			sourceTree = "<group>";
 		};
-		3DBEA0C32DE69B2E000C6859 /* UITableView+TSItemModel */ = {
-			isa = PBXGroup;
-			children = (
-				3DBEA0C22DE69B2E000C6859 /* TSSimpleTableView.swift */,
-			);
-			path = "UITableView+TSItemModel";
-			sourceTree = "<group>";
-		};
 		3DBEA0C52DE69B2E000C6859 /* View */ = {
 			isa = PBXGroup;
 			children = (
+				3DBEA1112DE6A3A6000C6859 /* TopLeftLabel.swift */,
 				3DBEA0B22DE69B2E000C6859 /* TSPlaceholderTextView */,
-				3DBEA0B42DE69B2E000C6859 /* TSProgressSlider */,
 				3DBEA0B62DE69B2E000C6859 /* TSReusableCollectionView */,
 				3DBEA0B82DE69B2E000C6859 /* TSSaveSuccessTool */,
-				3DBEA0BC2DE69B2E000C6859 /* UICollectionView+Component */,
-				3DBEA0BE2DE69B2E000C6859 /* UILabel */,
 				3DBEA0C12DE69B2E000C6859 /* UIStackView */,
-				3DBEA0C32DE69B2E000C6859 /* UITableView+TSItemModel */,
-				3DBEA0C42DE69B2E000C6859 /* TSCircularProgressView.swift */,
 			);
 			path = View;
 			sourceTree = "<group>";
@@ -773,7 +644,6 @@
 				3DCD56F82DDAE481004AAB5B /* TSAudioPlayer */,
 				A848F8F92DD7536300B746EC /*  Notification+Ex.swift */,
 				A848F89D2DD6D59C00B746EC /* TSNetWork */,
-				A848F8922DD6D51900B746EC /* AIEnums.swift */,
 				A848F8902DD6D4FD00B746EC /* Common.swift */,
 			);
 			path = Common;
@@ -1126,7 +996,6 @@
 				A848F8C02DD6E6FA00B746EC /* APRingTonesVC+TextView.swift in Sources */,
 				3DCD572F2DDB1D8A004AAB5B /* ASRingLoadingView.swift in Sources */,
 				3DB4D49D2DDC29AC0082596A /* ASRTRStyleView.swift in Sources */,
-				3DB4D4AE2DDDCED00082596A /* UIFont+TSEx.swift in Sources */,
 				3DCD57312DDB2A66004AAB5B /* ASGenerateRingToRingOperation.swift in Sources */,
 				A848F8EA2DD74E3A00B746EC /* ASDBActionInfoModel.swift in Sources */,
 				3DCD573D2DDB5A3C004AAB5B /* ASMyRingCell.swift in Sources */,
@@ -1162,7 +1031,6 @@
 				A848F8EC2DD74EF800B746EC /* ASActionInfoModel.swift in Sources */,
 				A848F8F62DD752D700B746EC /* ASGenerateBaseOperation.swift in Sources */,
 				3DB4D4A52DDC8E830082596A /* APSettingVC+Col.swift in Sources */,
-				A848F8932DD6D52100B746EC /* AIEnums.swift in Sources */,
 				A848F8EE2DD7508300B746EC /* ASRealmManager.swift in Sources */,
 				A848F8B52DD6D83E00B746EC /* APConfig+Color.swift in Sources */,
 				A848F8B92DD6DF7900B746EC /* ASAppBtnView.swift in Sources */,
@@ -1174,72 +1042,44 @@
 				A848F8D22DD7149D00B746EC /* ASDurationColView.swift in Sources */,
 				A848F8C62DD6E72D00B746EC /* APRingTonesVC+View.swift in Sources */,
 				A848F8862DD6D1AF00B746EC /* AppDelegate.swift in Sources */,
-				3DBEA0C92DE69B2E000C6859 /* TSToastTool.swift in Sources */,
-				3DBEA0CA2DE69B2E000C6859 /* KLMultiScrollContainer.swift in Sources */,
 				3DBEA0CB2DE69B2E000C6859 /* UIImage+Ex.swift in Sources */,
 				3DBEA0CC2DE69B2E000C6859 /* TSBusinessFileManager.swift in Sources */,
 				3DBEA0CD2DE69B2E000C6859 /* TSSaveSuccessTool.swift in Sources */,
 				3DBEA0CE2DE69B2E000C6859 /* TSSimpleCollectionView.swift in Sources */,
 				3DBEA0CF2DE69B2E000C6859 /* WindowHelper.swift in Sources */,
-				3DBEA0D02DE69B2E000C6859 /* Bundle+Ex.swift in Sources */,
 				3DBEA0D12DE69B2E000C6859 /* TSBasicItemModel.swift in Sources */,
 				3DBEA0D22DE69B2E000C6859 /* Array+Ex.swift in Sources */,
-				3DBEA0D32DE69B2E000C6859 /* TSSimpleTableView.swift in Sources */,
-				3DBEA0D42DE69B2E000C6859 /* TSCommonTool+Down.swift in Sources */,
-				3DBEA0D52DE69B2E000C6859 /* TSDownloadManager.swift in Sources */,
-				3DBEA0D62DE69B2E000C6859 /* AVAsset+Ex.swift in Sources */,
-				3DBEA0D72DE69B2E000C6859 /* UITableView+Ex.swift in Sources */,
 				3DBEA0D82DE69B2E000C6859 /* TSBaseModel.swift in Sources */,
 				3DBEA0D92DE69B2E000C6859 /* UIImageView+Ex.swift in Sources */,
-				3DBEA0DA2DE69B2E000C6859 /* CommonSectionComponent.swift in Sources */,
 				3DBEA0DC2DE69B2E000C6859 /* TSBaseNavigationC.swift in Sources */,
-				3DBEA0DD2DE69B2E000C6859 /* SVProgressHUD+Ex.swift in Sources */,
-				3DBEA0DE2DE69B2E000C6859 /* TSCommonTool.swift in Sources */,
-				3DBEA0DF2DE69B2E000C6859 /* UIScreen.swift in Sources */,
 				3DBEA0E02DE69B2E000C6859 /* TSBaseTabViewCell.swift in Sources */,
 				3DBEA0E12DE69B2E000C6859 /* Color+Ex.swift in Sources */,
-				3DBEA0E22DE69B2E000C6859 /* UIApplication+Ex.swift in Sources */,
-				3DBEA0E32DE69B2E000C6859 /* UserDefault+Ex.swift in Sources */,
-				3DBEA0E42DE69B2E000C6859 /* UIDevice+Extension.swift in Sources */,
-				3DBEA0E52DE69B2E000C6859 /* TSMultiTaskDownloader.swift in Sources */,
-				3DBEA0E62DE69B2E000C6859 /* CollectionViewComponent.swift in Sources */,
-				3DBEA0E72DE69B2E000C6859 /* Int+Ex.swift in Sources */,
 				3DBEA0E82DE69B2E000C6859 /* UIView+Ex.swift in Sources */,
 				3DBEA0E92DE69B2E000C6859 /* TSBaseVC.swift in Sources */,
 				3DBEA0EA2DE69B2E000C6859 /* UIView+Rotating.swift in Sources */,
 				3DBEA0EB2DE69B2E000C6859 /* Text+Ex.swift in Sources */,
 				3DBEA0EC2DE69B2E000C6859 /* UILabel+Ex.swift in Sources */,
 				3DBEA0ED2DE69B2E000C6859 /* TSBaseCollectionCell.swift in Sources */,
-				3DBEA0EE2DE69B2E000C6859 /* PhotoManager.swift in Sources */,
 				3DBEA0EF2DE69B2E000C6859 /* UIColor+Ex.swift in Sources */,
 				3DBEA0F02DE69B2E000C6859 /* Font+Ex.swift in Sources */,
 				3DBEA0F12DE69B2E000C6859 /* TSFileManagerTool.swift in Sources */,
-				3DBEA0F22DE69B2E000C6859 /* TSCircularProgressView.swift in Sources */,
 				3DBEA0F32DE69B2E000C6859 /* TSRandomTextTool.swift in Sources */,
 				3DBEA0F42DE69B2E000C6859 /* TSBaseView.swift in Sources */,
 				3DBEA0F52DE69B2E000C6859 /* TSBaseViewModel.swift in Sources */,
 				3DBEA0F62DE69B2E000C6859 /* TSCustomAlertController.swift in Sources */,
-				3DBEA0F72DE69B2E000C6859 /* TSImageCompress.swift in Sources */,
-				3DBEA0F82DE69B2E000C6859 /* TSGCDTimer.swift in Sources */,
 				3DBEA0FA2DE69B2E000C6859 /* TSBaseNavigationBarView.swift in Sources */,
-				3DBEA0FB2DE69B2E000C6859 /* UITextView+Ex.swift in Sources */,
 				3DBEA0FC2DE69B2E000C6859 /* UIFont+Ex.swift in Sources */,
-				3DBEA0FD2DE69B2E000C6859 /* TSCommonTool+MultDown.swift in Sources */,
 				3DBEA0FE2DE69B2E000C6859 /* UIButton+Ex.swift in Sources */,
 				3DBEA0FF2DE69B2E000C6859 /* TSCustomStackView.swift in Sources */,
 				3DBEA1002DE69B2E000C6859 /* UIViewController+Ex.swift in Sources */,
 				3DBEA1012DE69B2E000C6859 /* Date+Ex.swift in Sources */,
-				3DBEA1022DE69B2E000C6859 /* TSNetworkTool.swift in Sources */,
 				3DBEA1032DE69B2E000C6859 /* NSString+Ex.swift in Sources */,
-				3DBEA1042DE69B2E000C6859 /* Dictionary+Ex.swift in Sources */,
-				3DBEA1052DE69B2E000C6859 /* PaddedLabel.swift in Sources */,
 				3DBEA1062DE69B2E000C6859 /* GlobalImports.swift in Sources */,
 				3DBEA1072DE69B2E000C6859 /* TSPlaceholderTextView.swift in Sources */,
 				3DBEA1082DE69B2E000C6859 /* UIView+Frame.swift in Sources */,
+				3DBEA1122DE6A3AA000C6859 /* TopLeftLabel.swift in Sources */,
 				3DBEA1092DE69B2E000C6859 /* CGFloat+Ex.swift in Sources */,
-				3DBEA10A2DE69B2E000C6859 /* TSProgressSlider.swift in Sources */,
 				3DBEA10B2DE69B2E000C6859 /* TSCollectionViewObserver.swift in Sources */,
-				3DBEA10C2DE69B2E000C6859 /* Component.swift in Sources */,
 				3DB4D4912DDC1F100082596A /* ASRingGeneratorVC+load.swift in Sources */,
 			);
 			runOnlyForDeploymentPostprocessing = 0;

+ 1 - 1
AIPlayRingtones/AppPage/APAudioToRingVC/VM/APAudioToRingVM.swift

@@ -23,7 +23,7 @@ class APAudioToRingVM {
         if let dataArray = Mapper<ASGenerateStyleModel>().mapArray(JSONfile: "ring_rtr_style.json"){
             ptpStyleModels = dataArray
             
-            if let model = dataArray.safeObj(At: generateStyleIndex) {
+            if let model = dataArray.safeAny(At: generateStyleIndex) {
                 selectedGenerateModel = model //加上默认的选择
             }
         }

+ 1 - 1
AIPlayRingtones/AppPage/APAudioToRingVC/View/ASRTRStyleView.swift

@@ -84,7 +84,7 @@ extension ASRTRStyleView: TSSimpleCollectionViewDelegate {
         switch event.action {
         case .tap:
             generateStyleIndex = event.indexPath.row
-            if let model = generateStyleModels.safeObj(At: generateStyleIndex) {
+            if let model = generateStyleModels.safeAny(At: generateStyleIndex) {
                 generateStyleModel = model
             }
         default:

+ 3 - 3
AIPlayRingtones/AppPage/APMyRingVC/ASMyRingVC.swift

@@ -149,7 +149,7 @@ extension APMyRingVC: UICollectionViewDataSource ,UICollectionViewDelegate,UICol
     
     public func collectionView(_ collectionView: UICollectionView, cellForItemAt indexPath: IndexPath) -> UICollectionViewCell {
         let cell = collectionView.dequeueReusableCell(withReuseIdentifier: ASMyRingCell.cellID, for: indexPath) as! ASMyRingCell
-        if let model = listModelArray.safeObj(At: indexPath.item){
+        if let model = listModelArray.safeAny(At: indexPath.item){
             cell.setTargetVC(targetVC: self, indexPath: indexPath)
             cell.model = model
         }
@@ -189,7 +189,7 @@ extension APMyRingVC: SwipeCollectionViewCellDelegate {
         }
         
 
-//        if let model = listModelArray.safeObj(At: indexPath.item) {
+//        if let model = listModelArray.safeAny(At: indexPath.item) {
 //            switch model.actionStatus {
 //            case .pending,.running:
 //                return nil
@@ -202,7 +202,7 @@ extension APMyRingVC: SwipeCollectionViewCellDelegate {
             guard let self = self else { return }
             showCustomAlert(message: "Are you sure to delete".localized, deleteHandler:  { [weak self]  in
                 guard let self = self else { return }
-                if let model = listModelArray.safeObj(At: indexPath.item) {
+                if let model = listModelArray.safeAny(At: indexPath.item) {
                     
                     switch model.actionStatus {
                     case .pending,.running:

+ 2 - 2
AIPlayRingtones/AppPage/APRingTonesVC/APRingStyleVC/APRingStyleVC.swift

@@ -31,7 +31,7 @@ class APRingStyleVC: TSBaseVC {
         if let dataArray = Mapper<ASGenerateStyleModel>().mapArray(JSONfile: "ring_ttr_style.json"){
             ptpStyleModels = dataArray
             
-            if let model = dataArray.safeObj(At: generateStyleIndex) {
+            if let model = dataArray.safeAny(At: generateStyleIndex) {
                 generateStyleModel = model //加上默认的选择
             }
         }
@@ -92,7 +92,7 @@ extension APRingStyleVC: TSSimpleCollectionViewDelegate {
         switch event.action {
         case .tap:
             generateStyleIndex = event.indexPath.row
-            if let model = generateStyleModels.safeObj(At: generateStyleIndex) {
+            if let model = generateStyleModels.safeAny(At: generateStyleIndex) {
                 generateStyleModel = model
             }
         default:

+ 1 - 1
AIPlayRingtones/AppPage/APRingTonesVC/APRingTonesVC/VM/APRingTonesVM.swift

@@ -34,7 +34,7 @@ class APRingTonesVM {
         if let dataArray = Mapper<ASRingGenerateSecModel>().mapArray(JSONfile: "ring_duration.json"){
             ptpStyleModels = dataArray
             
-            if let model = dataArray.safeObj(At: generateSecIndex) {
+            if let model = dataArray.safeAny(At: generateSecIndex) {
                 generateSecModel = model //加上默认的选择
             }
         }

+ 1 - 1
AIPlayRingtones/AppPage/APRingTonesVC/APRingTonesVC/View/ASDurationColView.swift

@@ -57,7 +57,7 @@ extension ASGenerateDurationColView: TSSimpleCollectionViewDelegate {
         switch event.action {
         case .tap:
             currentSelectedIndex = event.indexPath.row
-            if let model = secModelArray.safeObj(At: currentSelectedIndex) {
+            if let model = secModelArray.safeAny(At: currentSelectedIndex) {
                 selectedCompleted?(model,currentSelectedIndex)
             }
         default:

+ 3 - 3
AIPlayRingtones/AppPage/APRingTonesVC/APRingTonesVC/View/ASPromptTextView.swift

@@ -72,7 +72,7 @@ class ASPromptTextView : TSBaseView{
         let inspirationBtn = UIButton.createButton(
             title: "💡Get Inspired?".localized,
             font: .font(size: 12),
-            titleColor: "#F3F0EA".toColor()
+            titleColor: "#F3F0EA".uiColor
         )
         { [weak self]  in
             guard let self = self else { return }
@@ -85,8 +85,8 @@ class ASPromptTextView : TSBaseView{
     }()
     
     
-    lazy var clearBtn: TSUIExpandedTouchButton = {
-        let clearBtn = TSUIExpandedTouchButton()
+    lazy var clearBtn: ASUIExpandedTouchButton = {
+        let clearBtn = ASUIExpandedTouchButton()
         clearBtn.setUpButton(image: UIImage(named: "clear_text"))
         { [weak self]  in
             guard let self = self else { return }

+ 3 - 3
AIPlayRingtones/AppPage/APSettingVC/APSettingVC+Col.swift

@@ -48,7 +48,7 @@ extension APSettingVC: UICollectionViewDataSource ,UICollectionViewDelegate {
     }
     
     public func collectionView(_ collectionView: UICollectionView, numberOfItemsInSection section: Int) -> Int {
-        if let sectionModel = dataArray.safeObj(At: section){
+        if let sectionModel = dataArray.safeAny(At: section){
             return sectionModel.itemsArray.count
         }
         return 0
@@ -58,7 +58,7 @@ extension APSettingVC: UICollectionViewDataSource ,UICollectionViewDelegate {
         
         let cell = collectionView.dequeueReusableCell(withReuseIdentifier: APSettingCell.cellID, for: indexPath)
         if let cell = cell as? APSettingCell {
-            if let sectionModel = dataArray.safeObj(At: indexPath.section),let itemModel = sectionModel.itemsArray.safeObj(At: indexPath.row){
+            if let sectionModel = dataArray.safeAny(At: indexPath.section),let itemModel = sectionModel.itemsArray.safeAny(At: indexPath.row){
                 cell.itemModel = itemModel
             }
         }
@@ -67,7 +67,7 @@ extension APSettingVC: UICollectionViewDataSource ,UICollectionViewDelegate {
     }
 
     public func collectionView(_ collectionView: UICollectionView, didSelectItemAt indexPath: IndexPath) {
-        if let sectionModel = dataArray.safeObj(At: indexPath.section),let itemModel = sectionModel.itemsArray.safeObj(At: indexPath.row){
+        if let sectionModel = dataArray.safeAny(At: indexPath.section),let itemModel = sectionModel.itemsArray.safeAny(At: indexPath.row){
             itemModel.tapBlock?(itemModel,indexPath.row,nil)
         }
     }

+ 2 - 2
AIPlayRingtones/AppPage/ASRingGeneratorVC/ASRingGeneratorBaseVC.swift

@@ -40,7 +40,7 @@ class ASRingGeneratorBaseVC: TSBaseVC {
 //    }()
     
     lazy var xBtn: UIButton = {
-        let xBtn = TSUIExpandedTouchButton()
+        let xBtn = ASUIExpandedTouchButton()
         xBtn.setUpButton(image: UIImage(named: "x")) { [weak self]  in
             guard let self = self else { return }
             clickXBtn()
@@ -146,7 +146,7 @@ class ASRingGeneratorBaseVC: TSBaseVC {
 //    
 //
 //    lazy var xBtn: UIButton = {
-//        let xBtn = TSUIExpandedTouchButton()
+//        let xBtn = ASUIExpandedTouchButton()
 //        xBtn.setUpButton(image: UIImage(named: "x")) { [weak self]  in
 ////        let xBtn = UIButton.createButton(image: UIImage(named: "x")) { [weak self]  in
 //            guard let self = self else { return }

+ 14 - 14
AIPlayRingtones/AppPage/ASTabBarVC/ASTabBarVC.swift

@@ -9,7 +9,7 @@
 import UIKit
 class ASTabBarVC: UITabBarController {
   
-    private var viewControllerArray: [String] = []
+    private var viewControllerArray: [UIViewController] = []
     private var titleArray: [String] = []
     private var selectedImageArray: [String] = []
     private var unselectedImageArray: [String] = []
@@ -23,7 +23,10 @@ class ASTabBarVC: UITabBarController {
     }
 
     @objc private func setUpData() {
-        viewControllerArray = ["APAudioToRingVC","APRingTonesVC","APMyRingVC","APSettingVC"]
+        viewControllerArray = [APAudioToRingVC(),
+                               APRingTonesVC(),
+                               APMyRingVC(),
+                               APSettingVC()]
 
         titleArray = ["Create","Audio","Mine","Setting"]
         selectedImageArray = [
@@ -42,18 +45,15 @@ class ASTabBarVC: UITabBarController {
         var tabArray: [UINavigationController] = []
 
         for i in 0..<viewControllerArray.count {
-            if let rootViewController = viewControllerArray[i].toInstance(of: UIViewController.self) {
-                let title = titleArray[i]
-                let nav = TSBaseNavigationC(rootViewController: rootViewController)
-                nav.view.backgroundColor = UIColor.black
-                nav.tabBarItem = tabBarItem(
-                    title: title.localized,
-                    image: UIImage(named: unselectedImageArray[i]),
-                    selectedImage: UIImage(named: selectedImageArray[i]),
-                    tag: i
-                )
-                tabArray.append(nav)
-            }
+            let nav = TSBaseNavigationC(rootViewController: viewControllerArray[i])
+            nav.view.backgroundColor = UIColor.black
+            nav.tabBarItem = tabBarItem(
+                title: titleArray[i].localized,
+                image: UIImage(named: unselectedImageArray[i]),
+                selectedImage: UIImage(named: selectedImageArray[i]),
+                tag: i
+            )
+            tabArray.append(nav)
         }
 
         self.viewControllers = tabArray

+ 7 - 60
AIPlayRingtones/Classes/BaseClass/TSBaseCollectionCell.swift

@@ -6,11 +6,9 @@
 //
 
 
-open class TSBaseCollectionCell: UICollectionViewCell,TSComponentView  {
-    
-    public var colComponent:TSCollectionViewComponent?
-    public var colAttributes:[String : Any]?
+open class TSBaseCollectionCell: UICollectionViewCell  {
     
+
     public lazy var bgContentView:UIView = {
         let view = UIView()
         view.backgroundColor = .clear
@@ -40,34 +38,11 @@ open class TSBaseCollectionCell: UICollectionViewCell,TSComponentView  {
         
     }
     
-    open func renderView(with object: Any?, component: TSCollectionViewComponent, attributes: [String : Any]?) {
-        self.colComponent = component
-        self.colAttributes = attributes
-    }
-    
+
     deinit {
 //        debugPrint("<---deinit \(String(describing: self))")
     }
-    
-    public var cellIndexPath:IndexPath?{
-        if let attributes = colAttributes , let IndexPath = attributes[kIndexPath] as? IndexPath{
-            return IndexPath
-        }
-        return nil
-    }
-    
-    public var itemActionHandler: ((Any?, IndexPath) -> Void)?{
-        if let colComponent = colComponent,let itemActionHandler = colComponent.itemActionHandler {
-            return itemActionHandler
-        }
-        return nil
-    }
-    
-    public func actionHandler(any:Any?){
-        if let sectionActionHandler = itemActionHandler ,let indexPath = cellIndexPath{
-            sectionActionHandler(any,indexPath)
-        }
-    }
+
 }
 
 extension TSBaseCollectionCell{
@@ -79,11 +54,9 @@ extension TSBaseCollectionCell{
 
 
 
-open class TSBaseCollectionnReusableView : UICollectionReusableView ,TSComponentView  {
-    
-    public var colComponent:TSCollectionViewComponent?
-    public var colAttributes:[String : Any]?
-    
+open class TSBaseCollectionnReusableView : UICollectionReusableView   {
+
+ 
     public lazy var bgContentView:UIView = {
         let view = UIView()
         view.backgroundColor = .clear
@@ -108,11 +81,6 @@ open class TSBaseCollectionnReusableView : UICollectionReusableView ,TSComponent
         
     }
 
-    open func renderView(with object: Any?, component: TSCollectionViewComponent, attributes: [String : Any]?) {
-        self.colComponent = component
-        self.colAttributes = attributes
-    }
-    
     
     deinit {
 //        debugPrint("<---deinit \(String(describing: self))")
@@ -120,24 +88,3 @@ open class TSBaseCollectionnReusableView : UICollectionReusableView ,TSComponent
     
 }
 
-extension TSBaseCollectionnReusableView{
-    public var cellIndexPath:IndexPath?{
-        if let attributes = colAttributes , let IndexPath = attributes[kIndexPath] as? IndexPath{
-            return IndexPath
-        }
-        return nil
-    }
-    
-    public var sectionActionHandler: ((Any?, IndexPath) -> Void)?{
-        if let colComponent = colComponent,let sectionActionHandler = colComponent.sectionActionHandler {
-            return sectionActionHandler
-        }
-        return nil
-    }
-    
-    public func actionHandler(any:Any?){
-        if let sectionActionHandler = sectionActionHandler ,let indexPath = cellIndexPath{
-            sectionActionHandler(any,indexPath)
-        }
-    }
-}

+ 1 - 1
AIPlayRingtones/Classes/BaseClass/TSBaseNavigationBarView.swift

@@ -154,7 +154,7 @@ open class TSNormalNavigationBarView: TSBaseNavContentBarView {
         button.setTitle(name, for: .normal)
         
         if imageName.count > 0 {
-            let image = UIImage(bundleNamed: imageName)?.withRenderingMode(.alwaysOriginal)
+            let image = UIImage(named: imageName)?.withRenderingMode(.alwaysOriginal)
             if let image = image {
                 button.setImage(image.mirror, for: .normal)
             }

+ 0 - 78
AIPlayRingtones/Classes/Ex/AVAsset+Ex.swift

@@ -1,78 +0,0 @@
-//
-//  AVAsset+Ex.swift
-//  TSLiveWallpaper
-//
-//  Created by 100Years on 2024/12/23.
-//
-
-import UIKit
-import AVFoundation
-
-public 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.init(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)
-            }
-        }
-    }
-}

+ 1 - 33
AIPlayRingtones/Classes/Ex/Array+Ex.swift

@@ -6,39 +6,7 @@
 //
 
 public 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? {
+    func safeAny(At index: Int) -> Element? {
         if index >= 0,  index < count {
             return self[index]
         }

+ 0 - 32
AIPlayRingtones/Classes/Ex/Bundle+Ex.swift

@@ -1,32 +0,0 @@
-//
-//  Bundle+Ex.swift
-//  Pods
-//
-//  Created by fff on 2025/2/7.
-//
-
-
-open class TSMyBundleClass {}
-
-public extension Bundle {
-    
-    static var environmentName: String {
-        let bundle = Bundle(for: TSMyBundleClass.self)  // 你的类名
-        return bundle.infoDictionary?["CFBundleName"] as? String ?? "Unknown"
-    }
-    
-    static var environmentBundle:Bundle{
-        if let bundlePath = Bundle(for: TSMyBundleClass.self).path(forResource: environmentName, ofType: "bundle"),
-           let bundle = Bundle(path: bundlePath) {
-            return bundle
-        } else {
-            return Bundle.main
-        }
-    }
-}
-
-public extension UIImage {
-    public convenience init?(bundleNamed name: String) {
-        self.init(named: name, in: Bundle.environmentBundle, compatibleWith: nil)
-    }
-}

+ 0 - 31
AIPlayRingtones/Classes/Ex/CGFloat+Ex.swift

@@ -5,37 +5,6 @@
 //  Created by 100Years on 2024/12/23.
 //
 
-public 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
-        }
-    }
-}
-
 public extension Float {
     //float 转 分秒
     func floatToMinuteSecond() -> String {

+ 2 - 32
AIPlayRingtones/Classes/Ex/Date+Ex.swift

@@ -6,44 +6,14 @@
 //
 
 public extension Date {
-    private static var HmsFormatter: DateFormatter {
+    static var hmsString: String {
         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(timestampInt)
+        return formatter.string(from: Date())
     }
     
-    
     static var timestampInt: Int {
         return Int(Date().timeIntervalSince1970)
     }
-    
-    var dateTimeString:String {
-        // 创建 DateFormatter 实例
-        let dateFormatter = DateFormatter()
-        // 设置日期格式
-        dateFormatter.dateFormat = "MMMM d, yyyy 'At' h:mm a"
-        // 设置本地化信息,确保月份名称和 AM/PM 显示正确
-        dateFormatter.locale = Locale(identifier: "en_US")
-        // 将 Date 对象转换为字符串
-        let dateString = dateFormatter.string(from: self)
-        
-        return dateString
-    }
-    
-    
-    var dateDayString:String {
-        let dateFormatter = DateFormatter()
-        dateFormatter.dateFormat = "yyyyMMdd"
-        let dateString = dateFormatter.string(from: self)
-        return dateString
-    }
 }

+ 0 - 61
AIPlayRingtones/Classes/Ex/Dictionary+Ex.swift

@@ -1,61 +0,0 @@
-//
-//  Dictionary+Ex.swift
-//  TSLiveWallpaper
-//
-//  Created by 100Years on 2024/12/20.
-//
-
-import Foundation
-
-public 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 safeInt(forKey key: String) -> Int {
-        guard let value = self[key] , let valueInt = value as? Int else { return 0 }
-        return valueInt
-    }
-    
-    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]  , let valueT = value as? T else { return defaultValue }
-        return valueT
-    }
-}
-
-public extension Dictionary where Key == String {
-    /// 将字典转换为 JSON 字符串
-    func toJSONString() -> String? {
-        do {
-            // 将字典转换为 JSON 数据
-            let jsonData = try JSONSerialization.data(withJSONObject: self, options: .prettyPrinted)
-            
-            // 将 JSON 数据转换为字符串
-            return String(data: jsonData, encoding: .utf8)
-        } catch {
-            print("Error converting dictionary to JSON: \(error)")
-            return nil
-        }
-    }
-}

+ 0 - 98
AIPlayRingtones/Classes/Ex/Int+Ex.swift

@@ -1,98 +0,0 @@
-//
-//  Int+Ex.swift
-//  TSLiveWallpaper
-//
-//  Created by 100Years on 2024/12/20.
-//
-
-
-public extension Int {
-    /// 将秒数转换为 "HH:mm" 格式的字符串
-    /// - Returns: 转换后的字符串
-    public func toTimeString() -> String {
-        // 计算小时和分钟
-        let hours = self / 3600
-        let minutes = (self % 3600) / 60
-        
-        // 格式化为 "HH:mm"
-        return String(format: "%02d:%02d", hours, minutes)
-    }
-    
-    /// 将秒数转换为 "HH:mm:ss" 格式的字符串
-    /// - Returns: 转换后的字符串
-    public func toHourMinuteSecondString() -> String {
-        // 计算小时、分钟和秒
-        let hours = self / 3600
-        let minutes = (self % 3600) / 60
-        let seconds = self % 60
-        
-        // 格式化为 "HH:mm:ss"
-        return String(format: "%02d:%02d:%02d", hours, minutes, seconds)
-    }
-    
-    public static func timestampInt() -> Int {
-         let currentTimestamp = Int(Date().timeIntervalSince1970)
-         return currentTimestamp
-     }
-}
-
-public extension Int {
-    private static var uniqueCounter: Int64 = 0
-    
-    static var uuid: Int {
-        return Int(OSAtomicIncrement64(&uniqueCounter))
-    }
-}
-
-public extension TimeInterval {
-    public var mmss: String {
-        let minute = Int(self) / 60
-        let second = Int(self) % 60
-        return String(format: "%02d", minute) + ":" + String(format: "%02d", second)
-    }
-
-    public 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
-        }
-    }
-
-    public 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)
-    }
-}
-public extension Int {
-    public var mmss: String {
-        let minute = Int(self) / 60
-        let second = Int(self) % 60
-        return String(format: "%02d", minute) + ":" + String(format: "%02d", second)
-    }
-
-    public 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
-        }
-    }
-
-    public 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)
-    }
-}

+ 2 - 336
AIPlayRingtones/Classes/Ex/NSString+Ex.swift

@@ -17,115 +17,10 @@ public extension String {
     var uiCGColor: CGColor {
         uiColor.cgColor
     }
-    
-    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
-    }
-}
-
-public extension String {
-
-    var localized:String {
-        return NSLocalizedString(self, comment: self)
-//        return self
-    }
-        
 }
 
 
 public extension String {
-    var doubleValue: Double? {
-        Double(self)
-    }
-    
     var md5:String {
         let data = Data(self.utf8)
         var digest = [UInt8](repeating: 0, count: Int(CC_MD5_DIGEST_LENGTH))
@@ -134,237 +29,8 @@ public extension String {
         }
         return digest.map { String(format: "%02x", $0) }.joined()
     }
-}
-
-
-public extension String {
-    // 移除逗号
-    func deleteDotSymbol() -> String {
-        // 超过1000的数字,格式化成文本后会带 ','(en)/'٬'(ar)
-        return replacingOccurrences(of: ",", with: "").replacingOccurrences(of: "٬", with: "")
-    }
-    
-}
-
-
-
-
-public 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
-    }
-}
-
-
-
-
-public 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
-    }
-}
-
-public extension String {
-    
-    func colors(separator:String) -> [UIColor] {
-        let array = self.components(separatedBy: separator)
-        var colors = [UIColor]()
-        for string in array {
-            colors.append(string.uiColor)
-        }
-        return colors
-    }
     
-    func cgColors(separator:String) -> [CGColor] {
-        let array = self.components(separatedBy: separator)
-        var colors = [CGColor]()
-        for string in array {
-            colors.append(string.uiColor.cgColor)
-        }
-        return colors
-    }
-}
-
-
-
-
-public extension String {
-    
-    func jsonDict() -> [String:Any]? {
-        // 将字符串转换为 Data
-        if let jsonData = self.data(using: .utf8) {
-            do {
-                // 将 Data 解析为 JSON 对象
-                let jsonObject = try JSONSerialization.jsonObject(with: jsonData, options: [])
-                // 尝试将 JSON 对象转换为字典
-                if let jsonDict = jsonObject as? [String: Any] {
-//                    dePrint("转换后的字典: \(jsonDict)")
-                    return jsonDict
-                    
-                } else {
-//                    dePrint("无法将 JSON 对象转换为字典。")
-                }
-            } catch {
-//                dePrint("JSON 解析错误: \(error)")
-            }
-        } else {
-//            dePrint("无法将字符串转换为 Data。")
-        }
-        
-        return nil
-    }
-    
-   
-    
-    
-}
-
-public extension String {
-    func removeTimestampFromEnd() -> String {
-        let string = self
-//        // 正则表达式:匹配末尾的10位或13位数字
-//        let pattern = "\\d{10}$|\\d{13}$"
-//        guard let regex = try? NSRegularExpression(pattern: pattern) else {
-//            return string
-//        }
-//        let range = NSRange(location: 0, length: string.utf16.count)
-//        return regex.stringByReplacingMatches(in: string, options: [], range: range, withTemplate: "")
-        
-        // 正则表达式:匹配(可选下划线)后跟10位或13位数字结尾
-        let pattern = "_?\\d{10}$|_?\\d{13}$"
-        guard let regex = try? NSRegularExpression(pattern: pattern) else {
-            return string
-        }
-        let range = NSRange(location: 0, length: string.utf16.count)
-        return regex.stringByReplacingMatches(in: string, options: [], range: range, withTemplate: "")
-        
+    var localized:String {
+        return NSLocalizedString(self, comment: self)
     }
 }

+ 0 - 49
AIPlayRingtones/Classes/Ex/UIApplication+Ex.swift

@@ -1,49 +0,0 @@
-//
-//  UIApplication+Ex.swift
-//  AIEmoji
-//
-//  Created by 100Years on 2025/1/22.
-//
-
-import UIKit
-import AVFoundation
-public extension UIApplication {
-    // 获取系统音量
-    public static func getSystemVolume() -> Float {
-        let audioSession = AVAudioSession.sharedInstance()
-        do {
-            try audioSession.setCategory(.playback) // 设置音频会话为播放模式
-            return audioSession.outputVolume
-        } catch {
-            print("Failed to set audio session category.")
-            return -1.0
-        }
-    }
-    
-
-    public enum TSVersionCompareResult {
-        case newer
-        case older
-        case same
-    }
-
-    public static func compareAppVersions(newVersion1: String, oldVersion: String) -> TSVersionCompareResult {
-        let components1 = newVersion1.components(separatedBy: ".")
-        let components2 = oldVersion.components(separatedBy: ".")
-        
-        let maxLength = max(components1.count, components2.count)
-        
-        for i in 0..<maxLength {
-            let num1 = i < components1.count ? Int(components1[i]) ?? 0 : 0
-            let num2 = i < components2.count ? Int(components2[i]) ?? 0 : 0
-            
-            if num1 > num2 {
-                return .newer
-            } else if num1 < num2 {
-                return .older
-            }
-        }
-        
-        return .same
-    }
-}

+ 1 - 21
AIPlayRingtones/Classes/Ex/UIButton+Ex.swift

@@ -131,7 +131,7 @@ public extension UIButton {
     }
     
 }
-public class TSUIExpandedTouchButton: UIButton {
+public class ASUIExpandedTouchButton: UIButton {
     public var indexPath: IndexPath = IndexPath(item: 0, section: 0)
     
     override public func point(inside point: CGPoint, with event: UIEvent?) -> Bool {
@@ -142,23 +142,3 @@ public class TSUIExpandedTouchButton: UIButton {
         return expandedBounds.contains(point)
     }
 }
-
-
-public class TSVerticalButton: UIButton {
-    var spacing: CGFloat = 4 {
-        didSet { setNeedsLayout() }
-    }
-
-    public override func layoutSubviews() {
-        super.layoutSubviews()
-        guard let imageView = imageView, let titleLabel = titleLabel else { return }
-
-        // 图片居中靠上
-        imageView.frame.origin.y = (bounds.height - imageView.frame.height - titleLabel.frame.height - spacing) / 2
-        imageView.center.x = bounds.width / 2
-
-        // 文字居中靠下
-        titleLabel.frame.origin.y = imageView.frame.maxY + spacing
-        titleLabel.center.x = bounds.width / 2
-    }
-}

+ 0 - 40
AIPlayRingtones/Classes/Ex/UIColor+Ex.swift

@@ -47,43 +47,3 @@ public extension UIColor {
     }
 
 }
-
-public extension UIColor {
-    /// 调整颜色的亮度和饱和度
-    /// - Parameters:
-    ///   - brightnessFactor: 亮度因子(范围 0.0 - 1.0, 0 表示完全黑暗, 1 表示原始亮度)
-    ///   - saturationFactor: 饱和度因子(范围 0.0 - 1.0, 0 表示无饱和度, 1 表示原始饱和度)
-    /// - Returns: 调整后的颜色
-    public func adjusted(brightness brightnessFactor: CGFloat = 1.0, saturation saturationFactor: CGFloat = 1.0) -> UIColor {
-        var hue: CGFloat = 0
-        var saturation: CGFloat = 0
-        var brightness: CGFloat = 0
-        var alpha: CGFloat = 0
-        
-        if self.getHue(&hue, saturation: &saturation, brightness: &brightness, alpha: &alpha) {
-            // 根据 factor 计算调整后的亮度和饱和度
-            let adjustedBrightness = brightness * brightnessFactor
-            let adjustedSaturation = saturation * saturationFactor
-            return UIColor(hue: hue, saturation: adjustedSaturation, brightness: adjustedBrightness, alpha: alpha)
-        }
-        return self
-    }
-    
-    /// 获取颜色的亮度
-    var brightness: CGFloat? {
-        var brightness: CGFloat = 0
-        if self.getHue(nil, saturation: nil, brightness: &brightness, alpha: nil) {
-            return brightness
-        }
-        return nil
-    }
-    
-    /// 获取颜色的饱和度
-    var saturation: CGFloat? {
-        var saturation: CGFloat = 0
-        if self.getHue(nil, saturation: &saturation, brightness: nil, alpha: nil) {
-            return saturation
-        }
-        return nil
-    }
-}

+ 0 - 128
AIPlayRingtones/Classes/Ex/UIDevice+Extension.swift

@@ -1,128 +0,0 @@
-//
-//  UIDevice+Extension.swift
-//  Example
-//
-//  Created by Slience on 2021/1/13.
-//
-
-import UIKit
-
-public extension UIDevice {
-    public class var isPortrait: Bool {
-        if isPad {
-            return true
-        }
-        if  statusBarOrientation == .landscapeLeft ||
-                statusBarOrientation == .landscapeRight {
-            return false
-        }
-        return true
-    }
-    public class var statusBarOrientation: UIInterfaceOrientation {
-        UIApplication.shared.statusBarOrientation
-    }
-    public class var navigationBarHeight: CGFloat {
-        if isPad {
-            if #available(iOS 12, *) {
-                return statusBarHeight + 50
-            }
-        }
-        return statusBarHeight + 44
-    }
-    class var generalStatusBarHeight: CGFloat {
-        isAllIPhoneX ? 44 : 20
-    }
-    public 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
-    }
-    public class var topMargin: CGFloat {
-        if isAllIPhoneX {
-            return statusBarHeight
-        }
-        return safeAreaInsets.top
-    }
-    public class var leftMargin: CGFloat {
-        safeAreaInsets.left
-    }
-    public class var rightMargin: CGFloat {
-        safeAreaInsets.right
-    }
-    public class var bottomMargin: CGFloat {
-        safeAreaInsets.bottom
-    }
-    public class var isPad: Bool {
-        current.userInterfaceIdiom == .pad
-    }
-    public class var isAllIPhoneX: Bool {
-        let safeArea = safeAreaInsets
-        let margin: CGFloat
-        if isPortrait {
-            margin = safeArea.bottom
-        }else {
-            margin = safeArea.left
-        }
-        return margin != 0
-    }
-    
-    public class var safeAreaInsets: UIEdgeInsets {
-        if #available(iOS 11.0, *) {
-            return UIApplication._keyWindow?.safeAreaInsets ?? .zero
-        }
-        return .zero
-    }
-    
-    public 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
-    }
-}
-
-public extension UIApplication {
-    public class var _keyWindow: UIWindow? {
-        var window: UIWindow?
-        if #available(iOS 13.0, *) {
-            window = shared.windows.filter({ $0.isKeyWindow }).last
-        } else {
-            window = shared.delegate?.window ?? shared.keyWindow
-        }
-        return window
-    }
-}
-
-
-public extension UIDevice {
-    
-    
-    class func copyImage(image:UIImage) {
-        UIPasteboard.general.image = image
-    }
-    
-}
-
-public extension UIDevice {
-    /// 开启屏幕常亮
-    static func keepScreenAwake() {
-        UIApplication.shared.isIdleTimerDisabled = true
-    }
-    
-    /// 恢复默认屏幕休眠行为
-    static func allowScreenSleep() {
-        UIApplication.shared.isIdleTimerDisabled = false
-    }
-    
-    /// 0最小,1 最亮
-    static func brightness(brightness:CGFloat) {
-        UIScreen.main.brightness = brightness
-    }
-    
-}

+ 1 - 11
AIPlayRingtones/Classes/Ex/UIFont+Ex.swift

@@ -9,6 +9,7 @@ public typealias FontName = String
 
 public extension FontName {
     static public let PingFangSC   = "PingFangSC"
+    static public let PoppinsBoldItalic   = "Poppins-BoldItalic"
 }
 
 
@@ -53,14 +54,3 @@ public extension UIFont {
         return UIFont(name: finalFontName, size: size)!
     }
 }
-extension UIFont {
-    
-    /// 返回该字体下,对应字符的宽度
-    /// - Parameter word: 字符
-    /// - Returns: 宽度
-    public func widthForWord(_ word: String) -> CGFloat {
-        
-        let sizeWidth = (word as NSString).size(withAttributes: [.font: self]).width
-        return sizeWidth//.rounded(.up)
-    }
-}

+ 0 - 262
AIPlayRingtones/Classes/Ex/UIImage+Ex.swift

@@ -5,103 +5,6 @@
 //  Created by 100Years on 2024/12/23.
 //
 
-
-public extension UIImage {
-    
-    var width: CGFloat { size.width }
-    var height: CGFloat { size.height }
-    
-    public func normalizedImage() -> UIImage? {
-        if imageOrientation == .up {
-            return self
-        }
-        return repaintImage()
-    }
-    public 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
-    }
-
-    public 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
-    }
-    
-    
-    public var pngImage:UIImage?{
-        // 将 UIImage 转为 PNG Data
-        guard let pngData = self.pngData() else {
-            print("Failed to convert WebP image to PNG data.")
-            return nil
-        }
-        
-        // 使用 PNG Data 创建新的 UIImage
-        return UIImage(data: pngData)
-    }
-}
-
-
 public extension UIImage {
     /// 将颜色转换为 UIImage
     /// - Parameters:
@@ -127,37 +30,6 @@ public extension UIImage {
         
         return image
     }
-    
-    public func resizableImage(capInsets:UIEdgeInsets) -> UIImage{
-        return resizableImage(withCapInsets: capInsets, resizingMode: .stretch)
-    }
-    
-    
-  
-        // 创建纯色图片
-    convenience init?(color: UIColor, size: CGSize = CGSize(width: 1, height: 1)) {
-        let rect = CGRect(origin: .zero, size: size)
-        UIGraphicsBeginImageContextWithOptions(rect.size, false, 0.0)
-        color.setFill()
-        UIRectFill(rect)
-        let image = UIGraphicsGetImageFromCurrentImageContext()
-        UIGraphicsEndImageContext()
-        
-        guard let cgImage = image?.cgImage else { return nil }
-        self.init(cgImage: cgImage)
-    }
-        
-        // 创建圆形图片
-    static func circle(diameter: CGFloat, color: UIColor) -> UIImage {
-        let size = CGSize(width: diameter, height: diameter)
-        let renderer = UIGraphicsImageRenderer(size: size)
-        return renderer.image { context in
-            let rect = CGRect(origin: .zero, size: size)
-            color.setFill()
-            UIBezierPath(ovalIn: rect).fill()
-        }
-    }
-
 }
 
 public extension UIImage {
@@ -169,141 +41,7 @@ public extension UIImage {
         let image = UIImage(cgImage: cgImage, scale: self.scale, orientation: Orientation.upMirrored)
         return image.withRenderingMode(self.renderingMode)
     }
-    
-    func resize(to size: CGSize) -> UIImage? {
-        UIGraphicsBeginImageContextWithOptions(size, false, 0.0)
-        self.draw(in: CGRect(origin: .zero, size: size))
-        let resizedImage = UIGraphicsGetImageFromCurrentImageContext()
-        UIGraphicsEndImageContext()
-        return resizedImage
-    }
-    
-    func cropped(to aspectRatio: CGFloat) -> UIImage? {
-        let originalSize = self.size
-        let targetSize: CGSize
 
-        if originalSize.width > originalSize.height {
-            // 宽度大于高度,裁剪宽度
-            targetSize = CGSize(width: originalSize.height, height: originalSize.height)
-        } else {
-            // 高度大于宽度,裁剪高度
-            targetSize = CGSize(width: originalSize.width, height: originalSize.width)
-        }
-
-        let cropRect = CGRect(
-            x: (originalSize.width - targetSize.width) / 2,
-            y: (originalSize.height - targetSize.height) / 2,
-            width: targetSize.width,
-            height: targetSize.height
-        )
-
-        if let cgImage = self.cgImage?.cropping(to: cropRect) {
-            return UIImage(cgImage: cgImage, scale: self.scale, orientation: self.imageOrientation)
-        }
-        return nil
-    }
-    
-    /// 判断图片是否大于指定大小(默认10MB) 
-   func isLargerThan(byteSize: Int) -> Bool {
-
-//       // 优先尝试JPEG压缩(更接近实际文件大小)
-//       if let jpegData = self.jpegData(compressionQuality: 1.0) {
-//           print("JPEG格式大小: \(Double(jpegData.count) / (1024 * 1024)) MB")
-//           return jpegData.count > byteSize
-//       }
-       
-       // 透明图片回退到PNG
-       if let pngData = self.pngData() {
-           print("PNG格式大小: \(Double(pngData.count) / (1024 * 1024)) MB")
-           return pngData.count > byteSize
-       }
-       
-       return false // 无法获取数据时默认不限制
-   }
-}
-
-//旋转图片
-public extension UIImage {
-
-    /// 按角度旋转图片
-    /// - Parameter degrees: 旋转正数为顺时针,负数为逆时针)
-    /// - Returns: 旋转后的新图片
-    func rotated(byDegrees degrees: CGFloat) -> UIImage? {
-        let radians = degrees * .pi / 180
-        return rotated(byRadians: radians)
-    }
-    
-    /// 按弧度旋转图片
-    /// - Parameter radians: 旋转弧度
-    /// - Returns: 旋转后的新图片
-    func rotated(byRadians radians: CGFloat) -> UIImage? {
-        // 计算旋转后的新边界大小
-        let rotatedSize = CGRect(origin: .zero, size: size)
-            .applying(CGAffineTransform(rotationAngle: radians))
-            .integral.size
-        
-        // 开始图形上下文
-        UIGraphicsBeginImageContextWithOptions(rotatedSize, false, scale)
-        guard let context = UIGraphicsGetCurrentContext() else { return nil }
-        
-        // 移动和旋转坐标系
-        context.translateBy(x: rotatedSize.width / 2, y: rotatedSize.height / 2)
-        context.rotate(by: radians)
-        
-        // 绘制图像
-        draw(in: CGRect(
-            x: -size.width / 2,
-            y: -size.height / 2,
-            width: size.width,
-            height: size.height
-        ))
-        
-        // 获取旋转后的图像
-        let rotatedImage = UIGraphicsGetImageFromCurrentImageContext()
-        UIGraphicsEndImageContext()
-        
-        return rotatedImage
-    }
-    
-    /// 固定角度旋转(90度、180度、270度)
-    /// - Parameter rotation: 旋转角度
-    /// - Returns: 旋转后的新图片
-    func rotated(by rotation: Rotation) -> UIImage? {
-        switch rotation {
-        case .degrees90:
-            return rotated(byDegrees: 90)
-        case .degrees180:
-            return rotated(byDegrees: 180)
-        case .degrees270:
-            return rotated(byDegrees: 270)
-        }
-    }
-    
-    // MARK: - 辅助类型
-    
-    enum Rotation {
-        case degrees90
-        case degrees180
-        case degrees270
-    }
-    
-    /// 保存图片到文件系统
-    /// - Parameters:
-    ///   - url: 目标URL
-    ///   - compressionQuality: JPEG压缩质量(0.0-1.0)
-    /// - Throws: 可能抛出错误
-    func saveToFile(at url: URL, compressionQuality: CGFloat = 1.0) {
-        guard let data = self.jpegData(compressionQuality: compressionQuality) else {
-            debugPrint("无法转换为JPEG数据")
-            return
-        }
-        
-        do {
-            try data.write(to: url)
-        } catch {
-            debugPrint(error)
-        }
-    }
 }
 
 public extension UIImage {

+ 1 - 134
AIPlayRingtones/Classes/Ex/UIImageView+Ex.swift

@@ -7,25 +7,6 @@
 import Kingfisher
 
 
-class TSCustomActivityIndicator: Indicator {
-    let activityIndicator = UIActivityIndicatorView(style: .medium)
-    
-    init(color: UIColor) {
-        activityIndicator.color = color
-    }
-    
-    func startAnimatingView() {
-        activityIndicator.startAnimating()
-    }
-    
-    func stopAnimatingView() {
-        activityIndicator.stopAnimating()
-    }
-    
-    var view: IndicatorView {
-        return activityIndicator
-    }
-}
 
 public extension UIImageView {
 
@@ -56,37 +37,7 @@ public extension UIImageView {
         imageView.cornerRadius = corner
         return imageView
     }
-    
-    /// 异步创建并加载图片的 UIImageView
-    /// - Parameters:
-    ///   - imageName: 本地占位图片名称
-    ///   - urlString: 图片的 URL 字符串
-    ///   - contentMode: 内容模式,默认为 `.scaleAspectFit`
-    ///   - backgroundColor: 背景颜色,默认为透明
-    ///   - showLoading: 是否显示加载动画,默认为 `true`
-    ///   - completion: 图片加载成功后的回调
-    static public func createAsyncImageView(urlString: String?,
-                                     placeholder:UIImage?,
-                                     contentMode: UIView.ContentMode = .scaleAspectFit,
-                                        adaptiveMode:Bool = false,
-                                     backgroundColor: UIColor = .clear,
-                                     showLoading: Bool = false,
-                                    progressBlock: ((Float)->Void)? = nil,
-                                     completion: ((UIImage?) -> Void)? = nil) -> UIImageView {
-        let imageView = UIImageView()
-        imageView.setAsyncImage(urlString: urlString,
-                                placeholder:placeholder,
-                                contentMode:contentMode,
-                                adaptiveMode:adaptiveMode,
-                                backgroundColor:backgroundColor,
-                                showLoading:showLoading,
-                                progressBlock:progressBlock,
-                                completion:completion)
-        return imageView
-    }
 
-    
-    
     public func setAsyncImage(urlString: String?,
                      placeholder: UIImage? = nil,
                      contentMode: UIView.ContentMode = .scaleAspectFit,
@@ -115,7 +66,7 @@ public extension UIImageView {
                 completion?(nil)
                 return
             }
-            kf.indicatorType = showLoading ? .custom(indicator: TSCustomActivityIndicator(color: .white)) : .none
+            kf.indicatorType = .none
             imageView.kf.setImage(with: url,
                  placeholder: placeholder,
                      options: nil,
@@ -145,87 +96,3 @@ public extension UIImageView {
     }
 
 }
-
-public extension UIImageView {
-    
-    static public func createRightArrow() -> UIImageView {
-        let imageView = UIImageView()
-        imageView.image = UIImage(named: "white_right_arrow")
-        return imageView
-    }
-    
-    /// 根据图片比例自动选择最佳缩放模式
-    public func adaptiveScale() {
-//        guard let image = image else { return }
-//        
-//        let viewSize = bounds.size
-//        let imageRatio = image.size.width / image.size.height
-//        let viewRatio = viewSize.width / viewSize.height
-//        
-//        let contentNewMode:UIView.ContentMode = imageRatio > viewRatio ? .scaleAspectFill : .scaleAspectFit
-//        self.contentMode = contentNewMode
-//        
-//        dePrint("UIImageView.adaptiveScale contentMode =\(contentNewMode)")
-    }
-}
-
-public extension UIImageView {
-    public 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
-            }
-        }
-    }
-}
-
-
-public extension UIImageView {
-
-    static func retrieveImageInMemoryCache(urlString: String) -> UIImage? {
-        return ImageCache.default.retrieveImageInMemoryCache(forKey: urlString)
-    }
-    
-    static func downloadImageWithProgress(
-        urlString: String,
-        progressHandler: ((Float) -> Void)? = nil,
-        completion: @escaping (UIImage?) -> Void
-    ) {
-
-        guard let url = URL(string: urlString) else {
-            completion(nil)
-            return
-        }
-        
-        KingfisherManager.shared.retrieveImage(
-            with: url,
-            options: [],
-            progressBlock: { receivedSize, totalSize in
-                let progress = Float(receivedSize) / Float(totalSize)
-                DispatchQueue.main.async {
-                    progressHandler?(progress) // 回传进度(主线程)
-                }
-            },
-            completionHandler: { result in
-                DispatchQueue.main.async {
-                    switch result {
-                    case .success(let value):
-                        completion(value.image)
-                    case .failure:
-                        completion(nil)
-                    }
-                }
-            }
-        )
-    }
-    
-    
-}

+ 0 - 89
AIPlayRingtones/Classes/Ex/UILabel+Ex.swift

@@ -62,93 +62,4 @@ public extension UILabel {
         
         return label
     }
-    
-    /// 设置行间距
-    /// - Parameters:
-    ///   - lineSpacing: 行间距
-    ///   - alignment: 对齐方式(默认为左对齐)
-    func setLineSpacing(_ lineSpacing: CGFloat, alignment: NSTextAlignment = .left) {
-        guard let text = self.text else { return }
-        
-        // 创建 NSMutableAttributedString
-        let attributedString = NSMutableAttributedString(string: text)
-        
-        // 创建段落样式
-        let paragraphStyle = NSMutableParagraphStyle()
-        paragraphStyle.lineSpacing = lineSpacing
-        paragraphStyle.alignment = alignment
-        
-        // 应用段落样式到整个文本
-        attributedString.addAttribute(.paragraphStyle, value: paragraphStyle, range: NSRange(location: 0, length: attributedString.length))
-        
-        // 设置属性文本
-        self.attributedText = attributedString
-    }
-}
-
-
-
-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
-    }
-}
-
-public extension UILabel {
-    
-    //用 label 计算更加精准
-     static func getAttributedTextSize(attributedText:NSAttributedString,maxWidth:CGFloat) -> CGSize{
-        let label = UILabel()
-        label.attributedText = attributedText
-        label.numberOfLines = 0
-        var size = label.sizeThatFits(CGSize(width: maxWidth, height: .greatestFiniteMagnitude))
-        return size
-    }
-}
-
-
-public extension UILabel {
-    func applyGradient(colors: [UIColor], locations: [NSNumber]? = nil, startPoint: CGPoint = CGPoint(x: 0.0, y: 0.5), endPoint: CGPoint = CGPoint(x: 1.0, y: 0.5)) {
-        // 创建一个 CAGradientLayer 实例,用于实现渐变色
-        let gradientLayer = CAGradientLayer()
-        // 设置渐变层的大小与 UILabel 的大小一致
-        gradientLayer.frame = bounds
-        // 将 UIColor 数组转换为 CGColor 数组
-        gradientLayer.colors = colors.map { $0.cgColor }
-        // 设置渐变颜色的位置,如果没有提供,则默认均匀分布
-        gradientLayer.locations = locations
-        // 设置渐变的起始点
-        gradientLayer.startPoint = startPoint
-        // 设置渐变的结束点
-        gradientLayer.endPoint = endPoint
-
-        // 创建一个新的图形上下文
-        UIGraphicsBeginImageContextWithOptions(bounds.size, false, UIScreen.main.scale)
-        if let context = UIGraphicsGetCurrentContext() {
-            // 将渐变层渲染到图形上下文中
-            gradientLayer.render(in: context)
-            // 从图形上下文中获取渐变图像
-            if let gradientImage = UIGraphicsGetImageFromCurrentImageContext() {
-                // 结束图形上下文
-                UIGraphicsEndImageContext()
-                // 设置 UILabel 的文本颜色为渐变图像
-                textColor = UIColor(patternImage: gradientImage)
-            }
-        }
-    }
 }

+ 0 - 43
AIPlayRingtones/Classes/Ex/UIScreen.swift

@@ -1,43 +0,0 @@
-//
-//  UIScreen.swift
-//  TSLiveWallpaper
-//
-//  Created by 100Years on 2024/12/23.
-//
-
-public extension UIScreen {
-    
-    public static var _scale: CGFloat {
-        if #available(iOS 13.0, *), Thread.isMainThread,
-           let scale = UIApplication._keyWindow?.windowScene?.screen.scale {
-            return scale
-        }
-        return main.scale
-    }
-    
-    public static var _width: CGFloat {
-        if #available(iOS 13.0, *), Thread.isMainThread,
-           let width = UIApplication._keyWindow?.windowScene?.screen.bounds.width {
-            return width
-        }
-        return main.bounds.width
-    }
-    
-    public static var _height: CGFloat {
-        if #available(iOS 13.0, *), Thread.isMainThread,
-           let height = UIApplication._keyWindow?.windowScene?.screen.bounds.height {
-            return height
-        }
-        return main.bounds.height
-    }
-    
-    public static var _size: CGSize {
-        if #available(iOS 13.0, *), Thread.isMainThread,
-           let size = UIApplication._keyWindow?.windowScene?.screen.bounds.size {
-            return size
-        }
-        return main.bounds.size
-    }
-    
-}
-

+ 0 - 196
AIPlayRingtones/Classes/Ex/UITableView+Ex.swift

@@ -1,196 +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
-
-public 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
-    
-    public 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
-        }
-    }
-
-    public 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()
-//        }
-    }
-
-    public func handleMJRefreshWithError(_ error: String?) {
-//        if pageNum <= PAGENUM {
-//            mj_header?.endRefreshing()
-//        } else {
-//            mj_footer?.endRefreshing()
-//        }
-    }
-
-    public 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)
-        }
-    }
-
-    public func initBaseTableView(reuseClass cellIds: [String], isUseMJRefresh: Bool, delegate: UITableViewDelegate & UITableViewDataSource) {
-        setUpTableView()
-        self.isUseMJRefresh = isUseMJRefresh
-        self.delegate = delegate
-        self.dataSource = delegate
-
-        registerCellClass(cellIds: cellIds)
-    }
-    
-    public 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 - 7
AIPlayRingtones/Classes/Ex/UITextView+Ex.swift

@@ -1,7 +0,0 @@
-//
-//  UITextView+Ex.swift
-//  AIEmoji
-//
-//  Created by 100Years on 2025/1/16.
-//
-

+ 0 - 299
AIPlayRingtones/Classes/Ex/UIView+Ex.swift

@@ -30,205 +30,6 @@ public extension UIView {
         layer.insertSublayer(gl, at: 0)
     }
     
-    /// 慎用
-    /// 给 view 增加圆角阴影,会改变视图结构,慎用,
-    /// 需add 且确定frame后再调用
-    /// > Note: 慎用
-    /// - Parameters:
-    ///   - cornerRadius: 视图圆角
-    ///   - shadowColor: 阴影颜色
-    ///   - shadowOffset: 阴影偏移量
-    ///   - shadowRadius: 阴影扩散距离
-    ///   - shadowOpacity: 阴影透明度
-    @discardableResult
-    public 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)
-        self.clipsToBounds = false
-        self.layer.masksToBounds = true
-        self.layer.cornerRadius = cornerRadius
-        
-        return shadowView
-        
-    }
-    
-    
-
-    /// 给 view 增加阴影
-    /// - Parameters:
-    ///   - cornerRadius: 视图圆角
-    ///   - shadowColor: 阴影颜色
-    ///   - shadowOffset: 阴影偏移量
-    ///   - shadowRadius: 阴影扩散距离
-    ///   - shadowOpacity: 阴影透明度
-    @discardableResult
-    public func addShadow(shadowColor: CGColor?,
-                          shadowOffset: CGSize,
-                          shadowRadius: CGFloat,
-                          shadowOpacity: Float){
-        layer.shadowColor = shadowColor
-        layer.shadowOffset = shadowOffset
-        layer.shadowOpacity = shadowOpacity
-        layer.shadowRadius = shadowRadius
-    }
-}
-
-public extension UIView {
-
-    public enum MaskContentMode {
-            case scaleToFill
-            case scaleAspectFit
-            case scaleAspectFill
-        }
-
-        /// 设置图片蒙版,支持指定 `contentMode` 和缩小比例
-        /// - Parameters:
-        ///   - image: 用作蒙版的图片
-        ///   - contentMode: 蒙版的内容模式
-        ///   - scaleFactor: 缩小比例,默认 1.0 表示不缩放,0.8 表示缩小为 80%
-    public func setImageMask(image: UIImage, contentMode: MaskContentMode = .scaleAspectFit, scaleFactor: CGFloat = 1.0) {
-            guard scaleFactor > 0 && scaleFactor <= 1 else {
-                print("Invalid scaleFactor. It must be in the range (0, 1].")
-                return
-            }
-            
-            // 创建一个 CALayer 来作为蒙版
-            let maskLayer = CALayer()
-            maskLayer.contents = image.cgImage
-            
-            // 计算蒙版的 frame
-            let viewSize = self.bounds.size
-            let imageSize = image.size
-            
-            var maskFrame: CGRect = .zero
-            
-            switch contentMode {
-            case .scaleToFill:
-                // 拉伸填充整个视图
-                maskFrame = CGRect(origin: .zero, size: viewSize)
-                
-            case .scaleAspectFit:
-                // 按比例缩放,适配视图并居中
-                let aspectWidth = viewSize.width / imageSize.width
-                let aspectHeight = viewSize.height / imageSize.height
-                let aspectRatio = min(aspectWidth, aspectHeight) // 按比例适配
-                
-                let scaledWidth = imageSize.width * aspectRatio * scaleFactor
-                let scaledHeight = imageSize.height * aspectRatio * scaleFactor
-                let xOffset = (viewSize.width - scaledWidth) / 2
-                let yOffset = (viewSize.height - scaledHeight) / 2
-                
-                maskFrame = CGRect(x: xOffset, y: yOffset, width: scaledWidth, height: scaledHeight)
-                
-            case .scaleAspectFill:
-                // 按比例缩放,填充视图并裁剪多余部分
-                let aspectWidth = viewSize.width / imageSize.width
-                let aspectHeight = viewSize.height / imageSize.height
-                let aspectRatio = max(aspectWidth, aspectHeight) // 按比例填充
-                
-                let scaledWidth = imageSize.width * aspectRatio * scaleFactor
-                let scaledHeight = imageSize.height * aspectRatio * scaleFactor
-                let xOffset = (viewSize.width - scaledWidth) / 2
-                let yOffset = (viewSize.height - scaledHeight) / 2
-                
-                maskFrame = CGRect(x: xOffset, y: yOffset, width: scaledWidth, height: scaledHeight)
-            }
-            
-            maskLayer.frame = maskFrame
-            
-            // 设置蒙版
-            self.layer.mask = maskLayer
-        }
-}
-
-
-// Frame
-public extension UIView {
-    
-    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 { context in
-            drawHierarchy(in: CGRect(origin: origin, size: bounds.size), afterScreenUpdates: true)
-        }
-        return image
-    }
-
-    func toImage() -> UIImage? {
-        let renderer = UIGraphicsImageRenderer(bounds: self.bounds)
-        let image = renderer.image { context in
-            self.layer.render(in: context.cgContext)
-        }
-        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 {
@@ -242,61 +43,6 @@ public extension UIView {
     }
 }
 
-public extension UIView {
-    /// 为视图添加高斯模糊效果
-    /// - Parameters:
-    ///   - blurRadius: 模糊半径(默认 10.0)
-    ///   - fillColor: 填充颜色(可选,默认透明)
-    func applyGaussianBlur(blurRadius: CGFloat = 10.0, fillColor: UIColor? = nil) {
-        // 移除已有的模糊效果
-        self.removeBlurEffect()
-        
-        // 创建模糊效果
-        let blurEffect = UIBlurEffect(style: .light)
-        let blurView = UIVisualEffectView(effect: blurEffect)
-        blurView.frame = self.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: self.bounds)
-            colorOverlay.backgroundColor = color
-            colorOverlay.autoresizingMask = [.flexibleWidth, .flexibleHeight]
-            colorOverlay.isUserInteractionEnabled = false
-            blurView.contentView.addSubview(colorOverlay)
-        }
-        
-        self.addSubview(blurView)
-    }
-    
-    /// 移除模糊效果
-    func removeBlurEffect() {
-        for subview in subviews {
-            if subview is UIVisualEffectView {
-                subview.removeFromSuperview()
-            }
-        }
-    }
-    
-}
-
-public extension UIView {
-    static func creatColor(color:UIColor) -> UIView {
-        let view = UIView()
-        view.backgroundColor = color
-        return view
-    }
-}
-
 
 public extension UIView {
     func removeAllSubViews() {
@@ -307,51 +53,6 @@ public extension UIView {
 }
 
 
-public func kGetSubFrame(superSize: CGSize, subViewSize: CGSize, contentMode: UIView.ContentMode = .scaleAspectFit, scaleFactor: CGFloat = 1.0)-> CGRect {
-    guard scaleFactor > 0 && scaleFactor <= 1 else {
-        print("Invalid scaleFactor. It must be in the range (0, 1].")
-        return CGRect(origin: .zero, size: superSize)
-    }
-    
-    var maskFrame: CGRect = .zero
-    switch contentMode {
-    case .scaleToFill:
-        // 拉伸填充整个视图
-        maskFrame = CGRect(origin: .zero, size: superSize)
-        
-    case .scaleAspectFit:
-        // 按比例缩放,适配视图并居中
-        let aspectWidth = superSize.width / subViewSize.width
-        let aspectHeight = superSize.height / subViewSize.height
-        let aspectRatio = min(aspectWidth, aspectHeight) // 按比例适配
-        
-        let scaledWidth = subViewSize.width * aspectRatio * scaleFactor
-        let scaledHeight = subViewSize.height * aspectRatio * scaleFactor
-        let xOffset = (superSize.width - scaledWidth) / 2
-        let yOffset = (superSize.height - scaledHeight) / 2
-        
-        maskFrame = CGRect(x: xOffset, y: yOffset, width: scaledWidth, height: scaledHeight)
-        
-    case .scaleAspectFill:
-        // 按比例缩放,填充视图并裁剪多余部分
-        let aspectWidth = superSize.width / subViewSize.width
-        let aspectHeight = superSize.height / subViewSize.height
-        let aspectRatio = max(aspectWidth, aspectHeight) // 按比例填充
-        
-        let scaledWidth = subViewSize.width * aspectRatio * scaleFactor
-        let scaledHeight = subViewSize.height * aspectRatio * scaleFactor
-        let xOffset = (superSize.width - scaledWidth) / 2
-        let yOffset = (superSize.height - scaledHeight) / 2
-        
-        maskFrame = CGRect(x: xOffset, y: yOffset, width: scaledWidth, height: scaledHeight)
-    default:
-        maskFrame = CGRect(origin: .zero, size: superSize)
-    }
-    
-    return maskFrame
-}
-
-
 public extension UIView {
     /// 添加渐变色边框
     /// - Parameters:

+ 0 - 14
AIPlayRingtones/Classes/Ex/UIView+Frame.swift

@@ -116,17 +116,3 @@ public extension UIView {
     }
     
 }
-
-public extension UIScreen {
-    static let size = {
-        UIScreen.main.bounds.size
-    }()
-    
-    static var width: CGFloat {
-        return size.width
-    }
-    
-    static var height: CGFloat {
-        return size.height
-    }
-}

+ 0 - 24
AIPlayRingtones/Classes/Ex/UIView+Rotating.swift

@@ -47,27 +47,3 @@ public extension UIView {
         }
     }
 }
-
-public extension UIView {
-    /// 图片透明度循环动画
-    /// - Parameters:
-    ///   - minAlpha: 最小透明度(默认为 0.1)
-    ///   - duration: 动画时长(单次透明度变化的时长,默认为 1 秒)
-    func startAlphaAnimation(minAlpha: CGFloat = 0.1, duration: TimeInterval = 1.0) {
-        // 防止重复添加动画
-        self.layer.removeAllAnimations()
-        
-        // 开始动画
-        UIView.animate(withDuration: duration, delay: 0, options: [.autoreverse, .repeat]) {
-            self.alpha = minAlpha
-        } completion: { _ in
-            self.alpha = 1.0 // 确保最终状态为 1.0
-        }
-    }
-    
-    /// 停止透明度动画
-    func stopAlphaAnimation() {
-        self.layer.removeAllAnimations()
-        self.alpha = 1.0 // 恢复到默认状态
-    }
-}

+ 1 - 97
AIPlayRingtones/Classes/Ex/UIViewController+Ex.swift

@@ -52,103 +52,7 @@ public extension UIViewController {
         // 显示弹窗
         present(alert, animated: true, completion: nil)
     }
-    
-    
-    
-    
-    
-    func showDeleteAlert(
-        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)
-    }
-    
-    
-    func showDeleteErrorAlert(
-        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: "Retain".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
AIPlayRingtones/Classes/Ex/UserDefault+Ex.swift

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

+ 7 - 27
AIPlayRingtones/Classes/GlobalImports/GlobalImports.swift

@@ -27,7 +27,7 @@ public func k_Height_statusBar() -> CGFloat {
 public func k_Height_safeAreaInsetsTop() -> CGFloat {
     if #available(iOS 13.0, *) {
         let scene = UIApplication.shared.connectedScenes.first;
-        guard let windowScene = scene as? UIWindowScene else {return 0}; // guard:如果 expression 值计算为false,则执行代码块内的 guard 语句。(必须包含一个控制语句: return、 break、 continue 或 throw。)。as?:类型转换,(还有这两种:as、as!)
+        guard let windowScene = scene as? UIWindowScene else {return 0};
         guard let window = windowScene.windows.first else {return 0};
         return window.safeAreaInsets.top;
     } else if #available(iOS 11.0, *) {
@@ -67,19 +67,6 @@ public let k_TabBar_Height :CGFloat = 49.0
 public let k_Height_TabBar :CGFloat = k_Height_safeAreaInsetsBottom() + k_TabBar_Height
 
 
-
-// MARK: - 检查系统版本 -
-/* 检查系统版本 */
-/// 版本号相同:
-public func systemVersionEqual(version:String) -> Bool {
-    return UIDevice.current.systemVersion == version
-}
-
-/// 系统版本高于等于该version  测试发现只能传入带一位小数点的版本号  不然会报错    具体原因待探究
-public func systemVersionGreaterThan(version:String) -> Bool {
-    return UIDevice.current.systemVersion.compare(version, options: .numeric, range: version.startIndex..<version.endIndex, locale: Locale(identifier:version)) != ComparisonResult.orderedAscending
-}
-
 //判断是否是 x、及x以上 系列
 public func isIphoneX() -> Bool {
     return k_Height_safeAreaInsetsBottom() > 0.0; // 底部安全区 > 0 时,
@@ -104,9 +91,9 @@ public func debugPrint<T>(_ messsage: T, file: String = #file, funcName: String
 }
 
 public func dePrint<T>(_ messsage: T) {
-//    #if DEBUG
+    #if DEBUG
     print(Date.hmsString + " \(messsage)")
-//    #endif
+    #endif
 }
 
 public func className(from object: Any) -> String {
@@ -123,17 +110,6 @@ public func appVersion() ->String{
     return "V" + short
 }
 
-/// 震动
-public func playVibration() {
-    // 默认震动   kSystemSoundID_Vibrate
-    // 1519     短震 3D Touch中的peek震动反馈
-    // 1520     短震 3D Touch中的pop震动反馈
-    // 1521     连续三次短震动
-    // peek的震动反馈轻于pop
-    
-    let soundID: UInt32 = 1520
-    AudioServicesPlaySystemSound(soundID)
-}
 
 public func kPresentModalVC(target:UIViewController,
                      modelVC:UIViewController,
@@ -165,3 +141,7 @@ public func kGetVideoThumbnail(from videoURL: URL) -> UIImage? {
         return nil
     }
 }
+
+public func kShowToastDataMissing(){
+    
+}

+ 0 - 147
AIPlayRingtones/Classes/Tool/PhotoManager.swift

@@ -1,147 +0,0 @@
-//
-//  PhotoManager.swift
-//  TSLiveWallpaper
-//
-//  Created by 100Years on 2024/12/24.
-//
-
-
-
-
-import Photos
-import UIKit
-
-public let PhotoManagerShared = PhotoManager.shared
-open class PhotoManager {
-    public static let shared = PhotoManager()
-
-    public func saveImagesToUniqueAlbum(images: [UIImage], baseAlbumName: String, completion: @escaping (Bool, Error?) -> Void) {
-        // 检查并请求权限
-        PHPhotoLibrary.requestAuthorization { status in
-            guard status == .authorized else {
-                completion(false, NSError(domain: "PhotoLibrary", code: 1, userInfo: [NSLocalizedDescriptionKey: "未获得相册访问权限"]))
-                return
-            }
-
-            // 获取所有相册名称
-            let allAlbumNames = self.fetchAllAlbumNames()
-            let uniqueAlbumName = self.generateUniqueAlbumName(baseName: baseAlbumName, existingNames: allAlbumNames)
-            
-            // 保存图片到生成的相册
-            self.saveImagesToAlbum(images: images, albumName: uniqueAlbumName, completion: completion)
-        }
-    }
-
-    // 获取所有相册名称
-    private func fetchAllAlbumNames() -> [String] {
-        var albumNames: [String] = []
-        
-        let userCollections = PHCollectionList.fetchTopLevelUserCollections(with: nil)
-        userCollections.enumerateObjects { collection, _, _ in
-            if let album = collection as? PHAssetCollection, let albumName = album.localizedTitle {
-                albumNames.append(albumName)
-            }
-        }
-        
-        return albumNames
-    }
-
-    // 生成唯一的相册名称
-    private func generateUniqueAlbumName(baseName: String, existingNames: [String]) -> String {
-        var uniqueName = baseName
-        var index = 1
-        
-        while existingNames.contains(uniqueName) {
-            uniqueName = "\(baseName)-\(index)"
-            index += 1
-        }
-        
-        return uniqueName
-    }
-
-    // 保存图片到指定相册(之前提供的 saveImagesToAlbum 方法)
-    private func saveImagesToAlbum(images: [UIImage], albumName: String, completion: @escaping (Bool, Error?) -> Void) {
-        var albumPlaceholder: PHObjectPlaceholder?
-        let fetchOptions = PHFetchOptions()
-        fetchOptions.predicate = NSPredicate(format: "title = %@", albumName)
-        let collection = PHAssetCollection.fetchAssetCollections(with: .album, subtype: .any, options: fetchOptions)
-        
-        if let existingAlbum = collection.firstObject {
-            saveImages(images: images, to: existingAlbum, completion: completion)
-        } else {
-            PHPhotoLibrary.shared().performChanges {
-                let creationRequest = PHAssetCollectionChangeRequest.creationRequestForAssetCollection(withTitle: albumName)
-                albumPlaceholder = creationRequest.placeholderForCreatedAssetCollection
-            } completionHandler: { success, error in
-                guard success, let placeholder = albumPlaceholder else {
-                    completion(false, error)
-                    return
-                }
-                
-                let fetchResult = PHAssetCollection.fetchAssetCollections(withLocalIdentifiers: [placeholder.localIdentifier], options: nil)
-                if let newAlbum = fetchResult.firstObject {
-                    self.saveImages(images: images, to: newAlbum, completion: completion)
-                } else {
-                    completion(false, NSError(domain: "PhotoLibrary", code: 2, userInfo: [NSLocalizedDescriptionKey: "创建相册失败"]))
-                }
-            }
-        }
-    }
-
-    // 保存图片到指定相册
-    private func saveImages(images: [UIImage], to album: PHAssetCollection, completion: @escaping (Bool, Error?) -> Void) {
-        PHPhotoLibrary.shared().performChanges {
-            let assetRequest = images.map { PHAssetChangeRequest.creationRequestForAsset(from: $0) }
-            let assetPlaceholders = assetRequest.compactMap { $0.placeholderForCreatedAsset }
-            
-            guard !assetPlaceholders.isEmpty else { return }
-            
-            if let albumChangeRequest = PHAssetCollectionChangeRequest(for: album) {
-                albumChangeRequest.addAssets(assetPlaceholders as NSArray)
-            }
-        } completionHandler: { success, error in
-            completion(success, error)
-        }
-    }
-    
-    
-    
-    /// 保存图片到相册
-    /// - Parameters:
-    ///   - image: 要保存的 UIImage
-    ///   - completion: 保存结果的回调,返回成功与否和错误信息
-    public func saveImageToAlbum(_ image: UIImage, completion: @escaping (Bool, Error?) -> Void) {
-        // 检查相册权限
-        PHPhotoLibrary.requestAuthorization { status in
-            DispatchQueue.main.async {
-                switch status {
-                case .authorized:
-                    // 权限已授权,保存图片
-                    self.save(image: image, completion: completion)
-                case .limited:
-                    // 在受限权限下保存图片
-                    self.save(image: image, completion: completion)
-                case .denied, .restricted:
-                    // 权限被拒绝或受限
-                    completion(false, NSError(domain: "PhotoSaver", code: 1, userInfo: [NSLocalizedDescriptionKey: "Photo Library access is denied."]))
-                case .notDetermined:
-                    // 不会进入这个分支,因为已经请求了权限
-                    completion(false, NSError(domain: "PhotoSaver", code: 2, userInfo: [NSLocalizedDescriptionKey: "Photo Library access not determined."]))
-                @unknown default:
-                    completion(false, NSError(domain: "PhotoSaver", code: 3, userInfo: [NSLocalizedDescriptionKey: "Unknown authorization status."]))
-                }
-            }
-        }
-    }
-
-    /// 保存图片到相册的具体实现
-    private func save(image: UIImage, completion: @escaping (Bool, Error?) -> Void) {
-        PHPhotoLibrary.shared().performChanges({
-            PHAssetChangeRequest.creationRequestForAsset(from: image)
-        }) { success, error in
-            DispatchQueue.main.async {
-                completion(success, error)
-            }
-        }
-    }
-}

+ 0 - 63
AIPlayRingtones/Classes/Tool/SVProgressHUD+Ex.swift

@@ -1,63 +0,0 @@
-//
-//  SVProgressHUD+Ex.swift
-//  TSSmalCoacopods_Example
-//
-//  Created by 100Years on 2025/3/11.
-//  Copyright © 2025 CocoaPods. All rights reserved.
-//
-import Foundation
-import ObjectiveC
-import SVProgressHUD
-extension SVProgressHUD {
-    // 重写 moveToPoint:rotateAngle: 方法
-    @objc dynamic func swizzledMoveToPoint(_ newCenter: CGPoint, rotateAngle angle: CGFloat) {
-        // 调用原方法
-        self.swizzledMoveToPoint(newCenter, rotateAngle: angle)
-//        print("swizzledMoveToPoint swizzledMoveToPoint")
-        // 使用运行时获取 hudView 属性
-        if let hudView = getHudView() {
-            if let containerView = containerView {
-                hudView.center = CGPoint(x: containerView.bounds.size.width/2 + offsetFromCenter.horizontal, y: containerView.bounds.size.height/2 + offsetFromCenter.vertical)
-            } else {
-                hudView.center = CGPoint(x: newCenter.x + offsetFromCenter.horizontal, y: newCenter.y + offsetFromCenter.vertical)
-            }
-        }
-    }
-    
-    // 获取 hudView 属性
-    private func getHudView() -> UIVisualEffectView? {
-        var count: UInt32 = 0
-        guard let classProperties = class_copyPropertyList(SVProgressHUD.self, &count) else {
-            return nil
-        }
-        
-        for i in 0..<Int(count) {
-            let property = classProperties[i]
-            let propertyName = String(cString: property_getName(property))
-            if propertyName == "hudView" {
-                let hudView = value(forKey: propertyName) as? UIVisualEffectView
-                free(classProperties)
-                return hudView
-            }
-        }
-        
-        free(classProperties)
-        return nil
-    }
-}
-
-// 方法交换
-extension SVProgressHUD {
-    static func swizzleMethods() {
-        // 手动创建选择器
-        let originalSelector = NSSelectorFromString("moveToPoint:rotateAngle:")
-        let swizzledSelector = #selector(SVProgressHUD.swizzledMoveToPoint(_:rotateAngle:))
-        
-        let originalMethod = class_getInstanceMethod(SVProgressHUD.self, originalSelector)
-        let swizzledMethod = class_getInstanceMethod(SVProgressHUD.self, swizzledSelector)
-        
-        if let originalMethod = originalMethod, let swizzledMethod = swizzledMethod {
-            method_exchangeImplementations(originalMethod, swizzledMethod)
-        }
-    }
-}

+ 0 - 182
AIPlayRingtones/Classes/Tool/TSCommonTool/TSCommonTool+Down.swift

@@ -1,182 +0,0 @@
-//
-//  TSCommonTool+Down.swift
-//  Pods
-//
-//  Created by 100Years on 2025/3/17.
-//
-
-public extension TSCommonTool {
-    
-    /// 下载并缓存文件,依据 URL 的后缀名动态设置文件名
-    /// - Parameters:
-    ///   - url: 文件的 URL 地址
-    ///   - completion: 完成回调,返回本地缓存路径或错误
-    public static func downloadAndCacheFile(from urlString: String, fileEx:String? = nil,missingEx:String? = nil, cacheDirectory:String = "cacheAll",completion: @escaping (String?, Error?) -> Void) {
-        
-        guard let url = URL(string: urlString) else{
-            completion(nil, NSError(domain: "url null", code: 0))
-            return
-        }
-        
-        
-        guard let cachedFileURL = checkURLString(
-            from: urlString,
-            fileEx: fileEx,
-            missingEx: missingEx,
-            cacheDirectory: cacheDirectory,
-            completion: completion
-        ) else {
-            return
-        }
-        
-        let fileManager = FileManager.default
-        //检查文件是否已存在于缓存中
-        if fileManager.fileExists(atPath: cachedFileURL.path) {
-            print("文件已存在于缓存中: \(cachedFileURL)")
-            completion(cachedFileURL.path, nil)
-            return
-        }
-        
-        // 下载文件
-        let task = URLSession.shared.downloadTask(with: url) { tempFileURL, response, error in
-            if let error = error {
-                DispatchQueue.main.async {
-                    completion(nil, error)
-                }
-                return
-            }
-            
-            guard let tempFileURL = tempFileURL else {
-                DispatchQueue.main.async {
-                    completion(nil, NSError(domain: "DownloadError", code: -1, userInfo: [NSLocalizedDescriptionKey: "临时文件路径不存在"]))
-                }
-                return
-            }
-            
-            do {
-                if fileManager.fileExists(atPath: cachedFileURL.path) {
-                    try fileManager.removeItem(atPath:cachedFileURL.path)
-                    dePrint("下载成功,移除已有的旧文件: \(cachedFileURL)")
-                }
-                try fileManager.moveItem(at: tempFileURL, to: cachedFileURL)
-                dePrint("文件下载并缓存成功: \(cachedFileURL)")
-                DispatchQueue.main.async {
-                    completion(cachedFileURL.path, nil)
-                }
-            } catch {
-                dePrint("文件下载成功,但失败:\(error)")
-                DispatchQueue.main.async {
-                    completion(nil, error)
-                }
-            }
-        }
-        
-        task.resume()
-    }
-    
-    
-    //检查 url 对不对
-    public static func checkURLString(
-        from urlString: String,
-        fileEx:String? = nil,
-    missingEx:String? = nil,
-        cacheDirectory:String = "cacheAll",
-        completion:((String?, Error?) -> Void)? = nil
-    )->URL?
-    {
-        guard let url = URL(string: urlString) else{
-            completion?(nil, NSError(domain: "url null", code: 0))
-            return nil
-        }
-        
-        
-        if !urlString.contains("http") && urlString.contains("/"){
-            completion?(urlString.fillCachePath, nil)
-            return nil
-        }
-        
-        let fileManager = FileManager.default
-        
-        // 获取缓存目录下的 `cacheAll` 文件夹路径
-        let cachesDirectory = fileManager.urls(for: .cachesDirectory, in: .userDomainMask).first!
-        let cacheVideoDirectory = cachesDirectory.appendingPathComponent(cacheDirectory)
-        
-        // 创建 `cacheAll` 文件夹(如果不存在)
-        if !fileManager.fileExists(atPath: cacheVideoDirectory.path) {
-            do {
-                try fileManager.createDirectory(at: cacheVideoDirectory, withIntermediateDirectories: true, attributes: nil)
-            } catch {
-                completion?(nil, error)
-                return nil
-            }
-        }
-        
-        var fileName = url.path.md5
-        
-        // 使用 URL 的 MD5 哈希值作为缓存文件名,附加 URL 的后缀名
-        var fileExtension = ""
-        
-        if let fileEx = fileEx {
-            fileExtension = fileEx
-        }else{
-            var missingExStr = ""
-            if let missingEx = missingEx {
-                missingExStr = missingEx
-            }
-            fileExtension = url.pathExtension.isEmpty ? missingExStr : url.pathExtension
-        }
-
-        if fileExtension.count > 0 {
-            fileName = url.path.md5 + ".\(fileExtension)"
-        }
-        
-        let cachedFileURL = cacheVideoDirectory.appendingPathComponent(fileName)
-        return cachedFileURL
-
-    }
-    
-//    func a(){
-//        var fileName = url.path.md5
-//        
-//        // 使用 URL 的 MD5 哈希值作为缓存文件名,附加 URL 的后缀名
-//        var fileExtension = ""
-//        
-//        if let fileEx = fileEx {
-//            fileExtension = "fileEx"
-//        }else{
-//            var missingExStr = ""
-//            if let missingEx = missingEx {
-//                missingExStr = missingEx
-//            }
-//            fileExtension = url.pathExtension.isEmpty ? missingExStr : url.pathExtension
-//        }
-//
-//        if fileExtension.count > 0 {
-//            fileName = url.path.md5 + ".\(fileExtension)"
-//        }
-//
-//    }
-    
-    //获取 urlstring 本地的缓存 url path
-    public static func getCachedURLString(
-        from urlString: String,
-        fileEx:String? = nil,
-    missingEx:String? = nil,
-        cacheDirectory:String = "cacheAll")->URL?{
-        
-        if let cachedFileURL = checkURLString(
-            from: urlString,
-            fileEx: fileEx,
-            missingEx: missingEx,
-            cacheDirectory: cacheDirectory
-        ){
-            //检查文件是否已存在于缓存中
-            if FileManager.default.fileExists(atPath: cachedFileURL.path) {
-                print("文件已存在于缓存中: \(cachedFileURL)")
-                return cachedFileURL
-            }
-        }
-        
-        return nil
-    }
-}

+ 0 - 89
AIPlayRingtones/Classes/Tool/TSCommonTool/TSCommonTool+MultDown.swift

@@ -1,89 +0,0 @@
-//
-//  MultiTaskDown.swift
-//  Pods
-//
-//  Created by 100Years on 2025/3/17.
-//
-
-//public extension TSCommonTool {
-//    
-//    /// 多任务下载并缓存文件,依据 URL 的后缀名动态设置文件名
-//    /// - Parameters:
-//    ///   - url: 文件的 URL 地址
-//    ///   - completion: 完成回调,返回本地缓存路径或错误
-//    public static func multidownloadAndCacheFile(
-//        from urlString: String,
-//        fileEx:String? = nil,
-//     missingEx:String? = nil,
-//        cacheDirectory:String = "cacheAll",
-//        progressHandler: @escaping (Double) -> Void,
-//        completion: @escaping (String?, Error?) -> Void) -> TSMultiTaskDownloader?
-//    {
-//        
-//        guard let url = URL(string: urlString) else{
-//            completion(nil, NSError(domain: "url null", code: 0))
-//            return nil
-//        }
-//        
-//    
-//        guard let cachedFileURL = checkURLString(
-//            from: urlString,
-//            fileEx: fileEx,
-//            missingEx: missingEx,
-//            cacheDirectory: cacheDirectory,
-//            completion: completion
-//        ) else {
-//            return nil
-//        }
-//        
-//        let fileManager = FileManager.default
-//        //检查文件是否已存在于缓存中
-//        if fileManager.fileExists(atPath: cachedFileURL.path) {
-//            print("文件已存在于缓存中: \(cachedFileURL)")
-//            completion(cachedFileURL.path, nil)
-//            return nil
-//        }
-//        
-//        
-//        let downloader = TSMultiTaskDownloader.shared
-//        downloader.downloadFile(from: url, progressHandler: { progress in
-//            print("Download progress for file1: \(progress * 100)%")
-//            progressHandler(progress)
-//        }, completionHandler: { tempFileURL, error in
-//            if let error = error {
-//                DispatchQueue.main.async {
-//                    completion(nil, error)
-//                }
-//                return
-//            }
-//            
-//            guard let tempFileURL = tempFileURL else {
-//                DispatchQueue.main.async {
-//                    completion(nil, NSError(domain: "DownloadError", code: -1, userInfo: [NSLocalizedDescriptionKey: "临时文件路径不存在"]))
-//                }
-//                return
-//            }
-//            
-//            do {
-//                if fileManager.fileExists(atPath: cachedFileURL.path) {
-//                    try fileManager.removeItem(atPath:cachedFileURL.path)
-//                    dePrint("下载成功,移除已有的旧文件: \(cachedFileURL)")
-//                }
-//                try fileManager.moveItem(at: tempFileURL, to: cachedFileURL)
-//                dePrint("文件下载并缓存成功: \(cachedFileURL)")
-//                DispatchQueue.main.async {
-//                    completion(cachedFileURL.path, nil)
-//                }
-//            } catch {
-//                dePrint("文件下载成功,但失败:\(error)")
-//                DispatchQueue.main.async {
-//                    completion(nil, error)
-//                }
-//            }
-//        })
-//        
-//        return downloader
-//    }
-//    
-//
-//}

+ 0 - 191
AIPlayRingtones/Classes/Tool/TSCommonTool/TSCommonTool.swift

@@ -1,191 +0,0 @@
-//
-//  TSCommonTool.swift
-//  TSLiveWallpaper
-//
-//  Created by 100Years on 2024/12/20.
-//
-
-import Kingfisher
-import Foundation
-import AVFoundation
-open class TSCommonTool {
-    /// 下载图片,优先从缓存中取,支持设置缓存策略
-    /// - Parameters:
-    ///   - url: 图片的 URL 地址
-    ///   - completion: 完成回调,返回图片或错误
-    public static func fetchImageWithCache(
-        from urlString: String,
-        completion: @escaping (UIImage?, Error?) -> Void
-    ) {
-        if urlString.contains("http") == false,
-           let image = UIImage(named: urlString){
-            completion(image, nil)
-            return
-        }
-        guard let url = URL(string: urlString) else{
-            completion(nil, NSError(domain: "url null", code: 0))
-            return
-        }
-
-        // 配置 Kingfisher 的缓存策略
-        let options: KingfisherOptionsInfo = [
-            .cacheOriginalImage,
-            .memoryCacheExpiration(.days(7)),  // 内存缓存时间
-            .diskCacheExpiration(.days(30)),  // 磁盘缓存时间
-            .cacheSerializer(DefaultCacheSerializer.default)
-        ]
-        
-        // 使用 Kingfisher 检查缓存是否存在
-        let cache = ImageCache.default
-        let cacheKey = url.absoluteString
-        
-        cache.retrieveImage(forKey: cacheKey, options: nil) { result in
-            switch result {
-            case .success(let value):
-                if let image = value.image {
-                    // 从缓存中取到图片
-                    completion(image, nil)
-                } else {
-                    // 缓存中不存在图片,进行下载
-                    downloadImage(from: url, options: options, completion: completion)
-                }
-            case .failure(let error):
-                // 缓存检查失败,直接下载
-                print("缓存检查失败: \(error.localizedDescription)")
-                downloadImage(from: url, options: options, completion: completion)
-            }
-        }
-    }
-    
-    
-    /// 获取已缓存的磁盘图片文件路径
-    /// - Parameters:
-    ///   - urlString: 图片的 URL 地址
-    ///   - completion: 完成回调,返回图片的磁盘路径或错误
-    public static func fetchImagePathWithCache(
-        from urlString: String,
-        completion: @escaping (String?, Error?) -> Void
-    ) {
-        guard let url = URL(string: urlString) else {
-            completion(nil, NSError(domain: "InvalidURL", code: 0, userInfo: [NSLocalizedDescriptionKey: "无效的 URL"]))
-            return
-        }
-        
-        let cache = ImageCache.default
-        let cacheKey = url.absoluteString
-        if cache.isCached(forKey: cacheKey) {
-            completion(cache.cachePath(forKey: cacheKey), nil)
-        }else {
-          completion(nil, NSError(domain: "CachePathError", code: 1, userInfo: [NSLocalizedDescriptionKey: "无法获取缓存路径"]))
-        }
-
-    }
-    
-
-    /// 下载图片并缓存
-    /// - Parameters:
-    ///   - url: 图片的 URL 地址
-    ///   - options: Kingfisher 下载和缓存的选项
-    ///   - completion: 完成回调,返回图片或错误
-    public static func downloadImage(
-        from url: URL,
-        options: KingfisherOptionsInfo,
-        completion: @escaping (UIImage?, Error?) -> Void
-    ) {
-        KingfisherManager.shared.retrieveImage(with: url, options: options,progressBlock: { receivedSize, totalSize in
-            debugPrint(receivedSize)
-        }) { result in
-            switch result {
-            case .success(let value):
-                completion(value.image, nil)
-            case .failure(let error):
-                completion(nil, error)
-            }
-        }
-    }
-
-}
-
-
-
-
-
-
-public let kMainQueue = DispatchQueue.main
-/// 主线程延迟执行回调
-/// - Parameters:
-///   - delay: 延迟时间(秒)
-///   - completion: 延迟后的回调
-public func kDelayOnMainThread(_ delay: TimeInterval, completion: @escaping () -> Void) {
-    DispatchQueue.main.asyncAfter(deadline: .now() + delay) {
-        completion()
-    }
-}
-
-public func kDelayMainShort(completion: @escaping () -> Void) {
-    DispatchQueue.main.asyncAfter(deadline: .now() + 0.1) {
-        completion()
-    }
-}
-
-/// 在主线程上执行代码
-/// - Parameter block: 要执行的代码块
-public func kExecuteOnMainThread(_ block: @escaping () -> Void) {
-    if Thread.isMainThread {
-        block()
-    } else {
-        DispatchQueue.main.async {
-            block()
-        }
-    }
-}
-
-
-/// 子 size 根据容器 size,返回自己的最大 size
-/// - Parameters:
-///   - containerSize: 容器 Size
-///   - subviewSize: 子 Size
-///   - contentInset: contentInset
-///   - contentMode: contentMode
-/// - Returns: 最大 size
-public func kCalculateScaledSize(containerSize: CGSize, subviewSize: CGSize, contentInset: UIEdgeInsets = .zero ,contentMode:UIView.ContentMode) -> CGSize {
-    // 计算去除边距后的容器可用大小
-    let availableWidth = containerSize.width - contentInset.left - contentInset.right
-    let availableHeight = containerSize.height - contentInset.top - contentInset.bottom
-    
-    switch contentMode {
-    case .scaleToFill:
-        // 直接填充容器,忽略子视图比例
-        return CGSize(width: availableWidth, height: availableHeight)
-    case .scaleAspectFit:
-        // 按比例适配容器,确保子视图完全显示在容器内
-        let widthRatio = availableWidth / subviewSize.width
-        let heightRatio = availableHeight / subviewSize.height
-        let scale = min(widthRatio, heightRatio)
-        return CGSize(width: subviewSize.width * scale, height: subviewSize.height * scale)
-    case .scaleAspectFill:
-        // 按比例填充容器,可能会裁剪子视图
-        let widthRatio = availableWidth / subviewSize.width
-        let heightRatio = availableHeight / subviewSize.height
-        let scale = max(widthRatio, heightRatio)
-        return CGSize(width: subviewSize.width * scale, height: subviewSize.height * scale)
-    default:
-        // 默认返回子视图原始大小
-        return subviewSize
-    }
-}
-
-
-public func kGetCollectionViewCellSize(sectionInset:UIEdgeInsets,
-               itemSpacing:CGFloat,
-               originalSize:CGSize,
-               cellRowNum:Int)->CGSize{
-    let widthReduction:CGFloat = 1.0
-    let originalScale = originalSize.width/originalSize.height
-    var w = k_ScreenWidth-sectionInset.left-sectionInset.right-widthReduction
-    w = w - itemSpacing * CGFloat((cellRowNum-1))
-    w = w/CGFloat(cellRowNum)
-    let h = w/originalScale
-    let cellSize = CGSizeMake(w, h)
-    return cellSize
-}

+ 0 - 83
AIPlayRingtones/Classes/Tool/TSCommonTool/TSMultiTaskDownloader.swift

@@ -1,83 +0,0 @@
-//
-//  TSMultiTaskDownloader.swift
-//  Pods
-//
-//  Created by 100Years on 2025/3/17.
-//
-
-import Foundation
-
-//public class TSMultiTaskDownloader: NSObject, URLSessionDownloadDelegate {
-//    
-//    public static let shared = TSMultiTaskDownloader()
-//    
-//    private var session: URLSession!
-//    private var downloadTasks: [URLSessionDownloadTask] = []
-//    private var progressHandlers: [URL: (Double) -> Void] = [:]
-//    private var completionHandlers: [URL: (URL?, Error?) -> Void] = [:]
-//    
-//    override init() {
-//        super.init()
-//        let config = URLSessionConfiguration.background(withIdentifier: "com.yourapp.multitaskdownloader")
-//        session = URLSession(configuration: config, delegate: self, delegateQueue: nil)
-//    }
-//    
-//    public func downloadFile(from url: URL, progressHandler: @escaping (Double) -> Void, completionHandler: @escaping (URL?, Error?) -> Void) {
-//        let downloadTask = session.downloadTask(with: url)
-//        downloadTasks.append(downloadTask)
-//        progressHandlers[url] = progressHandler
-//        completionHandlers[url] = completionHandler
-//        downloadTask.resume()
-//    }
-//    
-//    public func cancelDownload(for url: URL) {
-//        if let task = downloadTasks.first(where: { $0.originalRequest?.url == url }) {
-//            task.cancel()
-//            downloadTasks.removeAll { $0.originalRequest?.url == url }
-//            progressHandlers.removeValue(forKey: url)
-//            completionHandlers.removeValue(forKey: url)
-//        }
-//    }
-//    
-//    public func urlSession(_ session: URLSession, downloadTask: URLSessionDownloadTask, didFinishDownloadingTo location: URL) {
-//        guard let originalURL = downloadTask.originalRequest?.url else { return }
-//        
-//        let fileManager = FileManager.default
-//        let documentsDirectory = fileManager.urls(for: .documentDirectory, in: .userDomainMask).first!
-//        let destinationURL = documentsDirectory.appendingPathComponent(originalURL.lastPathComponent)
-//        
-//        do {
-//            try fileManager.moveItem(at: location, to: destinationURL)
-//            completionHandlers[originalURL]?(destinationURL, nil)
-//        } catch {
-//            completionHandlers[originalURL]?(nil, error)
-//        }
-//        
-//        downloadTasks.removeAll { $0.originalRequest?.url == originalURL }
-//        progressHandlers.removeValue(forKey: originalURL)
-//        completionHandlers.removeValue(forKey: originalURL)
-//    }
-//    
-//    public func urlSession(_ session: URLSession, downloadTask: URLSessionDownloadTask, didWriteData bytesWritten: Int64, totalBytesWritten: Int64, totalBytesExpectedToWrite: Int64) {
-//        guard let originalURL = downloadTask.originalRequest?.url else { return }
-//        
-//        let progress = Double(totalBytesWritten) / Double(totalBytesExpectedToWrite)
-//        progressHandlers[originalURL]?(progress)
-//    }
-//    
-//    public func urlSession(_ session: URLSession, task: URLSessionTask, didCompleteWithError error: Error?) {
-//        guard let originalURL = task.originalRequest?.url else { return }
-//        
-//        if let error = error {
-//            completionHandlers[originalURL]?(nil, error)
-//        }
-//        
-//        downloadTasks.removeAll { $0.originalRequest?.url == originalURL }
-//        progressHandlers.removeValue(forKey: originalURL)
-//        completionHandlers.removeValue(forKey: originalURL)
-//    }
-//    
-//    deinit {
-//        session.invalidateAndCancel()
-//    }
-//}

+ 0 - 111
AIPlayRingtones/Classes/Tool/TSDownloadManager.swift

@@ -1,111 +0,0 @@
-//
-//  TSPublicContent.swift
-//  AIRingtone
-//
-//  Created by 100Years on 2025/3/20.
-//
-
-
-import AVFoundation
-import Alamofire
-
-class TSDownloadManager {
-    
-
-    static func downloadFile(
-        urlString: String,
-        fileEx:String? = nil,
-    missingEx:String? = nil,
-        progressHandler: ((Double) -> Void)? = nil,
-        completion: @escaping (URL?, Error?) -> Void
-    ) -> DownloadRequest? {
-        
-        if let fileName = TSBusinessFileManager.getLocalURL(urlString: urlString,fileEx:fileEx,missingEx:missingEx){
-            completion(fileName,nil)
-            return nil
-        }
-    
-        guard let cachesAllPath = TSBusinessFileManager.generateCachesURL(from: urlString, fileEx: fileEx, missingEx: missingEx,completion: { string, error in
-            completion(nil,error)
-        })else { return nil }
-        
-
-        return nil
-//        return TSNetworkShared.downloadFile(urlString: urlString,to: cachesAllPath, progressHandler:progressHandler,completion: completion)
-    }
-    
-//
-//    
-//    
-//    static func getDownLoadRing(ringModel:TSRingModel,complete:@escaping (URL?,Bool)->Void){
-//        let urlString = ringModel.audioUrl
-//        if let path = TSDownloadManager.getRingLocalURL(ringModel: ringModel) {
-//            complete(path,false)
-//        }else{
-//            _ = TSDownloadManager.downloadFile(urlString:urlString,missingEx: "mp3") { url, error in
-//                if let path = url {
-//                    complete(path,true)
-//                }else{
-//                    complete(nil,true)
-//                }
-//            }
-//        }
-//    }
-    
-//    static func getDownLoadVideo(urlString:String,complete:@escaping (URL?,Bool)->Void){
-//        if let path = TSDownloadManager.getRingLocalURL(urlString: urlString) {
-//            complete(path,false)
-//        }else{
-//            _ = TSDownloadManager.downloadFile(urlString:urlString,missingEx: "mp3") { url, error in
-//                if let path = url {
-//                    complete(path,true)
-//                }else{
-//                    complete(nil,true)
-//                }
-//            }
-//        }
-//    }
-
-}
-//
-//extension TSDownloadManager {
-//    
-//    
-//    //获取 TSRingModel 本地的缓存
-//    public static func getRingLocalURL(ringModel: TSRingModel)->URL?{
-//        if ringModel.documentPath.count == 0 {
-//            return nil
-//        }
-//        
-//        let documentPath = ringModel.documentPath.fillDocumentURL
-//        if TSFileManagerTool.fileExists(at: documentPath) {
-//            return documentPath
-//        }
-//        
-//        let urlString = ringModel.audioUrl
-//        guard let fileName = TSBusinessFileManager.getLocalURL(urlString: urlString,fileEx:nil,missingEx: "mp3") else{
-//            return nil
-//        }
-//        return fileName
-//    }
-//    
-//    //获取 urlstring 本地的缓存 url path
-//    public static func getRingLocalURL(urlString: String)->URL?{
-//        guard let fileName = TSBusinessFileManager.getLocalURL(urlString: urlString,fileEx:nil,missingEx: "mp3") else{
-//            return nil
-//        }
-//        return fileName
-//    }
-//
-//    //获取 urlstring 本地的缓存 url path
-//    public static func generateRingSaveLocalURL(name:String,timestamp:Bool = true,fileExtension:String = "mp3")->URL{
-//        var fileName = name
-//        if timestamp {
-//            fileName = fileName + String(Date.timestampInt)
-//        }
-//        
-//        fileName = fileName + "." + fileExtension
-//        return TSBusinessFileManager.saveRingPathURL.appendingPathComponent(fileName)
-//    }
-//    
-//}

+ 0 - 50
AIPlayRingtones/Classes/Tool/TSGCDTimer.swift

@@ -1,50 +0,0 @@
-//
-//  GCDTimer.swift
-//  AIRingtone
-//
-//  Created by 100Years on 2025/3/21.
-//
-
-import Foundation
-
-public class TSGCDTimer {
-    private var timer: DispatchSourceTimer?
-    private var isRunning: Bool = false
-
-    /// 启动定时器
-    /// - Parameters:
-    ///   - interval: 时间间隔(秒)
-    ///   - repeats: 是否重复
-    ///   - queue: 执行队列(默认主队列)
-    ///   - handler: 定时器触发时的回调
-    public func start(interval: TimeInterval, repeats: Bool = true, queue: DispatchQueue = .main, handler: @escaping () -> Void) {
-        // 如果定时器已经存在,先停止
-        stop()
-
-        // 创建定时器
-        timer = DispatchSource.makeTimerSource(queue: queue)
-        let deadline: DispatchTime = .now() + interval
-        let repeating: DispatchTimeInterval = repeats ? .seconds(Int(interval)) : .never
-
-        timer?.schedule(deadline: deadline, repeating: repeating)
-        timer?.setEventHandler(handler: handler)
-        timer?.resume()
-
-        isRunning = true
-    }
-
-    /// 停止定时器
-    public func stop() {
-        if isRunning {
-            timer?.cancel()
-            timer = nil
-            isRunning = false
-        }
-    }
-
-    /// 释放定时器
-    deinit {
-        stop()
-        dePrint("GCDTimer deinit")
-    }
-}

+ 0 - 190
AIPlayRingtones/Classes/Tool/TSImageCompress.swift

@@ -1,190 +0,0 @@
-//
-//  TSImageCompress.swift
-//  Pods
-//
-//  Created by 100Years on 2025/4/15.
-//
-
-import UIKit
-
-// MARK: - UIImage 扩展(Alpha 通道检测和缩放)
-public extension UIImage {
-    /// 检查图片是否有 Alpha 通道(透明度)
-    func hasAlphaChannel() -> Bool {
-        guard let cgImage = self.cgImage else { return false }
-        let alphaInfo = cgImage.alphaInfo
-        return alphaInfo == .first || alphaInfo == .last || alphaInfo == .premultipliedFirst || alphaInfo == .premultipliedLast
-    }
-    
-    /// 按比例缩放图片
-    func resized(withScaleFactor scaleFactor: CGFloat) -> UIImage {
-        let newSize = CGSize(width: size.width * scaleFactor, height: size.height * scaleFactor)
-        let renderer = UIGraphicsImageRenderer(size: newSize)
-        return renderer.image { _ in
-            self.draw(in: CGRect(origin: .zero, size: newSize))
-        }
-    }
-}
-
-public class TSImageCompress {
-
-    // MARK: - 核心压缩方法
-    public static func compressImageToTargetSize(
-        _ image: UIImage,
-        targetSizeKB: Int,
-        preserveTransparency: Bool
-    ) -> Data? {
-        let targetBytes = targetSizeKB * 1024
-        let hasAlpha = image.hasAlphaChannel()
-        let usePNG = preserveTransparency && hasAlpha
-
-        if usePNG {
-            let compressPNGImage = compressPNGImage(image, targetBytes: targetBytes)
-            if let compressedData = compressPNGImage {
-//                saveData(compressedData: compressedData)
-                print("PNG 压缩后大小: \(compressedData.count / 1024)KB")
-            }
-            return compressPNGImage
-        } else {
-            let compressJPEGImage = compressJPEGImage(image, targetBytes: targetBytes)
-            if let compressJPEGImage = compressJPEGImage {
-//                saveData(compressedData: compressJPEGImage)
-                print("JPEG 压缩后大小: \(compressJPEGImage.count / 1024)KB")
-            }
-            return compressJPEGImage
-        }
-    }
-
-    // MARK: - PNG 压缩逻辑(调整尺寸)
-    static private func compressPNGImage(_ image: UIImage, targetBytes: Int) -> Data? {
-        var currentImage = image
-        var currentData = currentImage.pngData()
-        var currentBytes = currentData?.count ?? 0
-        
-        // 如果已经满足目标大小,直接返回
-        guard currentBytes > targetBytes else { return currentData }
-        
-        var scaleFactor: CGFloat = 0.9
-        let minScaleFactor: CGFloat = 0.1
-        
-        while scaleFactor >= minScaleFactor {
-            let scaledImage = currentImage.resized(withScaleFactor: scaleFactor)
-            guard let newData = scaledImage.pngData() else { break }
-            let newBytes = newData.count
-            
-            if newBytes <= targetBytes {
-                return newData // 达到目标
-            }
-            
-            if newBytes >= currentBytes {
-                break // 无法继续优化
-            }
-            
-            currentImage = scaledImage
-            currentData = newData
-            currentBytes = newBytes
-            scaleFactor -= 0.1
-        }
-        
-        return currentBytes <= targetBytes ? currentData : nil
-    }
-
-    // MARK: - JPEG 压缩逻辑(先调质量,后调尺寸)
-    static private func compressJPEGImage(_ image: UIImage, targetBytes: Int) -> Data? {
-        var compressionQuality: CGFloat = 1.0
-        var currentImage = image
-        var currentData = currentImage.jpegData(compressionQuality: compressionQuality)
-        var currentBytes = currentData?.count ?? 0
-        
-        // 第一步:降低 JPEG 质量
-        while currentBytes > targetBytes && compressionQuality > 0.1 {
-            compressionQuality -= 0.1
-            currentData = currentImage.jpegData(compressionQuality: compressionQuality)
-            currentBytes = currentData?.count ?? 0
-        }
-        
-        guard currentBytes > targetBytes else { return currentData }
-        
-        // 第二步:缩小尺寸
-        var scaleFactor: CGFloat = 0.9
-        let minScaleFactor: CGFloat = 0.1
-        
-        while scaleFactor >= minScaleFactor {
-            let scaledImage = currentImage.resized(withScaleFactor: scaleFactor)
-            guard let newData = scaledImage.jpegData(compressionQuality: compressionQuality) else { break }
-            let newBytes = newData.count
-            
-            if newBytes <= targetBytes {
-                return newData // 达到目标
-            }
-            
-            if newBytes >= currentBytes {
-                break // 无法继续优化
-            }
-            
-            currentImage = scaledImage
-            currentData = newData
-            currentBytes = newBytes
-            scaleFactor -= 0.1
-        }
-        
-        return currentBytes <= targetBytes ? currentData : nil
-    }
-}
-
-
-extension TSImageCompress {
-    
-    static func saveData(compressedData:Data){
-        // 写入到沙盒的 "Images" 子目录
-          let fileName = "compressed_\(Date().timeIntervalSince1970).jpg"
-          if let fileURL = writeDataToSandbox(data: compressedData, fileName: fileName, subDirectory: "Images") {
-              print("文件已保存至: \(fileURL.path)")
-              
-              // 可选:读取文件验证
-              if let savedData = try? Data(contentsOf: fileURL) {
-                  print("读取文件大小: \(savedData.count / 1024)KB")
-              }
-          }
-    }
-    
-    static func getDocumentsDirectory() -> URL {
-        let paths = FileManager.default.urls(for: .documentDirectory, in: .userDomainMask)
-        return paths[0] // 返回第一个路径(通常唯一)
-    }
-    
-    static func writeDataToSandbox(data: Data, fileName: String, subDirectory: String? = nil) -> URL? {
-        let baseDirectory: URL
-        
-        // 1. 确定基础目录(默认 Documents)
-        baseDirectory = getDocumentsDirectory()
-        
-        // 2. 拼接子目录(如果存在)
-        var targetDirectory = baseDirectory
-        if let subDir = subDirectory {
-            targetDirectory = baseDirectory.appendingPathComponent(subDir)
-        }
-        
-        // 3. 创建子目录(如果不存在)
-        do {
-            try FileManager.default.createDirectory(at: targetDirectory, withIntermediateDirectories: true, attributes: nil)
-        } catch {
-            print("创建目录失败: \(error.localizedDescription)")
-            return nil
-        }
-        
-        // 4. 拼接最终文件路径
-        let fileURL = targetDirectory.appendingPathComponent(fileName)
-        
-        // 5. 写入数据
-        do {
-            try data.write(to: fileURL)
-//            print("文件写入成功: \(fileURL.path)")
-            return fileURL
-        } catch {
-            print("写入文件失败: \(error.localizedDescription)")
-            return nil
-        }
-    }
-
-}

+ 0 - 40
AIPlayRingtones/Classes/Tool/TSNetworkTool.swift

@@ -1,40 +0,0 @@
-//
-//  TSNetworkTool.swift
-//  TSLiveWallpaper
-//
-//  Created by 100Years on 2025/1/2.
-//
-
-import Alamofire
-import Network
-
-class TSNetworkTool {
-    static let shared = TSNetworkTool()
-    
-    func monitorNetworkPermission(escapable result: @escaping (Bool) -> Void) {
-        let monitor = NWPathMonitor()
-        let queue = DispatchQueue.global(qos: .background)
-        monitor.start(queue: queue)
-        monitor.pathUpdateHandler = { path in
-            DispatchQueue.main.async {
-                if path.status == .satisfied {
-                    debugPrint("网络可用,用户同意了权限")
-                    result(true)
-                } else {
-                    debugPrint("网络不可用,可能用户拒绝了权限")
-                    result(false)
-                }
-            }
-        }
-    }
-
-    func startListenNetStatus(handler: @escaping (NetworkReachabilityManager.NetworkReachabilityStatus, NetworkReachabilityManager?) -> Void) {
-        // 创建 NetworkReachabilityManager 实例
-        let networkManager = NetworkReachabilityManager.default
-
-        // 开始监听网络状态
-        networkManager?.startListening { status in
-            handler(status, networkManager)
-        }
-    }
-}

+ 0 - 0
AIPlayRingtones/Classes/Tool/TSCommonTool/TSRandomTextTool.swift → AIPlayRingtones/Classes/Tool/TSRandomTextTool.swift


+ 0 - 107
AIPlayRingtones/Classes/Tool/TSToastTool.swift

@@ -1,107 +0,0 @@
-//
-//  TSToastTool.swift
-//  TSLiveWallpaper
-//
-//  Created by 100Years on 2024/12/20.
-//
-
-import SVProgressHUD
-
-public let TSToastShared = TSToastTool.shared
-public let TSToastWindow = TSToastTool.getCurrentWindow()
-
-open class TSToastTool {
-    public static let shared = TSToastTool()
-    
-    private init() {
-        SVProgressHUD.swizzleMethods()
-//        如果您想要堆叠 HUD,您可以使用以下方法平衡每个节目通话:
-//        [SVProgressHUD popActivity];
-        SVProgressHUD.setDefaultStyle(.dark)
-        SVProgressHUD.setDefaultAnimationType(.native)
-        SVProgressHUD.setDefaultMaskType(.clear)
-        SVProgressHUD.setMinimumSize(CGSize(width: 100, height: 100))
-        SVProgressHUD.setCornerRadius(16.0)
-        SVProgressHUD.setBackgroundColor("#000000".uiColor.withAlphaComponent(0.8))
-        SVProgressHUD.setForegroundColor(.white)
-        SVProgressHUD.setMinimumDismissTimeInterval(3.0)
-//        SVProgressHUD.setInfoImage(UIImage())
-//        SVProgressHUD.setImageViewSize(CGSize.zero)
-
-    }
-    
-    
-    public func setUIContent(font:UIFont? = nil,infoImage:UIImage? = nil) {
-        if let font = font {
-            SVProgressHUD.setFont(font)
-        }
-        
-        if let infoImage = infoImage {
-            SVProgressHUD.setInfoImage(infoImage)
-        }
-        
-    }
-
-    /// 显示文字提示
-    public func showToast(text: String?, duration: TimeInterval = 3.0,containerView:UIView? = nil) {
-        if let text = text {
-            if text.count == 0 {
-                return
-            }
-            kExecuteOnMainThread {
-                if let containerView = containerView {
-                    SVProgressHUD.setContainerView(containerView)
-                }else if let window = Self.getCurrentWindow() {
-                    SVProgressHUD.setContainerView(window)
-                }
-                SVProgressHUD.setDefaultMaskType(.none)
-                SVProgressHUD.showInfo(withStatus: text)
-            }
-        }
-    }
-    
-
-    /// 显示加载动画
-    public func showLoading(text:String? = nil,containerView:UIView?) {
-        kExecuteOnMainThread {
-            SVProgressHUD.setDefaultMaskType(.clear)
-            SVProgressHUD.setContainerView(containerView)
-            SVProgressHUD.show(withStatus: text)
-        }
-    }
-
-    /// 隐藏加载动画
-    public func hideLoading() {
-        kExecuteOnMainThread {
-            SVProgressHUD.dismiss()
-        }
-    }
-    
-    /// 显示进度提示
-    public func showProgress(progress:Float, status: String?,containerView:UIView?) {
-        kExecuteOnMainThread {
-            SVProgressHUD.setDefaultMaskType(.clear)
-            SVProgressHUD.setContainerView(containerView)
-            SVProgressHUD.showProgress(progress, status: status)
-        }
-    }
-    
-    /// 获取当前窗口,兼容 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 UIApplication.shared.keyWindow
-            }
-            return scene.windows.first { $0.isKeyWindow }
-        } else {
-            // iOS 12 及以下直接从 keyWindow 获取
-            return UIApplication.shared.keyWindow
-        }
-    }
-}
-
-
-public func kShowToastDataMissing(){
-    TSToastShared.showToast(text: "Data missing")
-}

+ 0 - 7
AIPlayRingtones/Classes/Tool/WindowHelper.swift

@@ -69,10 +69,3 @@ open class WindowHelper {
         return base
     }
 }
-
-
-public func kGetScaleHeight(originalSize:CGSize,width:CGFloat) -> CGFloat {
-    let originalScale = originalSize.width/originalSize.height
-    let height = width/originalScale
-    return height
-}

+ 0 - 120
AIPlayRingtones/Classes/View/TSCircularProgressView.swift

@@ -1,120 +0,0 @@
-//
-//  TSCircularProgressView.swift
-//  Pods
-//
-//  Created by 100Years on 2025/3/21.
-//
-
-import UIKit
-
-open class TSCircularProgressView: UIView {
-    // MARK: - Properties
-    public var trackLayer: CAShapeLayer!
-    public var progressLayer: CAShapeLayer!
-    
-    /// 进度条颜色
-    public var progressColor: UIColor = .blue {
-        didSet {
-            progressLayer.strokeColor = progressColor.cgColor
-            //print("Progress Color Updated: \(progressColor)")
-        }
-    }
-    
-    /// 背景轨道颜色
-    public var trackColor: UIColor = .lightGray {
-        didSet {
-            trackLayer.strokeColor = trackColor.cgColor
-        }
-    }
-    
-    /// 线条粗细
-    public var lineWidth: CGFloat = 10.0 {
-        didSet {
-            trackLayer.lineWidth = lineWidth
-            progressLayer.lineWidth = lineWidth
-            setNeedsLayout()
-        }
-    }
-    
-    /// 进度(0.0 到 1.0)
-    public var progress: CGFloat = 0.0 {
-        didSet {
-            progress = min(max(progress, 0.0), 1.0) // 限制范围
-//            print("Progress Updated: \(progress)")
-            progressLayer.strokeEnd = progress
-        }
-    }
-    
-    /// 绘制方向(默认顺时针)
-    public var isClockwise: Bool = true {
-        didSet {
-            setNeedsLayout()
-        }
-    }
-    
-    // MARK: - Initialization
-    override public init(frame: CGRect) {
-        super.init(frame: frame)
-        setupLayers()
-    }
-    
-    required public init?(coder: NSCoder) {
-        super.init(coder: coder)
-        setupLayers()
-    }
-    
-    // MARK: - Setup Layers
-    public func setupLayers() {
-        // 背景轨道
-        trackLayer = CAShapeLayer()
-        trackLayer.fillColor = UIColor.clear.cgColor
-        trackLayer.strokeColor = trackColor.cgColor
-        trackLayer.lineWidth = lineWidth
-        trackLayer.lineCap = .round
-        layer.addSublayer(trackLayer)
-        
-        // 进度条
-        progressLayer = CAShapeLayer()
-        progressLayer.fillColor = UIColor.clear.cgColor
-        progressLayer.strokeColor = progressColor.cgColor
-        progressLayer.lineWidth = lineWidth
-        progressLayer.lineCap = .round
-        progressLayer.strokeEnd = progress
-        layer.addSublayer(progressLayer)
-        
-        //print("Progress Layer Added: \(progressLayer)")
-    }
-    
-    // MARK: - Layout
-    override public func layoutSubviews() {
-        super.layoutSubviews()
-        //print("layoutSubviews Called")
-        updatePaths()
-    }
-    
-    public func updatePaths() {
-        let center = CGPoint(x: bounds.midX, y: bounds.midY)
-        let radius = min(bounds.width, bounds.height) / 2 - lineWidth / 2
-        
-        // 背景轨道路径
-        let trackPath = UIBezierPath(
-            arcCenter: center,
-            radius: radius,
-            startAngle: -.pi / 2, // 从顶部开始
-            endAngle: .pi * 1.5,   // 到顶部结束
-            clockwise: true // 背景轨道始终为顺时针
-        )
-        trackLayer.path = trackPath.cgPath
-        
-        // 进度条路径
-        let progressPath = UIBezierPath(
-            arcCenter: center,
-            radius: radius,
-            startAngle: -.pi / 2, // 从顶部开始
-            endAngle: -.pi / 2 + .pi * 2 * (isClockwise ? 1 : -1), // 根据 isClockwise 控制方向
-            clockwise: isClockwise
-        )
-        progressLayer.path = progressPath.cgPath
-        //print("Progress Layer Path: \(progressLayer.path)")
-    }
-}

+ 0 - 68
AIPlayRingtones/Classes/View/TSProgressSlider/TSProgressSlider.swift

@@ -1,68 +0,0 @@
-//
-//  TSProgressSlider.swift
-//  Pods
-//
-//  Created by 100Years on 2025/4/22.
-//
-
-import UIKit
-
-open class TSProgressSlider: UISlider {
-    // 透明覆盖视图
-    private let overlayView = UIView()
-    
-    override init(frame: CGRect) {
-        super.init(frame: frame)
-        setupOverlay()
-    }
-    
-    required public init?(coder: NSCoder) {
-        super.init(coder: coder)
-        setupOverlay()
-    }
-    
-    private func setupOverlay() {
-        // 配置透明覆盖视图
-        overlayView.backgroundColor = .clear
-        overlayView.isUserInteractionEnabled = true
-        addSubview(overlayView)
-        
-        // 添加拖动手势
-        let panGesture = UIPanGestureRecognizer(target: self, action: #selector(handlePan(_:)))
-        overlayView.addGestureRecognizer(panGesture)
-        
-        // 添加点击手势
-        let tapGesture = UITapGestureRecognizer(target: self, action: #selector(handleTap(_:)))
-        overlayView.addGestureRecognizer(tapGesture)
-    }
-    
-    open override func layoutSubviews() {
-        super.layoutSubviews()
-        // 确保覆盖视图与slider同大小
-        overlayView.frame = bounds
-    }
-    
-    // 处理拖动手势
-    @objc private func handlePan(_ gesture: UIPanGestureRecognizer) {
-        let location = gesture.location(in: overlayView)
-        updateSliderValue(with: location)
-        
-        if gesture.state == .ended {
-            sendActions(for: .touchUpInside)
-        }
-    }
-    
-    // 处理点击手势
-    @objc private func handleTap(_ gesture: UITapGestureRecognizer) {
-        let location = gesture.location(in: overlayView)
-        updateSliderValue(with: location)
-        sendActions(for: .touchUpInside)
-    }
-    
-    // 更新滑块值
-    private func updateSliderValue(with location: CGPoint) {
-        let percentage = max(0, min(1, location.x / bounds.width))
-        setValue(Float(percentage), animated: false)
-        sendActions(for: .valueChanged)
-    }
-}

+ 3 - 5
AIPlayRingtones/Classes/View/UILabel/PaddedLabel.swift → AIPlayRingtones/Classes/View/TopLeftLabel.swift

@@ -1,8 +1,8 @@
 //
-//  Untitled.swift
-//  AIEmoji
+//  TopLeftLabel.swift
+//  AIPlayRingtones
 //
-//  Created by 100Years on 2025/1/17.
+//  Created by mini on 2025/5/27.
 //
 
 import UIKit
@@ -18,8 +18,6 @@ open class TopLeftLabel: UILabel {
     open override func drawText(in rect: CGRect) {
         // 根据内间距调整绘制区域
         let insetRect = rect.inset(by: textInsets)
-        
-        // 获取文本实际大小
         guard let text = text else { return }
         let textSize = (text as NSString).boundingRect(
             with: CGSize(width: insetRect.width, height: .greatestFiniteMagnitude),

+ 0 - 310
AIPlayRingtones/Classes/View/UICollectionView+Component/CollectionViewComponent.swift

@@ -1,310 +0,0 @@
-//
-//  TSCollectionViewComponent.swift
-//  ClockWidget
-//
-//  Created by TSYH on 2023/7/18.
-//
-
-import UIKit
-
-
-
-public let kIndexPath = "kIndexPath"
-
-open class TSCollectionView: 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 var isCanGestureRecognizer:Bool = true
-    open override func gestureRecognizerShouldBegin(_ gestureRecognizer: UIGestureRecognizer) -> Bool {
-        return isCanGestureRecognizer
-    }
-}
-
-open class TSCollectionViewComponent: NSObject {
-    
-    open var sectionActionHandler: ((Any?, IndexPath) -> Void)?
-
-    open var itemDidSelectedHandler: ((Any?, IndexPath) -> Void)?
-    open var itemActionHandler: ((Any?, IndexPath) -> Void)?
-    
-    open var itemWillDisplayHandler: ((UICollectionViewCell, Any?, IndexPath) -> Void)?
-    open var itemDidEndDisplayingHandler: ((UICollectionViewCell, Any?, IndexPath) -> Void)?
-    
-    open var didScrollHandler: ((UIScrollView) -> Void)?
-    open var willBeginDraggingHandler: ((UIScrollView) -> Void)?
-    open var didEndDraggingHandler: ((UIScrollView, Bool) -> Void)?
-    open var didScrollToTopHandler: ((UIScrollView) -> Void)?
-    open var willEndDraggingWithVelocityHandler: ((UIScrollView, CGPoint) -> Void)?
-    open var didEndDeceleratingHandler: ((UIScrollView) -> Void)?
-    
-    open var collectionView: TSCollectionView!
-    open var attributes: [String: Any]?
-    
-    
-    
-    
-    
-    public static let defaultCellID: String = "Component_Default_Cell_ID"
-    public 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 = TSCollectionView(frame: frame, collectionViewLayout: clLayout)
-        collectionView.delegate = self
-        collectionView.dataSource = self
-        collectionView.contentInsetAdjustmentBehavior = .never
-        collectionView.showsVerticalScrollIndicator = false
-        collectionView.showsHorizontalScrollIndicator = false
-        collectionView.backgroundColor = .clear
-        
-        if #available(iOS 11.0, *) {
-            collectionView.contentInsetAdjustmentBehavior = .never// 关闭自动调整
-        }
-        
-        self.attributes = attributes
-        if let showScrollIndicator = attributes?["showScrollIndicator"] as? Bool {
-            collectionView.showsHorizontalScrollIndicator = showScrollIndicator
-        }
-        
-        collectionView.register(UICollectionViewCell.self, forCellWithReuseIdentifier: Self.defaultCellID)
-    }
-    
-    open lazy var dataSource = [TSComponent]()
-    public func clear() {
-        dataSource = []
-    }
-    
-    public func reloadView(with components: [TSComponent]) {
-        registerClass(components: components)
-        dataSource.append(contentsOf: components)
-        collectionView.clearReuseSubviews()
-        collectionView.reloadData()
-    }
-    
-    public func reloadData() {
-        collectionView.clearReuseSubviews()
-        collectionView.reloadData()
-    }
-    
-    // 注册cell
-    private func registerClass(components: [TSComponent]) {
-        for cp in components {
-            if let sectionCp = cp as? TSCollectionViewSectionComponent {
-                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? TSCollectionViewCellComponent {
-                collectionView.register(cellCp.cellClass, forCellWithReuseIdentifier: cellCp.cellClass.description())
-            }
-        }
-    }
-}
-
-extension TSCollectionViewComponent {
-    private var isSectionFramework: Bool {
-        if dataSource.first is TSCollectionViewSectionComponent {
-            return true
-        }
-        return false
-    }
-    
-    public func cellComponent(at indexPath: IndexPath) -> TSCollectionViewCellComponent? {
-        var cellCp: TSComponent?
-        if isSectionFramework {
-            if indexPath.section < dataSource.count,
-                let sectionCp = dataSource[indexPath.section] as? TSCollectionViewSectionComponent,
-                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? TSCollectionViewCellComponent {
-            return cellCp
-        }
-        return nil
-    }
-}
-
-extension TSCollectionViewComponent: 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? TSCollectionViewSectionComponent)?.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? TSComponentView {
-            var atts = attributes ?? [:]
-            atts[kIndexPath] = 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? TSCollectionViewSectionComponent 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? TSComponentView {
-                    var atts = attributes ?? [:]
-                    atts[kIndexPath] = indexPath
-                    headerView.renderView(with: headerCp, component: self, attributes: atts)
-                }
-                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? TSComponentView {
-                    var atts = attributes ?? [:]
-                    atts[kIndexPath] = indexPath
-                    footerView.renderView(with: footerCp, component: self, attributes: atts)
-                }
-                return footer
-            }
-        }
-        return UICollectionReusableView()
-    }
-}
-
-extension TSCollectionViewComponent: 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? TSCollectionViewSectionComponent)?.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? TSCollectionViewSectionComponent)?.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? TSCollectionViewSectionComponent)?.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? TSCollectionViewSectionComponent {
-                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? TSCollectionViewSectionComponent {
-                return sectionCp.headerComponent?.viewSize ?? .zero
-            }
-        }
-        return .zero
-    }
-}
-
-extension TSCollectionViewComponent: 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
AIPlayRingtones/Classes/View/UICollectionView+Component/CommonSectionComponent.swift

@@ -1,63 +0,0 @@
-//
-//  CommonSectionComponent.swift
-//  ClockWidget
-//
-//  Created by TSYH on 2023/10/17.
-//
-
-import UIKit
-
-open class CommonSectionComponent: TSCollectionViewSectionComponent {
-    open var cellComponents: [TSCollectionViewCellComponent]
-    open var header: TSCollectionViewReuseViewComponent?
-    open var footer: TSCollectionViewReuseViewComponent?
-    open var inset: UIEdgeInsets
-    open var rowSpacing: CGFloat
-    open var columnSpacing: CGFloat
-    
-    public init(cellComponents: [TSCollectionViewCellComponent],
-         header: TSCollectionViewReuseViewComponent? = nil,
-         footer: TSCollectionViewReuseViewComponent? = 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
-    }
-    
-    open var cells: [TSCollectionViewCellComponent] {
-        return cellComponents
-    }
-    
-    open var headerComponent: TSCollectionViewReuseViewComponent? {
-        return header
-    }
-    
-    open var footerComponent: TSCollectionViewReuseViewComponent? {
-        return footer
-    }
-    
-    open func clear() {
-        cellComponents.removeAll()
-    }
-    
-    open func append(_ cellComponents: [TSCollectionViewCellComponent]) {
-        self.cellComponents.append(contentsOf: cellComponents)
-    }
-   
-    open var sectionInset: UIEdgeInsets {
-        return inset
-    }
-    
-    open var lineSpacing: CGFloat {
-        return rowSpacing
-    }
-    
-    open var itemSpacing: CGFloat {
-        return columnSpacing
-    }
-}

+ 0 - 64
AIPlayRingtones/Classes/View/UICollectionView+Component/Component.swift

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

+ 0 - 148
AIPlayRingtones/Classes/View/UIStackView/KLMultiScrollContainer.swift

@@ -1,148 +0,0 @@
-//
-//  ScrollContainer.swift
-//  TmpProject
-//
-//  Created by nkl on 2025/4/27.
-//
-
-import Foundation
-import UIKit
-
-open class KLMultiScrollContainer: UIScrollView {
-    
-    public override init(frame: CGRect) {
-        super.init(frame: frame)
-        
-        // 在某些情况下,contentView中的点击事件会被panGestureRecognizer拦截,导致不能响应,
-        // 这里设置cancelsTouchesInView表示不拦截
-        // panGestureRecognizer.cancelsTouchesInView = false
-        
-        if #available(iOS 13.0, *) {
-            automaticallyAdjustsScrollIndicatorInsets = false
-        }
-        if #available(iOS 11.0, *) {
-            contentInsetAdjustmentBehavior = .never
-        } else {
-        
-        }
-        delegate = self
-        showsVerticalScrollIndicator = false
-    }
-    
-    required public init?(coder: NSCoder) {
-        fatalError("init(coder:) has not been implemented")
-    }
-    
-    // scroller最大偏移量(最多只能滑动多少)
-    @objc public var maxContentOffset: CGFloat = 0.0
-    
-    // 是否能滑动/或者正在滑动 超过了 maxContentOffset 就不能滑动
-    @objc public private(set) var isScrolling: Bool = true {
-        didSet {
-            if isScrolling == oldValue {
-                return
-            }
-            updateSubScollViewsState()
-        }
-    }
-    
-    @objc public var subScrollViews: [UIScrollView] = [UIScrollView]() {
-        willSet{
-            subScrollViews.forEach {
-                $0.removeObserver(self, forKeyPath: kObserveKeyPath)
-            }
-        }
-        didSet {
-            subScrollViews.forEach {
-                $0.addObserver(self, forKeyPath: kObserveKeyPath, options: .new, context: nil)
-                $0.scrollsToTop = false
-                if #available(iOS 11.0, *) {
-                    $0.contentInsetAdjustmentBehavior = .never
-                } else {
-                
-                }
-            }
-        }
-    }
-    
-    public func addScrollView(_ scrollView : UIScrollView){
-        if subScrollViews.contains(scrollView) {return}
-        subScrollViews.append(scrollView)
-    }
-        
-    deinit {
-        subScrollViews.forEach { $0.removeObserver(self, forKeyPath: kObserveKeyPath) }
-    }
-}
-
-//MARK: - UIGestureRecognizerDelegate
-
-extension KLMultiScrollContainer : UIGestureRecognizerDelegate {
-    
-    /// 返回true表示可以继续传递触摸事件,这样两个嵌套的scrollView才能同时滚动
-    open func gestureRecognizer(_ gestureRecognizer: UIGestureRecognizer, shouldRecognizeSimultaneouslyWith otherGestureRecognizer: UIGestureRecognizer) -> Bool {
-        if let view = otherGestureRecognizer.view as? UIScrollView {
-            return subScrollViews.contains(view)
-        }
-        return false
-    }
-}
-
-//MARK: - Observer
-
-extension KLMultiScrollContainer {
-    
-    open override func observeValue(forKeyPath keyPath: String?, of object: Any?, change: [NSKeyValueChangeKey : Any]?, context: UnsafeMutableRawPointer?) {
-        guard let newValue = change?[.newKey] as? CGPoint else {
-            return
-        }
-        
-        guard let scrollView = object as? UIScrollView else {
-            return
-        }
-        
-        // 只有在拖动的时候才考虑设置
-        // 当点击某个单元格,push到另一个页面时,也会触发该监听,
-        // 同时offset被置为0了,导致自动滚到顶部,因此要添加该判断
-        if !scrollView.isDragging {
-            return
-        }
-        
-        if isScrolling && maxContentOffset > contentOffset.y {
-            // 先移除一下监听,contentOffset被设置时也会调用监听,导致重复调用
-            // 虽然可以使用 ‘scrollView.setContentOffset(.zero, animated: false)’ 保证不被重复监听,但是滑动效果不顺畅
-            scrollView.removeObserver(self, forKeyPath: kObserveKeyPath)
-            scrollView.contentOffset = .zero
-            scrollView.addObserver(self, forKeyPath: kObserveKeyPath, options: .new, context: nil)
-            return
-        }
-        if  newValue.y <= 0 {
-            isScrolling = true
-        } else {
-            isScrolling = false
-        }
-        
-    }
-    
-    fileprivate func updateSubScollViewsState() -> Void {
-        subScrollViews.forEach { scrollView in
-            if isScrolling {
-                scrollView.setContentOffset(.zero, animated: false)
-            }
-            scrollView.showsVerticalScrollIndicator = !isScrolling
-        }
-    }
-}
-
-extension KLMultiScrollContainer : UIScrollViewDelegate {
-    
-    open func scrollViewDidScroll(_ scrollView: UIScrollView) {
-        if  (scrollView.contentOffset.y > maxContentOffset) ||
-            (scrollView.contentOffset.y < maxContentOffset && !isScrolling) {
-            scrollView.contentOffset = CGPoint(x: 0, y: maxContentOffset)
-        }
-    }
-}
-
-fileprivate var kObserveKeyPath = "contentOffset"
-fileprivate var kOffsetContext = "content_offset_context"

+ 0 - 1
AIPlayRingtones/Classes/View/UIStackView/TSCustomStackView.swift

@@ -47,7 +47,6 @@ open class TSCustomStackView: UIView {
     // 初始化方法
     public init(axis: NSLayoutConstraint.Axis = .vertical,alignment:UIStackView.Alignment = .leading, spacing: CGFloat = 0) {
         self.scrollView = UIScrollView()
-//        self.scrollView = KLMultiScrollContainer()
         self.scrollView.showsVerticalScrollIndicator = false
         self.scrollView.showsHorizontalScrollIndicator = false
         self.stackView = UIStackView()

+ 0 - 83
AIPlayRingtones/Classes/View/UITableView+TSItemModel/TSSimpleTableView.swift

@@ -1,83 +0,0 @@
-//
-//  TSTableView.swift
-//  TSLiveWallpaper
-//
-//  Created by 100Years on 2025/1/4.
-//
-
-
-
-open class TSSimpleTableView : NSObject{
-    open var cellID:String = "TSSimpleTableViewCell"
-    open lazy var tableView:UITableView = {
-        let tableView = UITableView()
-        tableView.initBaseTableView(reuseClass: reuseClass, isUseMJRefresh: false, delegate: self)
-        return tableView
-    }()
-    
-    open var reuseClass:[String] = [] {
-        didSet{
-            if let string = reuseClass.first {
-                cellID = string
-            }
-            tableView.registerCellClass(cellIds: reuseClass)
-        }
-    }
-    
-    open var dataArray:[TSBasicSectionModel] = [TSBasicSectionModel](){
-        didSet{
-            tableView.reloadData()
-        }
-    }
-
-}
-
-
-extension TSSimpleTableView : UITableViewDataSource, UITableViewDelegate {
-    
-    public func numberOfSections(in tableView: UITableView) -> Int {
-        return dataArray.count
-    }
-    
-    public func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
-        if let sectionModel = dataArray.safeObj(At: section){
-            return sectionModel.itemsArray.count
-        }
-        return 0
-    }
-    
-    public 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
-    }
-    
-    public func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
-        let cell = tableView.dequeueReusableCell(withIdentifier: cellID)
-        
-        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
-        }
-        
-        return UITableViewCell()
-    }
-    
-    public 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)
-        }
-    }
-}
-
-
-open class TSSimpleTableViewCell: TSBaseTabViewCell {
-    open var itemModel:TSBasicItemModel = TSBasicItemModel()
-    
-    open func didEndDisplaying(indexPath: IndexPath){
-        
-    }
-}

+ 0 - 7
AIPlayRingtones/Common/AIEnums.swift

@@ -1,7 +0,0 @@
-//
-//  AIEnums.swift
-//  AIPlayRingtones
-//
-//  Created by 100Years on 2025/5/15.
-//
-

+ 0 - 50
AIPlayRingtones/Common/ASBusinessFileManager.swift

@@ -124,53 +124,3 @@ extension ASBusinessFileManager {
     }
     
 }
-//
-////缓存路径
-//extension ASBusinessFileManager {
-//    
-//    //检查 url 对不对
-//    public static func generateCachesURL(
-//        from urlString: String,
-//        fileEx:String? = nil,
-//    missingEx:String? = nil,
-//        cacheDirectory:String = "cacheAll",
-//        completion:((String?, Error?) -> Void)? = nil
-//    )->URL?
-//    {
-//        guard let url = URL(string: urlString) else{
-//            completion?(nil, NSError(domain: "url null", code: 0))
-//            return nil
-//        }
-//        
-//        if !urlString.contains("http") && urlString.contains("/"){
-//            completion?(urlString.fillCachePath, nil)
-//            return nil
-//        }
-//        
-//        let fileManager = FileManager.default
-//        
-//        // 获取缓存目录下的 `cacheAll` 文件夹路径
-//        let cachesDirectory = fileManager.urls(for: .cachesDirectory, in: .userDomainMask).first!
-//        let cacheAllDirectory = cachesDirectory.appendingPathComponent(cacheDirectory)
-//        
-//        // 创建 `cacheAll` 文件夹(如果不存在)
-//        if !fileManager.fileExists(atPath: cacheAllDirectory.path) {
-//            do {
-//                try fileManager.createDirectory(at: cacheAllDirectory, withIntermediateDirectories: true, attributes: nil)
-//            } catch {
-//                completion?(nil, error)
-//                return nil
-//            }
-//        }
-//        
-//        
-//        guard let fileName = generateFileName(urlString: urlString,fileEx:fileEx,missingEx: missingEx) else{
-//            completion?(nil, NSError(domain: "url error", code: 0))
-//            return nil
-//        }
-//
-//        let cachedFileURL = cacheAllDirectory.appendingPathComponent(fileName)
-//        return cachedFileURL
-//    }
-//    
-//}

+ 82 - 0
AIPlayRingtones/Common/Common.swift

@@ -132,3 +132,85 @@ var deviceName: String = {
     }
 }()
 
+
+
+
+
+public let kMainQueue = DispatchQueue.main
+/// 主线程延迟执行回调
+/// - Parameters:
+///   - delay: 延迟时间(秒)
+///   - completion: 延迟后的回调
+public func kDelayOnMainThread(_ delay: TimeInterval, completion: @escaping () -> Void) {
+    DispatchQueue.main.asyncAfter(deadline: .now() + delay) {
+        completion()
+    }
+}
+
+public func kDelayMainShort(completion: @escaping () -> Void) {
+    DispatchQueue.main.asyncAfter(deadline: .now() + 0.1) {
+        completion()
+    }
+}
+
+/// 在主线程上执行代码
+/// - Parameter block: 要执行的代码块
+public func kExecuteOnMainThread(_ block: @escaping () -> Void) {
+    if Thread.isMainThread {
+        block()
+    } else {
+        DispatchQueue.main.async {
+            block()
+        }
+    }
+}
+
+
+/// 子 size 根据容器 size,返回自己的最大 size
+/// - Parameters:
+///   - containerSize: 容器 Size
+///   - subviewSize: 子 Size
+///   - contentInset: contentInset
+///   - contentMode: contentMode
+/// - Returns: 最大 size
+public func kCalculateScaledSize(containerSize: CGSize, subviewSize: CGSize, contentInset: UIEdgeInsets = .zero ,contentMode:UIView.ContentMode) -> CGSize {
+    // 计算去除边距后的容器可用大小
+    let availableWidth = containerSize.width - contentInset.left - contentInset.right
+    let availableHeight = containerSize.height - contentInset.top - contentInset.bottom
+    
+    switch contentMode {
+    case .scaleToFill:
+        // 直接填充容器,忽略子视图比例
+        return CGSize(width: availableWidth, height: availableHeight)
+    case .scaleAspectFit:
+        // 按比例适配容器,确保子视图完全显示在容器内
+        let widthRatio = availableWidth / subviewSize.width
+        let heightRatio = availableHeight / subviewSize.height
+        let scale = min(widthRatio, heightRatio)
+        return CGSize(width: subviewSize.width * scale, height: subviewSize.height * scale)
+    case .scaleAspectFill:
+        // 按比例填充容器,可能会裁剪子视图
+        let widthRatio = availableWidth / subviewSize.width
+        let heightRatio = availableHeight / subviewSize.height
+        let scale = max(widthRatio, heightRatio)
+        return CGSize(width: subviewSize.width * scale, height: subviewSize.height * scale)
+    default:
+        // 默认返回子视图原始大小
+        return subviewSize
+    }
+}
+
+
+public func kGetCollectionViewCellSize(sectionInset:UIEdgeInsets,
+               itemSpacing:CGFloat,
+               originalSize:CGSize,
+               cellRowNum:Int)->CGSize{
+    let widthReduction:CGFloat = 1.0
+    let originalScale = originalSize.width/originalSize.height
+    var w = k_ScreenWidth-sectionInset.left-sectionInset.right-widthReduction
+    w = w - itemSpacing * CGFloat((cellRowNum-1))
+    w = w/CGFloat(cellRowNum)
+    let h = w/originalScale
+    let cellSize = CGSizeMake(w, h)
+    return cellSize
+}

+ 0 - 10
AIPlayRingtones/Common/Ex/UIFont+TSEx.swift

@@ -1,10 +0,0 @@
-//
-//  Untitled.swift
-//  AIEmoji
-//
-//  Created by 100Years on 2025/4/1.
-//
-
-public extension FontName {
-    static let PoppinsBoldItalic   = "Poppins-BoldItalic"
-}

+ 2 - 3
AIPlayRingtones/Common/TSNetWork/TSNetworkManager.swift

@@ -376,9 +376,8 @@ extension TSNetworkManager {
 
 func kNetWorkCodeSuccess(data:Any?) -> [String:Any]? {
     guard let data = data else { return nil }
-    if let dataDict = data as? [String:Any]{
-        let code = dataDict.safeInt(forKey: "code")
-        
+    if let dataDict = data as? [String:Any],
+        let code = dataDict["code"] as? Int{
         switch code {
         case 200://成功
             return dataDict

+ 6 - 6
AIPlayRingtones/CommonView/ASRingToneCellView.swift

@@ -43,8 +43,8 @@ class ASRingToneCellView: TSBaseView {
     
  
     var clickSetUpHandel:(()->Void)?
-    lazy var setRingBtn: TSUIExpandedTouchButton = {
-        let setRingBtn = TSUIExpandedTouchButton()
+    lazy var setRingBtn: ASUIExpandedTouchButton = {
+        let setRingBtn = ASUIExpandedTouchButton()
         setRingBtn.setUpButton(image: UIImage(named: "cell_setRing_icon")){ [weak self]  in
             guard let self = self else { return }
             clickSetUpHandel?()
@@ -54,8 +54,8 @@ class ASRingToneCellView: TSBaseView {
     }()
     
     var clickEditHandel:(()->Void)?
-    lazy var editBtn: TSUIExpandedTouchButton = {
-        let editBtn = TSUIExpandedTouchButton()
+    lazy var editBtn: ASUIExpandedTouchButton = {
+        let editBtn = ASUIExpandedTouchButton()
         editBtn.setUpButton(image: UIImage(named: "edit_ring_icon")){ [weak self]  in
             guard let self = self else { return }
             clickEditHandel?()
@@ -258,8 +258,8 @@ class TSRingToneGenerateView:TSBaseView {
         return infoLabel
     }()
     
-    lazy var refreshBtn: TSUIExpandedTouchButton = {
-        let refreshBtn = TSUIExpandedTouchButton()
+    lazy var refreshBtn: ASUIExpandedTouchButton = {
+        let refreshBtn = ASUIExpandedTouchButton()
         refreshBtn.setUpButton(image: .refreshPurple){[weak self]  in
             guard let self = self else { return }
             refreshHandel?()

+ 2 - 2
AIPlayRingtones/CommonView/ASViewTool.swift

@@ -18,13 +18,13 @@ func createBlurEffectView(style:UIBlurEffect.Style,backgroundColor:UIColor? = ni
 }
 
 func kAddNormalSubmitGradientBg(view:UIView){
-    kDelayMainShort {
+    DispatchQueue.main.async {
         view.addGradientBg(colors: ["#E961F6".uiColor.cgColor,"#7E57F4".uiColor.cgColor])
     }
 }
 
 func kCreateMoreInfoBtn() -> UIButton{
-    let btn = TSUIExpandedTouchButton()
+    let btn = ASUIExpandedTouchButton()
     btn.setImage(UIImage(named: "more_info_white"), for: .normal)
     return btn
 }

+ 2 - 1
AIPlayRingtones/OperationQueue/Generate/ASGenerateTextToRingOperation.swift

@@ -9,6 +9,7 @@ import Combine
 import Alamofire
 import ObjectMapper
 import Kingfisher
+
 class ASGenerateTextToRingOperationQueue: ASGenerateBaseOperationQueue {
     static let shared:ASGenerateTextToRingOperationQueue = ASGenerateTextToRingOperationQueue()
 
@@ -98,7 +99,7 @@ class ASGenerateTextToRingOperation: ASGenerateBaseOperation , @unchecked Sendab
         if let cyModel = copyModel as? ASActionInfoModel {
             let topY = k_Nav_Height+10
 //            debugPrint("topY=\(topY)")
-            playVibration()
+            AudioServicesPlaySystemSound(1520)
             kSaveSuccesswShared.show(atView: window,text: "Successfully generated".localized,deadline: 5.0,bottom: kSaveSuccesswShared.getBottom(topY: topY)) {
                 let gennerateVC = ASRingGeneratorVC(generateStyleModel: ASGenerateStyleModel(),infoModel: cyModel) { model in }
                 gennerateVC.modalPresentationStyle = .overFullScreen