浏览代码

fix:3.6.5(2)修改 bug

100Years 2 月之前
父节点
当前提交
366c9bc8c3

+ 2 - 2
TSLiveWallpaper.xcodeproj/project.pbxproj

@@ -1325,7 +1325,7 @@
 				ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
 				CODE_SIGN_IDENTITY = "Apple Development";
 				CODE_SIGN_STYLE = Automatic;
-				CURRENT_PROJECT_VERSION = 1;
+				CURRENT_PROJECT_VERSION = 2;
 				DEVELOPMENT_TEAM = 65UD255J84;
 				ENABLE_APP_SANDBOX = NO;
 				ENABLE_USER_SCRIPT_SANDBOXING = NO;
@@ -1365,7 +1365,7 @@
 				ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
 				CODE_SIGN_IDENTITY = "Apple Development";
 				CODE_SIGN_STYLE = Automatic;
-				CURRENT_PROJECT_VERSION = 1;
+				CURRENT_PROJECT_VERSION = 2;
 				DEVELOPMENT_TEAM = 65UD255J84;
 				ENABLE_APP_SANDBOX = NO;
 				ENABLE_USER_SCRIPT_SANDBOXING = NO;

+ 12 - 5
TSLiveWallpaper/Business/BusinessView/TSImageIPanComparisonView.swift

@@ -32,7 +32,11 @@ class TSImageIPanComparisonView: UIView , UIGestureRecognizerDelegate{
         }
     }
     
-    
+    lazy var panGesture: UIPanGestureRecognizer = {
+        let panGesture = UIPanGestureRecognizer(target: self, action: #selector(handlePan(_:)))
+        panGesture.delegate = self
+        return panGesture
+    }()
     // MARK: - 视图设置
     private func setupViews() {
         // 旧图片视图(初始显示)
@@ -56,21 +60,24 @@ class TSImageIPanComparisonView: UIView , UIGestureRecognizerDelegate{
             make.center.equalTo(lineView.snp.center)
         }
 
-        let panGesture = UIPanGestureRecognizer(target: self, action: #selector(handlePan(_:)))
-        panGesture.delegate = self
         addGestureRecognizer(panGesture)
       
     }
+    
     func gestureRecognizer(_ gestureRecognizer: UIGestureRecognizer,
                           shouldRecognizeSimultaneouslyWith otherGestureRecognizer: UIGestureRecognizer) -> Bool {
+        
+        if gestureRecognizer == panGesture {
+            let velocity = panGesture.velocity(in: self)
+            return abs(velocity.x) < abs(velocity.y) // 只有垂直速度更快时才响应
+        }
         return true // 允许同时识别
     }
+    
     // 处理拖动手势
     @objc private func handlePan(_ gesture: UIPanGestureRecognizer) {
-    
         // 获取手指在视图中的移动距离(相对起点)
         let translation = gesture.translation(in: self)
-        
         // 只处理水平移动
          if abs(translation.x) > abs(translation.y) {
              if translation.x > 0 {

+ 1 - 1
TSLiveWallpaper/Business/TSAIListVC/TSAIListHistoryVC/TSAIListHistoryVC.swift

@@ -193,7 +193,7 @@ extension TSAIListHistoryVC: UICollectionViewDataSource ,UICollectionViewDelegat
             }
             
             let vc = TSAIPhotoDetailsBrowserVC()
-            vc.currentIndex = indexPath.item
+            vc.currentIndex = dataModelArray.firstIndex(of: dbModel) ?? 0
             vc.dataModelArray = dataModelArray
             vc.deleteBlock = { [weak self]  index in
                 guard let self = self else { return }

+ 10 - 3
TSLiveWallpaper/Business/TSTabBarController/TSTabBarController.swift

@@ -149,7 +149,7 @@ extension TSTabBarController {
         if show {
             addRedDotToLastTab()
         } else {
-            appUpdateDotView.removeFromSuperview()
+            appUpdateDotView.isHidden = true
         }
     }
     
@@ -157,14 +157,21 @@ extension TSTabBarController {
         guard let items = tabBar.items,
               !items.isEmpty else { return }
         
-        appUpdateDotView.removeFromSuperview()
+        if appUpdateDotView.superview != nil {
+            appUpdateDotView.isHidden = false
+            return
+        }
         
         let lastItemIndex = items.count - 1
         let itemWidth = tabBar.frame.width / CGFloat(items.count)
         let xPosition = itemWidth * CGFloat(lastItemIndex) + itemWidth/2 + (dotSize * 2) + 2
         let yPosition: CGFloat = 10
-        appUpdateDotView.frame = CGRect(x: xPosition, y: yPosition, width: dotSize, height: dotSize)
         tabBar.addSubview(appUpdateDotView)
+        appUpdateDotView.snp.makeConstraints { make in
+            make.width.height.equalTo(dotSize)
+            make.leading.equalTo(xPosition)
+            make.top.equalTo(yPosition)
+        }
     }
     
     func changeSelectedIndex(index:Int){

+ 3 - 3
TSLiveWallpaper/Common/Purchase/TSPurchaseManager.swift

@@ -75,9 +75,9 @@ public class PurchaseManager: NSObject {
     }
 
     @objc public var isVip: Bool {
-//        #if DEBUG
-//        return true
-//        #endif
+        #if DEBUG
+        return true
+        #endif
         guard let expiresDate = expiredDate else {
             return false
         }