瀏覽代碼

1.修改主题

wenweiwei 3 年之前
父節點
當前提交
0ef5dc8873

+ 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: PQConfigUtil.shared.styleColor.rawValue)
+        nextBtn.backgroundColor = UIColor.hexColor(hexadecimal: PQBFConfig.shared.styleColor.rawValue)
         nextBtn.setTitleColor(UIColor.hexColor(hexadecimal: "#FFFFFF"), for: .normal)
         nextBtn.uxy_acceptEventInterval = 0.5
         nextBtn.addCorner(corner: 3)

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

@@ -93,7 +93,7 @@ public class PQStuckPointMaterialController: PQBaseViewController {
         let choseLineView = UIView(frame: CGRect(x: 0, y: 0, width: 25, height: 2))
         choseLineView.frame.origin.y = (navHeadImageView?.frame.maxY ?? 0) - 5
         choseLineView.center.x = choseLocalVideoBtn.center.x
-        choseLineView.backgroundColor = UIColor.hexColor(hexadecimal: PQConfigUtil.shared.styleColor.rawValue)
+        choseLineView.backgroundColor = UIColor.hexColor(hexadecimal: PQBFConfig.shared.styleColor.rawValue)
         return choseLineView
     }()
 
@@ -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: PQConfigUtil.shared.styleColor.rawValue)
+            confirmBtn.backgroundColor = UIColor.hexColor(hexadecimal: PQBFConfig.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: PQConfigUtil.shared.styleColor.rawValue)], range: NSRange(location: 6, length: "\(totalDuration.formatDurationToHMS())".count))
+            att.setAttributes([.foregroundColor: UIColor.hexColor(hexadecimal: PQBFConfig.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.hexColor(hexadecimal: PQConfigUtil.shared.styleColor.rawValue)
+        progressView.progressTintColor = UIColor.hexColor(hexadecimal: PQBFConfig.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: PQConfigUtil.shared.styleColor.rawValue)
+        finishedBtn.backgroundColor = UIColor.hexColor(hexadecimal: PQBFConfig.shared.styleColor.rawValue)
         avPlayer.replaceCurrentItem(with: AVPlayerItem(url: URL(fileURLWithPath: (exportLocalURL?.absoluteString ?? "").replacingOccurrences(of: "file:///", with: ""))))
         avPlayer.play()
         if isError {

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

@@ -12,13 +12,13 @@ class PQCuttingPointView: UIView {
     lazy var pointView: UIView = {
         let pointView = UIView()
         pointView.addCorner(corner: 1.5)
-        pointView.backgroundColor = UIColor.hexColor(hexadecimal: PQConfigUtil.shared.styleColor.rawValue)
+        pointView.backgroundColor = UIColor.hexColor(hexadecimal: PQBFConfig.shared.styleColor.rawValue)
         return pointView
     }()
 
     lazy var dragingImageView: UIImageView = {
         let dragingImageView = UIImageView(image: UIImage.init().BF_Image(named:  "stuckPoint_dragingImage").withRenderingMode(.alwaysTemplate))
-        dragingImageView.tintColor = UIColor.hexColor(hexadecimal: PQConfigUtil.shared.styleColor.rawValue)
+        dragingImageView.tintColor = UIColor.hexColor(hexadecimal: PQBFConfig.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: PQConfigUtil.shared.styleColor.rawValue)
+        confirmBtn.backgroundColor = UIColor.hexColor(hexadecimal: PQBFConfig.shared.styleColor.rawValue)
         return confirmBtn
     }()
 
     lazy var remindView: UIView = {
         let remindView = UIView()
-        remindView.backgroundColor = UIColor.hexColor(hexadecimal: PQConfigUtil.shared.styleColor.rawValue)
+        remindView.backgroundColor = UIColor.hexColor(hexadecimal: PQBFConfig.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) ? PQConfigUtil.shared.styleColor.rawValue : "#CCCCCC")
+            titleLab.textColor = UIColor.hexColor(hexadecimal: ((bgmData as? PQStuckPointMusicTagsModel)?.isSelected ?? false) ? PQBFConfig.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: PQConfigUtil.shared.styleColor.rawValue)
+            titleLab.textColor = UIColor.hexColor(hexadecimal: PQBFConfig.shared.styleColor.rawValue)
             titleLab.layer.borderWidth = 0.5
-            titleLab.layer.borderColor = UIColor.hexColor(hexadecimal: PQConfigUtil.shared.styleColor.rawValue).cgColor
+            titleLab.layer.borderColor = UIColor.hexColor(hexadecimal: PQBFConfig.shared.styleColor.rawValue).cgColor
         } else {
             titleLab.textColor = UIColor.hexColor(hexadecimal: "#CCCCCC")
             titleLab.layer.borderWidth = 0

+ 5 - 5
BFFramework/Classes/Stuckpoint/View/PQVideoCutingOprateView.swift

@@ -59,7 +59,7 @@ class PQVideoCutingOprateView: UIView {
     lazy var durationLabel: UILabel = {
         let durationLabel = UILabel()
         durationLabel.font = UIFont.systemFont(ofSize: 11, weight: .medium)
-        durationLabel.backgroundColor = UIColor.hexColor(hexadecimal: PQConfigUtil.shared.styleColor.rawValue)
+        durationLabel.backgroundColor = UIColor.hexColor(hexadecimal: PQBFConfig.shared.styleColor.rawValue)
         durationLabel.alpha = 0.1
         durationLabel.textColor = UIColor.white
         durationLabel.textAlignment = .center
@@ -71,7 +71,7 @@ class PQVideoCutingOprateView: UIView {
         leftOprateView.tintColor = UIColor.white
         leftOprateView.contentMode = .scaleAspectFill
         leftOprateView.isUserInteractionEnabled = true
-        leftOprateView.backgroundColor = UIColor.hexColor(hexadecimal: PQConfigUtil.shared.styleColor.rawValue)
+        leftOprateView.backgroundColor = UIColor.hexColor(hexadecimal: PQBFConfig.shared.styleColor.rawValue)
         let panGes = UIPanGestureRecognizer(target: self, action: #selector(panGesture(gesture:)))
         panGes.maximumNumberOfTouches = 1
         panGes.minimumNumberOfTouches = 1
@@ -82,7 +82,7 @@ class PQVideoCutingOprateView: UIView {
     lazy var rightOprateView: UIImageView = {
         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.backgroundColor = UIColor.hexColor(hexadecimal: PQBFConfig.shared.styleColor.rawValue)
         rightOprateView.contentMode = .scaleAspectFill
         rightOprateView.isUserInteractionEnabled = true
         let panGes = UIPanGestureRecognizer(target: self, action: #selector(panGesture(gesture:)))
@@ -94,13 +94,13 @@ class PQVideoCutingOprateView: UIView {
 
     lazy var topLineView: UIImageView = {
         let topLineView = UIImageView()
-        topLineView.backgroundColor = UIColor.hexColor(hexadecimal: PQConfigUtil.shared.styleColor.rawValue)
+        topLineView.backgroundColor = UIColor.hexColor(hexadecimal: PQBFConfig.shared.styleColor.rawValue)
         return topLineView
     }()
 
     lazy var bottomLineView: UIImageView = {
         let bottomLineView = UIImageView()
-        bottomLineView.backgroundColor = UIColor.hexColor(hexadecimal: PQConfigUtil.shared.styleColor.rawValue)
+        bottomLineView.backgroundColor = UIColor.hexColor(hexadecimal: PQBFConfig.shared.styleColor.rawValue)
         return bottomLineView
     }()
 

+ 3 - 3
BFFramework/Classes/Utils/PQConfigUtil.swift → BFFramework/Classes/Utils/PQBFConfig.swift

@@ -1,5 +1,5 @@
 //
-//  PQConfigUtil.swift
+//  PQBFConfig.swift
 //  BFFramework
 //
 //  Created by SanW on 2021/6/4.
@@ -7,8 +7,8 @@
 
 import UIKit
 
-public class PQConfigUtil: NSObject {
-    public static let shared = PQConfigUtil()
+public class PQBFConfig: NSObject {
+    public static let shared = PQBFConfig()
     public var styleColor: styleColor = .green
 
     override private init() {

+ 4 - 7
Example/BFFramework/ViewController.swift

@@ -6,11 +6,8 @@
 //  Copyright (c) 2021 287971051@qq.com. All rights reserved.
 //
 
-import UIKit
-//import NXFramework_Swift
-
 import BFFramework
-
+import UIKit
 
 class ViewController: UIViewController {
     override func viewDidLoad() {
@@ -19,9 +16,9 @@ class ViewController: UIViewController {
 
         navigationItem.rightBarButtonItem = UIBarButtonItem(title: "下一个", style: UIBarButtonItemStyle.plain, target: self, action: Selector(("next:")))
         let btn = UIButton(type: .contactAdd)
-        btn.frame =  CGRect(x: 100, y: 100, width: 100, height: 100)
+        btn.frame = CGRect(x: 100, y: 100, width: 100, height: 100)
         view.addSubview(btn)
- 
+
         btn.addTarget(self, action: #selector(btnClicked), for: .touchUpInside)
     }
 
@@ -33,7 +30,7 @@ class ViewController: UIViewController {
     @objc func btnClicked() -> String {
         print("打开界面")
         BFLog(message: "ssssss")
-        PQConfigUtil.shared.styleColor = .green
+        PQBFConfig.shared.styleColor = .green
         navigationController?.pushViewController(PQStuckPointMaterialController(), animated: true)
         return "111"
     }

文件差異過大導致無法顯示
+ 338 - 367
Example/Pods/Pods.xcodeproj/project.pbxproj


部分文件因文件數量過多而無法顯示