Browse Source

1.修改主题

wenweiwei 3 years ago
parent
commit
64c3764298

+ 1 - 1
BFFramework/Classes/Enums/Enums.swift

@@ -726,7 +726,7 @@ public enum videoFromScene: Int {
 // MARK: - 风格
 
 /// 风格
-enum styleColor: String {
+public enum styleColor: String {
     case nomal = "#F1034D"
     case green = "#3DC1C1"
     case red = "#EE0051"

+ 1 - 1
BFFramework/Classes/Stuckpoint/Controller/PQStuckPointEditerController.swift

@@ -45,7 +45,7 @@ class PQStuckPointEditerController: PQBaseViewController {
         nextBtn.setTitle("去合成", for: .normal)
         nextBtn.titleLabel?.font = UIFont.systemFont(ofSize: 13)
         nextBtn.addTarget(self, action: #selector(nextBtnClick(sender:)), for: .touchUpInside)
-        nextBtn.backgroundColor = UIColor.hexColor(hexadecimal: "#EE0051")
+        nextBtn.backgroundColor = UIColor.hexColor(hexadecimal: PQConfigUtil.shared.styleColor.rawValue)
         nextBtn.setTitleColor(UIColor.hexColor(hexadecimal: "#FFFFFF"), for: .normal)
         nextBtn.uxy_acceptEventInterval = 0.5
         nextBtn.addCorner(corner: 3)

+ 2 - 2
BFFramework/Classes/Stuckpoint/Controller/PQStuckPointMaterialController.swift

@@ -293,7 +293,7 @@ public class PQStuckPointMaterialController: PQBaseViewController {
         selectedImageDataCount = imageCount
         confirmBtn.isSelected = (selectedDataCount > 0 && (imageCount >= 2 || selectedDataCount > imageCount))
         if confirmBtn.isSelected {
-            confirmBtn.backgroundColor = UIColor.hexColor(hexadecimal: "#EE0051")
+            confirmBtn.backgroundColor = UIColor.hexColor(hexadecimal: PQConfigUtil.shared.styleColor.rawValue)
 //            if !materialHeadView.isHidden {
 //                UIView.animate(withDuration: 0.5, delay: 0, options: .allowUserInteraction) { [weak self] in
 //                    // 调整位置
@@ -320,7 +320,7 @@ public class PQStuckPointMaterialController: PQBaseViewController {
             bottomRemindLab.attributedText = att
         } else {
             let att = NSMutableAttributedString(string: "素材总时长 \(totalDuration.formatDurationToHMS())")
-            att.setAttributes([.foregroundColor: UIColor.hexColor(hexadecimal: "#EE0051")], range: NSRange(location: 6, length: "\(totalDuration.formatDurationToHMS())".count))
+            att.setAttributes([.foregroundColor: UIColor.hexColor(hexadecimal: PQConfigUtil.shared.styleColor.rawValue)], range: NSRange(location: 6, length: "\(totalDuration.formatDurationToHMS())".count))
             bottomRemindLab.attributedText = att
         }
         confirmBtn.setTitle(selectedDataCount > 0 ? "确定(\(selectedDataCount))" : "确定", for: .normal)

+ 2 - 2
BFFramework/Classes/Stuckpoint/Controller/PQStuckPointPublicController.swift

@@ -196,7 +196,7 @@ class PQStuckPointPublicController: PQBaseViewController {
     lazy var progressView: UIProgressView = {
         let progressView = UIProgressView(progressViewStyle: .default)
         progressView.trackTintColor = UIColor(white: 0, alpha: 0.5)
-        progressView.progressTintColor = UIColor(red: 238 / 255.0, green: 0, blue: 81 / 255.0, alpha: 0.7)
+        progressView.progressTintColor = UIColor.hexColor(hexadecimal: PQConfigUtil.shared.styleColor.rawValue)
         progressView.transform = CGAffineTransform(scaleX: 1.0, y: playerHeaderView.frame.height / 3.0)
         return progressView
     }()
@@ -789,7 +789,7 @@ extension PQStuckPointPublicController {
         oprationBgView.removeFromSuperview()
         playBtn.isHidden = true
         finishedBtn.isSelected = true
-        finishedBtn.backgroundColor = UIColor.hexColor(hexadecimal: "#EE0051")
+        finishedBtn.backgroundColor = UIColor.hexColor(hexadecimal: PQConfigUtil.shared.styleColor.rawValue)
         avPlayer.replaceCurrentItem(with: AVPlayerItem(url: URL(fileURLWithPath: (exportLocalURL?.absoluteString ?? "").replacingOccurrences(of: "file:///", with: ""))))
         avPlayer.play()
         if isError {

+ 3 - 2
BFFramework/Classes/Stuckpoint/View/PQCuttingPointView.swift

@@ -12,12 +12,13 @@ class PQCuttingPointView: UIView {
     lazy var pointView: UIView = {
         let pointView = UIView()
         pointView.addCorner(corner: 1.5)
-        pointView.backgroundColor = UIColor.hexColor(hexadecimal: "#EE0351")
+        pointView.backgroundColor = UIColor.hexColor(hexadecimal: PQConfigUtil.shared.styleColor.rawValue)
         return pointView
     }()
 
     lazy var dragingImageView: UIImageView = {
-        let dragingImageView = UIImageView(image: UIImage.init().BF_Image(named:  "stuckPoint_dragingImage"))
+        let dragingImageView = UIImageView(image: UIImage.init().BF_Image(named:  "stuckPoint_dragingImage").withRenderingMode(.alwaysTemplate))
+        dragingImageView.tintColor = UIColor.hexColor(hexadecimal: PQConfigUtil.shared.styleColor.rawValue)
         return dragingImageView
     }()
 

+ 3 - 3
BFFramework/Classes/Stuckpoint/View/PQStuckPointMusicContentCell.swift

@@ -70,13 +70,13 @@ class PQStuckPointMusicContentCell: UICollectionViewCell {
         confirmBtn.titleLabel?.font = UIFont.systemFont(ofSize: 14, weight: .medium)
         confirmBtn.isUserInteractionEnabled = false
         confirmBtn.addCorner(corner: 5)
-        confirmBtn.backgroundColor = UIColor.hexColor(hexadecimal: "#F1034D")
+        confirmBtn.backgroundColor = UIColor.hexColor(hexadecimal: PQConfigUtil.shared.styleColor.rawValue)
         return confirmBtn
     }()
 
     lazy var remindView: UIView = {
         let remindView = UIView()
-        remindView.backgroundColor = UIColor.hexColor(hexadecimal: "#F1034D")
+        remindView.backgroundColor = UIColor.hexColor(hexadecimal: PQConfigUtil.shared.styleColor.rawValue)
         remindView.addCorner(corner: 3)
         return remindView
     }()
@@ -150,7 +150,7 @@ class PQStuckPointMusicContentCell: UICollectionViewCell {
                 titleLab.font = UIFont.systemFont(ofSize: 14)
             }
             contentView.backgroundColor = UIColor.hexColor(hexadecimal: ((bgmData as? PQStuckPointMusicTagsModel)?.isSelected ?? false) ? "#111111" : "#212121")
-            titleLab.textColor = UIColor.hexColor(hexadecimal: ((bgmData as? PQStuckPointMusicTagsModel)?.isSelected ?? false) ? "#F1034D" : "#CCCCCC")
+            titleLab.textColor = UIColor.hexColor(hexadecimal: ((bgmData as? PQStuckPointMusicTagsModel)?.isSelected ?? false) ? PQConfigUtil.shared.styleColor.rawValue : "#CCCCCC")
             remindView.isHidden = !((bgmData as? PQStuckPointMusicTagsModel)?.isSelected ?? false)
         }
     }

+ 2 - 2
BFFramework/Classes/Stuckpoint/View/PQStuckPointMusicTagsContentCell.swift

@@ -43,9 +43,9 @@ class PQStuckPointMusicTagsContentCell: UICollectionViewCell {
     func addData() {
         titleLab.text = "\(tagData?.tagName ?? "")"
         if tagData?.isSelected ?? false {
-            titleLab.textColor = UIColor.hexColor(hexadecimal: "#F1034D")
+            titleLab.textColor = UIColor.hexColor(hexadecimal: PQConfigUtil.shared.styleColor.rawValue)
             titleLab.layer.borderWidth = 0.5
-            titleLab.layer.borderColor = UIColor.hexColor(hexadecimal: "#F1034D").cgColor
+            titleLab.layer.borderColor = UIColor.hexColor(hexadecimal: PQConfigUtil.shared.styleColor.rawValue).cgColor
         } else {
             titleLab.textColor = UIColor.hexColor(hexadecimal: "#CCCCCC")
             titleLab.layer.borderWidth = 0

+ 10 - 7
BFFramework/Classes/Stuckpoint/View/PQVideoCutingOprateView.swift

@@ -59,17 +59,19 @@ class PQVideoCutingOprateView: UIView {
     lazy var durationLabel: UILabel = {
         let durationLabel = UILabel()
         durationLabel.font = UIFont.systemFont(ofSize: 11, weight: .medium)
-        durationLabel.backgroundColor = UIColor(red: 238 / 255, green: 0, blue: 81 / 255, alpha: 0.3)
+        durationLabel.backgroundColor = UIColor.hexColor(hexadecimal: PQConfigUtil.shared.styleColor.rawValue)
+        durationLabel.alpha = 0.1
         durationLabel.textColor = UIColor.white
         durationLabel.textAlignment = .center
         return durationLabel
     }()
 
     lazy var leftOprateView: UIImageView = {
-        let leftOprateView = UIImageView(image:UIImage.init().BF_Image(named:  "videomk_crop_left"))
+        let leftOprateView = UIImageView(image:UIImage.init().BF_Image(named:  "videomk_crop_left").withRenderingMode(.alwaysTemplate))
+        leftOprateView.tintColor = UIColor.white
         leftOprateView.contentMode = .scaleAspectFill
         leftOprateView.isUserInteractionEnabled = true
-        leftOprateView.backgroundColor = UIColor.white
+        leftOprateView.backgroundColor = UIColor.hexColor(hexadecimal: PQConfigUtil.shared.styleColor.rawValue)
         let panGes = UIPanGestureRecognizer(target: self, action: #selector(panGesture(gesture:)))
         panGes.maximumNumberOfTouches = 1
         panGes.minimumNumberOfTouches = 1
@@ -78,10 +80,11 @@ class PQVideoCutingOprateView: UIView {
     }()
 
     lazy var rightOprateView: UIImageView = {
-        let rightOprateView = UIImageView(image: UIImage.init().BF_Image(named:  "videomk_crop_right"))
+        let rightOprateView = UIImageView(image: UIImage.init().BF_Image(named:  "videomk_crop_right").withRenderingMode(.alwaysTemplate))
+        rightOprateView.tintColor = UIColor.white
+        rightOprateView.backgroundColor = UIColor.hexColor(hexadecimal: PQConfigUtil.shared.styleColor.rawValue)
         rightOprateView.contentMode = .scaleAspectFill
         rightOprateView.isUserInteractionEnabled = true
-        rightOprateView.backgroundColor = UIColor.white
         let panGes = UIPanGestureRecognizer(target: self, action: #selector(panGesture(gesture:)))
         panGes.maximumNumberOfTouches = 1
         panGes.minimumNumberOfTouches = 1
@@ -91,13 +94,13 @@ class PQVideoCutingOprateView: UIView {
 
     lazy var topLineView: UIImageView = {
         let topLineView = UIImageView()
-        topLineView.backgroundColor = UIColor.white
+        topLineView.backgroundColor = UIColor.hexColor(hexadecimal: PQConfigUtil.shared.styleColor.rawValue)
         return topLineView
     }()
 
     lazy var bottomLineView: UIImageView = {
         let bottomLineView = UIImageView()
-        bottomLineView.backgroundColor = UIColor.white
+        bottomLineView.backgroundColor = UIColor.hexColor(hexadecimal: PQConfigUtil.shared.styleColor.rawValue)
         return bottomLineView
     }()
 

+ 1 - 1
BFFramework/Classes/Utils/PQConfigUtil.swift

@@ -9,7 +9,7 @@ import UIKit
 
 public class PQConfigUtil: NSObject {
     public static let shared = PQConfigUtil()
-    var styleColor: styleColor = .green
+    public var styleColor: styleColor = .green
 
     override private init() {
         super.init()

+ 1 - 0
Example/BFFramework/ViewController.swift

@@ -33,6 +33,7 @@ class ViewController: UIViewController {
     @objc func btnClicked() -> String {
         print("打开界面")
         BFLog(message: "ssssss")
+        PQConfigUtil.shared.styleColor = .green
         navigationController?.pushViewController(PQStuckPointMaterialController(), animated: true)
         return "111"
     }

File diff suppressed because it is too large
+ 1189 - 1191
Example/Pods/Pods.xcodeproj/project.pbxproj


Some files were not shown because too many files changed in this diff