100Years před 14 hodinami
rodič
revize
3179567da7

+ 4 - 4
AIEmoji.xcodeproj/project.pbxproj

@@ -2314,7 +2314,7 @@
 				ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
 				CLANG_ENABLE_MODULES = YES;
 				CODE_SIGN_STYLE = Automatic;
-				CURRENT_PROJECT_VERSION = 2;
+				CURRENT_PROJECT_VERSION = 1;
 				DEVELOPMENT_TEAM = 65UD255J84;
 				ENABLE_USER_SCRIPT_SANDBOXING = NO;
 				GENERATE_INFOPLIST_FILE = YES;
@@ -2330,7 +2330,7 @@
 					"$(inherited)",
 					"@executable_path/Frameworks",
 				);
-				MARKETING_VERSION = 3.3.2;
+				MARKETING_VERSION = 3.6.0;
 				PRODUCT_BUNDLE_IDENTIFIER = com.girl.music.wallpaper;
 				PRODUCT_NAME = "$(TARGET_NAME)";
 				SUPPORTED_PLATFORMS = "iphoneos iphonesimulator";
@@ -2353,7 +2353,7 @@
 				ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
 				CLANG_ENABLE_MODULES = YES;
 				CODE_SIGN_STYLE = Automatic;
-				CURRENT_PROJECT_VERSION = 2;
+				CURRENT_PROJECT_VERSION = 1;
 				DEVELOPMENT_TEAM = 65UD255J84;
 				ENABLE_USER_SCRIPT_SANDBOXING = NO;
 				GENERATE_INFOPLIST_FILE = YES;
@@ -2369,7 +2369,7 @@
 					"$(inherited)",
 					"@executable_path/Frameworks",
 				);
-				MARKETING_VERSION = 3.3.2;
+				MARKETING_VERSION = 3.6.0;
 				PRODUCT_BUNDLE_IDENTIFIER = com.girl.music.wallpaper;
 				PRODUCT_NAME = "$(TARGET_NAME)";
 				SUPPORTED_PLATFORMS = "iphoneos iphonesimulator";

+ 1 - 1
AIEmoji/AppDelegate.swift

@@ -15,7 +15,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
     
     func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
         window = UIWindow(frame: UIScreen.main.bounds)
-        window?.backgroundColor = UIColor.white
+        window?.backgroundColor = UIColor.black
         window?.makeKeyAndVisible()
         initPlatform()
         //首次安装需要等待网络权限弹窗

+ 22 - 0
AIEmoji/Assets.xcassets/AIList/alList_shadow.imageset/Contents.json

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

binární
AIEmoji/Assets.xcassets/AIList/alList_shadow.imageset/alList_shadow@2x.png


binární
AIEmoji/Assets.xcassets/AIList/alList_shadow.imageset/alList_shadow@3x.png


binární
AIEmoji/Assets.xcassets/PTP/style/ptp_style_7.imageset/ptp_style_7@2x.png


binární
AIEmoji/Assets.xcassets/PTP/style/ptp_style_7.imageset/ptp_style_7@3x.png


+ 19 - 5
AIEmoji/Business/TSAILIstVC/TSAIExpandImageVC/TSAIExpandImageVC.swift

