Browse Source

Merge branch 'master' into module

# Conflicts:
#	BFFramework/Classes/Stuckpoint/Controller/PQStuckPointMusicSearchController.swift
harry 3 năm trước cách đây
mục cha
commit
06b70c4f36

+ 31 - 43
BFFramework/Classes/Stuckpoint/Controller/PQStuckPointEditerController.swift

@@ -306,8 +306,10 @@ class PQStuckPointEditerController: BFBaseViewController {
     // 卡点编辑 btn
     lazy var pointEditerBtn: UIButton = {
         let pointEdterBtn = UIButton(type: .custom)
-        pointEdterBtn.setImage(UIImage().BF_Image(named: "pointEditerBtn_n"), for: .normal)
-        pointEdterBtn.setImage(UIImage().BF_Image(named: "pointEditerBtn_h").withRenderingMode(.alwaysTemplate), for: .selected)
+       
+        pointEdterBtn.setImage(UIImage.moduleImage(named: "pointEditerBtn_n", moduleName: "BFFramework", isAssets: false), for: .normal)
+         
+        pointEdterBtn.setImage(UIImage.moduleImage(named: "pointEditerBtn_h", moduleName: "BFFramework", isAssets: false)?.withRenderingMode(.alwaysTemplate), for: .selected)
         pointEdterBtn.tintColor = UIColor.hexColor(hexadecimal: PQBFConfig.shared.styleColor.rawValue)
         pointEdterBtn.addTarget(self, action: #selector(pointEditerBtnClick(sender:)), for: .touchUpInside)
         pointEdterBtn.isSelected = true
@@ -316,10 +318,10 @@ class PQStuckPointEditerController: BFBaseViewController {
     }()
 
     // 音乐编辑 btn
-    lazy var musicEditerBtn: UIButton = {
+    lazy var musicEditerBtn: UIButton = { 
         let musicEditerBtn = UIButton(type: .custom)
-        musicEditerBtn.setImage(UIImage().BF_Image(named: "musicEditerBtn_n"), for: .normal)
-        musicEditerBtn.setImage(UIImage().BF_Image(named: "musicEditerBtn_h").withRenderingMode(.alwaysTemplate), for: .selected)
+        musicEditerBtn.setImage(UIImage.moduleImage(named: "musicEditerBtn_n", moduleName: "BFFramework", isAssets: false), for: .normal)
+        musicEditerBtn.setImage(UIImage.moduleImage(named: "musicEditerBtn_h", moduleName: "BFFramework", isAssets: false)?.withRenderingMode(.alwaysTemplate), for: .selected)
         musicEditerBtn.tintColor = UIColor.hexColor(hexadecimal: PQBFConfig.shared.styleColor.rawValue)
         musicEditerBtn.addTarget(self, action: #selector(musicEditerBtnClick(sender:)), for: .touchUpInside)
         musicEditerBtn.adjustsImageWhenHighlighted = false
@@ -344,14 +346,14 @@ class PQStuckPointEditerController: BFBaseViewController {
         return speedStuckBtn
     }()
 
-    //
-    lazy var speedStuckBtnGif: UIImageView = {
-        let speedStuckBtnGif = UIImageView()
-        speedStuckBtnGif.kf.setImage(with: URL(fileURLWithPath: currentBundlePath()!.path(forResource: "speedstuck_h", ofType: "gif")!))
-        speedStuckBtnGif.isHidden = true
-        return speedStuckBtnGif
-
-    }()
+//    //
+//    lazy var speedStuckBtnGif: UIImageView = {
+//        let speedStuckBtnGif = UIImageView()
+//        speedStuckBtnGif.kf.setImage(with: URL(fileURLWithPath: currentBundlePath()!.path(forResource: "speedstuck_h", ofType: "gif")!))
+//        speedStuckBtnGif.isHidden = true
+//        return speedStuckBtnGif
+//
+//    }()
 
     // 跳转卡点模式 btn
     lazy var jumpPointBtn: UIButton = {
@@ -373,13 +375,13 @@ class PQStuckPointEditerController: BFBaseViewController {
         return jumpPointBtn
     }()
 
-    lazy var jumpPointBtnGif: UIImageView = {
-        let jumpPointBtnGif = UIImageView()
-        jumpPointBtnGif.kf.setImage(with: URL(fileURLWithPath: currentBundlePath()!.path(forResource: "jumpPoint_n", ofType: "gif")!))
-        jumpPointBtnGif.isHidden = true
-        return jumpPointBtnGif
-
-    }()
+//    lazy var jumpPointBtnGif: UIImageView = {
+//        let jumpPointBtnGif = UIImageView()
+//        jumpPointBtnGif.kf.setImage(with: URL(fileURLWithPath: currentBundlePath()!.path(forResource: "jumpPoint_n", ofType: "gif")!))
+//        jumpPointBtnGif.isHidden = true
+//        return jumpPointBtnGif
+//
+//    }()
 
     // 仅配乐模式 btn
     lazy var onlyMusicBtn: UIButton = {
@@ -722,12 +724,6 @@ class PQStuckPointEditerController: BFBaseViewController {
                 PQEventTrackViewModel.baseReportUpload(businessType: .bt_buttonClick, objectType: .ot_shanyinApp_musicVideoPreview_selectPatternBgm, pageSource: .sp_shanyinApp_main, extParams: nil, remindmsg: "")
             }
         }
-        speedStuckBtnGif.kf.setImage(with: URL(fileURLWithPath: currentBundlePath()!.path(forResource: speedStuckBtnGifName, ofType: "gif")!))
-        jumpPointBtnGif.kf.setImage(with: URL(fileURLWithPath: currentBundlePath()!.path(forResource: jumpPointBtnGifName, ofType: "gif")!))
-
-//        speedStuckBtnGif.isHidden = false
-//        jumpPointBtnGif.isHidden = false
-
         settingPlayerView()
     }
 
@@ -826,9 +822,7 @@ class PQStuckPointEditerController: BFBaseViewController {
         pointEditBGView.addSubview(pointEditRemindLab)
         pointEditBGView.addSubview(speedTitleLab)
         pointEditBGView.addSubview(speedStuckBtn)
-        speedStuckBtn.addSubview(speedStuckBtnGif)
         pointEditBGView.addSubview(jumpPointBtn)
-        jumpPointBtn.addSubview(jumpPointBtnGif)
         pointEditBGView.addSubview(onlyMusicBtn)
         pointEditBGView.addSubview(speedSettingView)
         pointEditBGView.addSubview(sustomSwitchView)
@@ -883,24 +877,14 @@ class PQStuckPointEditerController: BFBaseViewController {
             make.height.equalTo(80)
             make.width.equalTo(80)
         }
-        speedStuckBtnGif.snp.makeConstraints { make in
-            make.height.width.equalTo(46)
-            make.top.equalToSuperview().offset(8)
-            make.centerX.equalToSuperview()
-        }
-
+ 
         jumpPointBtn.snp.makeConstraints { make in
             make.left.equalTo(speedStuckBtn.snp.right).offset(10)
             make.top.equalTo(speedStuckBtn.snp.top)
             make.height.equalTo(80)
             make.width.equalTo(80)
         }
-        jumpPointBtnGif.snp.makeConstraints { make in
-            make.height.width.equalTo(46)
-            make.top.equalToSuperview().offset(8)
-            make.centerX.equalToSuperview()
-        }
-
+ 
         onlyMusicBtn.snp.makeConstraints { make in
             make.left.equalTo(jumpPointBtn.snp.right).offset(10)
             make.top.equalTo(speedStuckBtn.snp.top)
@@ -2042,9 +2026,13 @@ extension PQStuckPointEditerController {
             } 
              // 跳跃卡点不可用
              if selectedTotalDuration < 6 && selectedDataCount != selectedImageDataCount {
-                 jumpPointBtn.setImage(UIImage().BF_Image(named: "jumpPoint_disable"), for: .normal)
-                 jumpPointBtn.setImage(UIImage().BF_Image(named: "jumpPoint_disable"), for: .selected)
-                 jumpPointBtnGif.isHidden = true
+                
+                let styleColor = UIColor.hexColor(hexadecimal: PQBFConfig.shared.styleColor.rawValue)
+                jumpPointBtn.setTitleColor(UIColor.init(red: styleColor.rgbaf[0], green: styleColor.rgbaf[1], blue: styleColor.rgbaf[2], alpha: 0.3), for: .selected)
+                
+                let pointEditNamalBackgroundColor = PQBFConfig.shared.pointEditNamalBackgroundColor
+                jumpPointBtn.backgroundColor = UIColor.init(red: pointEditNamalBackgroundColor.rgbaf[0], green: pointEditNamalBackgroundColor.rgbaf[1], blue: pointEditNamalBackgroundColor.rgbaf[2], alpha: 0.3)
+ 
              }
 
             /*

+ 6 - 2
BFFramework/Classes/Stuckpoint/View/PQSpeedSettingView.swift

@@ -328,8 +328,12 @@ class PQSpeedTitleCell: UICollectionViewCell {
 
             } else {
                 if(titleModel?.isDisable ?? false){
-                    titleLab.backgroundColor = .clear
-                    titleLab.textColor = UIColor.hexColor(hexadecimal: "#DFDFDF")
+                    
+                    let backColor = PQBFConfig.shared.pointEditNamalBackgroundColor
+                    let textColor = UIColor.hexColor(hexadecimal: "#959595")
+                    titleLab.backgroundColor = UIColor.init(red: backColor.rgbaf[0], green: backColor.rgbaf[1], blue: backColor.rgbaf[2], alpha: 0.3)
+                    titleLab.textColor =  UIColor.init(red: textColor.rgbaf[0], green: textColor.rgbaf[1], blue: textColor.rgbaf[2], alpha: 0.3)
+                    
                 }else{
                     titleLab.backgroundColor = PQBFConfig.shared.pointEditNamalBackgroundColor
                     titleLab.textColor = UIColor.hexColor(hexadecimal: "#959595")