@@ -157,7 +157,17 @@ extension TSAIExpandImageVC {
         var expandWidth: CGFloat
         var expandHeight: CGFloat
         
-        if targetAspectRatio > imageAspectRatio {
+//        if targetAspectRatio > imageAspectRatio {
+//            // 以宽度为基准
+//            expandWidth = maxSize.width
+//            expandHeight = expandWidth / targetAspectRatio
+//        }else {
+//            // 以高度为基准
+//            expandHeight = maxSize.height
+//            expandWidth = expandHeight * targetAspectRatio
+//        }
+        
+        if targetAspectRatio >= 1.0 {
             // 以宽度为基准
             expandWidth = maxSize.width
             expandHeight = expandWidth / targetAspectRatio
@@ -168,8 +178,8 @@ extension TSAIExpandImageVC {
         }
         
         // 确保扩图区域不超过最大限制(100%)
-        let maxExpandWidth = view.bounds.width
-        let maxExpandHeight = view.bounds.height
+        let maxExpandWidth = maxSize.width
+        let maxExpandHeight = maxSize.height
         print("\n")
         expandWidth = min(expandWidth, maxExpandWidth)
         expandHeight = min(expandHeight, maxExpandHeight)
@@ -178,11 +188,14 @@ extension TSAIExpandImageVC {
         print("expandHeight=\(expandHeight)")
         print("\n")
         
+        let difference = abs(targetAspectRatio - imageAspectRatio) <= 0.01
+        print("targetAspectRatio=\(targetAspectRatio),imageAspectRatio=\(imageAspectRatio),difference=\(difference)")
+        
         // 使用 SnapKit 更新约束
         expandAreaView.updateExpandAreaView(width: expandWidth, height: expandHeight)
         let imageRatio = min(expandWidth/imageSize.width,expandHeight/imageSize.height)
         var scaleFactor = 1.0
-        if targetAspectRatio == 1.0,imageAspectRatio == 1.0 {
+        if difference {
             scaleFactor = 0.67
         }
         
@@ -197,7 +210,8 @@ extension TSAIExpandImageVC {
         let ws = expandWidth/imageViewW - 1.0
         let hs = expandHeight/imageViewH - 1.0
         
-        if targetAspectRatio == 1.0,imageAspectRatio == 1.0 {
+
+        if difference {
             photoExpand = UIEdgeInsets(top: 0.25, left: 0.25, bottom: 0.25, right: 0.25)
         }else{
             photoExpand = UIEdgeInsets(top: hs/2.0, left: ws/2.0, bottom: hs/2.0, right: ws/2.0)

+ 3 - 2
AIEmoji/Business/TSAILIstVC/TSAILIstVC/TSAILIstCell.swift

@@ -54,12 +54,13 @@ class TSAILIstCell: TSBaseCollectionCell {
         let animatedImageView = AnimatedImageView()
         animatedImageView.autoPlayAnimatedImage = false
         animatedImageView.isHidden = true
+        animatedImageView.cornerRadius = 16.0
         return animatedImageView
     }()
     
     lazy var shadowImageView: UIImageView = {
         let shadowImageView = UIImageView.createImageView(imageName: "alList_shadow",contentMode: .scaleToFill)
-        shadowImageView.alpha = 0.8
+        shadowImageView.alpha = 0.7
         shadowImageView.isHidden = true
         return shadowImageView
     }()
@@ -89,7 +90,7 @@ class TSAILIstCell: TSBaseCollectionCell {
 
         bgContentView.addSubview(titleLab)
         titleLab.snp.makeConstraints { make in
-            make.trailing.equalTo(14)
+            make.trailing.equalTo(-14)
             make.leading.equalTo(12)
             make.bottom.equalTo(-16)
         }

+ 10 - 6
AIEmoji/Business/TSAILIstVC/TSAILIstVC/TSAILIstVC.swift

@@ -33,7 +33,7 @@ class TSAILIstVC: TSBaseVC {
                 tapBlock: { [weak self] model, _, _ in
                    guard let self = self else { return }
                     enterSelectPhotos(
-                        userDefaultsKey: "isFirstAIPhotoExpand",
+                        userDefaultsKey: "",
                         maxBitSize: kUploadImageMaxBit10Size,
                          config:.getDefaultConfig(imageMaxBitSize: kUploadImageMaxBit10Size)
                     ) { image in
@@ -364,12 +364,16 @@ extension TSAILIstVC: UICollectionViewDataSource ,UICollectionViewDelegate {
 extension TSAILIstVC{
     
     func enterSelectPhotos(userDefaultsKey:String,maxBitSize:Int,config:TSAIListHintBaseVC.Config,complete: @escaping (UIImage)->Void){
-        TSAIListHintBaseVC.userDefaultsKey = userDefaultsKey
-        if TSAIListHintBaseVC.isShowUploadImageHint{
-            TSAIListHintBaseVC.isShowUploadImageHint = false
-            self.presentModalHintVC(config:config,complete:complete)
-        }else {
+        if userDefaultsKey.count == 0 {
             self.pickSinglePhoto(maxBitSize:maxBitSize,complete:complete)
+        }else{
+            TSAIListHintBaseVC.userDefaultsKey = userDefaultsKey
+            if TSAIListHintBaseVC.isShowUploadImageHint{
+                TSAIListHintBaseVC.isShowUploadImageHint = false
+                self.presentModalHintVC(config:config,complete:complete)
+            }else {
+                self.pickSinglePhoto(maxBitSize:maxBitSize,complete:complete)
+            }
         }
     }
     

+ 2 - 67
AIEmoji/Business/TSAILIstVC/TSAIListVideoPlayerVC/TSAIListVideoPlayerVC.swift

@@ -10,71 +10,6 @@ import UIKit
 import AVKit
 import SnapKit
 
-
-class VideoProgressSlider: UISlider {
-    // 增加触摸区域的范围(比可视区域大)
-    private let touchAreaPadding: CGFloat = 20
-    
-    // 增加点击响应区域
-    override func beginTracking(_ touch: UITouch, with event: UIEvent?) -> Bool {
-        let width = self.bounds.size.width
-        let tapPoint = touch.location(in: self)
-        let tapValue = Float(tapPoint.x / width)
-        
-        self.setValue(tapValue, animated: true)
-        self.sendActions(for: .valueChanged)
-        
-        return true
-    }
-    
-    // 扩大触摸区域
-    override func point(inside point: CGPoint, with event: UIEvent?) -> Bool {
-        let bounds = self.bounds.insetBy(dx: -touchAreaPadding, dy: -touchAreaPadding)
-        return bounds.contains(point)
-    }
-    
-    // 扩大滑块的实际触摸区域(不影响视觉大小)
-    override func thumbRect(forBounds bounds: CGRect, trackRect rect: CGRect, value: Float) -> CGRect {
-        let visualThumbSize: CGFloat = 10 // 视觉上的大小
-        let touchThumbSize: CGFloat = 20  // 实际触摸区域大小
-        
-        let defaultRect = super.thumbRect(forBounds: bounds, trackRect: rect, value: value)
-        
-        // 视觉上保持15x15大小
-        let visualRect = CGRect(
-            x: defaultRect.origin.x + (defaultRect.width - visualThumbSize)/2,
-            y: defaultRect.origin.y + (defaultRect.height - visualThumbSize)/2,
-            width: visualThumbSize,
-            height: visualThumbSize
-        )
-        
-        // 实际触摸区域更大(30x30)
-        let touchRect = CGRect(
-            x: defaultRect.origin.x + (defaultRect.width - touchThumbSize)/2,
-            y: defaultRect.origin.y + (defaultRect.height - touchThumbSize)/2,
-            width: touchThumbSize,
-            height: touchThumbSize
-        )
-        
-        // 保存实际触摸区域用于点击检测
-        self.touchThumbRect = touchRect
-        
-        return visualRect
-    }
-    
-    // 存储实际触摸区域
-    private var touchThumbRect: CGRect = .zero
-    
-    // 轨道高度
-    private let trackHeight: CGFloat = 3
-    
-    override func trackRect(forBounds bounds: CGRect) -> CGRect {
-        var rect = super.trackRect(forBounds: bounds)
-        rect.size.height = trackHeight
-        return rect
-    }
-}
-
 class TSAIListVideoPlayerVC: UIViewController {
     
     // MARK: - Properties
@@ -101,8 +36,8 @@ class TSAIListVideoPlayerVC: UIViewController {
         return button
     }()
     
-    private lazy var progressSlider: UISlider = {
-        let slider = UISlider()
+    private lazy var progressSlider: TSProgressSlider = {
+        let slider = TSProgressSlider()
         slider.minimumTrackTintColor = UIColor.themeColor
         slider.maximumTrackTintColor = .white.withAlphaComponent(0.2)
 //        slider.thumbTintColor = UIColor.white

+ 15 - 3
AIEmoji/Business/TSPTPGeneratorVC/TSAIPhotoGeneratorBaseVC/TSAIPhotoGeneratorBaseVC.swift

@@ -25,10 +25,22 @@ class TSAIPhotoGeneratorBaseVC: TSBaseVC {
     
     lazy var bottomView: UIView = {
         let bottom = 60+k_Height_safeAreaInsetsBottom()
+
+//        let bottomView = UIView(frame: CGRectMake(0, k_ScreenHeight-bottomViewH, k_ScreenWidth, bottomViewH))
+//        bottomView.backgroundColor = "#222222".uiColor
+//        bottomView.cornersRound(radius: 20, corner: [.topLeft,.topRight])
+//        bottomView.isHidden = true
+        
         let bottomView = UIView(frame: CGRectMake(0, k_ScreenHeight-bottomViewH, k_ScreenWidth, bottomViewH))
-        bottomView.backgroundColor = "#222222".uiColor
-        bottomView.cornersRound(radius: 20, corner: [.topLeft,.topRight])
+        bottomView.backgroundColor = "#111111".uiColor
+        
+        let colorView = UIView.creatColor(color: "#222222".uiColor)
+        colorView.frame = bottomView.bounds
+        colorView.cornersRound(radius: 20, corner: [.topLeft,.topRight])
+        bottomView.addSubview(colorView)
+        
         bottomView.isHidden = true
+        
         return bottomView
     }()
 
@@ -82,7 +94,7 @@ class TSAIPhotoGeneratorBaseVC: TSBaseVC {
     override func createView() {
         view.backgroundColor = .clear
         setNavBarViewHidden(true)
-
+        
         contentView.addSubview(netWorkImageView)
         contentView.addSubview(bottomView)
         //关闭按钮

+ 1 - 1
AIEmoji/Business/TSPurchaseMembershipVC/TSPurchaseVC.swift

@@ -508,7 +508,7 @@ struct TSVipRecView: View {
     
         HStack(spacing: 4) {
             Image("upvote_black").resizable().frame(width: 16, height: 16)
-            Text("Save-Vip".localized + "80%").font(.font(size: 12,weight: .medium)).foregroundColor(.hex("#111111"))
+            Text("Save-Vip".localized + " 80%").font(.font(size: 12,weight: .medium)).foregroundColor(.hex("#111111"))
         }
         .padding(EdgeInsets(top: 6, leading: 6, bottom: 6, trailing: 6))
         .background(Color.hex("#FECB34"))

+ 0 - 3
AIEmoji/Business/TSSetingVC/SetingVC/View/SettingPurchaseTopView.swift

@@ -17,8 +17,6 @@ struct SettingPurchaseTopView: View {
                 
                 VStack {
                     Spacer().frame(height: 20)
-                    
-//                    Image(.settingVip).resizable().frame(width: 210*kDesignScale, height: 50*kDesignScale)
                     customGradientText(text: "\(kAppName) ",fontName: .KelsiFill).frame(height: 50*kDesignScale)
                     Spacer()
                     
@@ -35,7 +33,6 @@ struct SettingPurchaseTopView: View {
                     Spacer().frame(width:20)
                     
                     VStack(alignment: .leading,spacing: 12) {
-//                        Image(.settingNoVip).resizable().frame(width: 186*kDesignScale, height: 44*kDesignScale)
                         customText(text: "\(kAppName) ",fontName: .KelsiFill,color:UIColor.white.color).frame(height: 50*kDesignScale)
                         HStack {
                             Text("Limited Time Discount".localized)

+ 1 - 0
AIEmoji/Business/VIewTool/TSGeneratorloadingView.swift

@@ -59,6 +59,7 @@ class TSGeneratorloadingView: TSBaseView {
     
     lazy var blurEffect: UIVisualEffectView = {
         let blurEffect = createBlurEffectView(style: .dark)
+        blurEffect.alpha = 0.9
         return blurEffect
     }()
     

+ 1 - 1
AIEmoji/Common/View/TSPhotoPickerManager/TSPhotoPickerManager.swift

@@ -59,7 +59,7 @@ class TSPhotoPickerManager: NSObject {
         imagePicker.sourceType = .photoLibrary
         imagePicker.delegate = self
         imagePicker.mediaTypes = ["public.image"] // 只选择照片
-        imagePicker.modalPresentationStyle = .overFullScreen
+//        imagePicker.modalPresentationStyle = .custom
 //        imagePicker.modalTransitionStyle = .crossDissolve
         if #available(iOS 13.0, *) {
             imagePicker.overrideUserInterfaceStyle = .dark

+ 1 - 1
AIEmoji/en.lproj/Localizable.strings

@@ -225,7 +225,7 @@
 "Open Eyes" = "Open Eyes";
 "Restore" = "Restore";
 "Restoring" = "Restoring";
-"Make photo live" = "Make photo live";
+"Make photo live" = "Make Photo Live";
 
 "~ %d min" = "~ %d mins";
 "~ %d seconds" = "~ %d seconds";