Browse Source

remove UI calss

harry 3 năm trước cách đây
mục cha
commit
a7afd9c945

+ 0 - 234
BFCommonKit/Classes/BFBase/Controller/PQBaseViewController.swift

@@ -1,234 +0,0 @@
-//
-//  PQBaseViewController.swift
-//  PQSpeed
-//
-//  Created by SanW on 2020/5/25.
-//  Copyright © 2020 BytesFlow. All rights reserved.
-//
-
-// import MediaPlayer
-import Alamofire
-import FDFullscreenPopGesture
-import UIKit
-open class PQBaseViewController: UIViewController, UIGestureRecognizerDelegate {
-    // 侧滑拦截返回
-    public var popGestureHandle: (() -> Void)?
-    public var naviTitle: String? // 标题
-    public var rightButton: UIButton? // 右边按钮
-    public var backButton: UIButton? // 左边按钮
-    public var navTitleLabel: UILabel? // 标题
-    public var navHeadImageView: UIImageView? // 导航条
-    public var lineView: UIView? // 导航分隔线
-    public var isHiddenStatus: Bool = false { // 更新状态栏
-        didSet {
-            setNeedsStatusBarAppearanceUpdate()
-        }
-    }
-
-    /// <#Description#>
-    public var isPresent: Bool {
-        var isPresent = true
-        let viewcontrollers = navigationController?.viewControllers
-        if (viewcontrollers?.count ?? 0) > 1 {
-            if viewcontrollers?[(viewcontrollers?.count ?? 1) - 1] == self {
-                isPresent = false
-            }
-        }
-        return isPresent
-    }
-
-    public lazy var manager: NetworkReachabilityManager? = {
-        let manager = NetworkReachabilityManager(host: "www.baidu.com")
-        manager?.startListening(onQueue: DispatchQueue.global(), onUpdatePerforming: { status in
-            if status == .reachable(.cellular) || status == .reachable(.ethernetOrWiFi) {}
-        })
-        return manager
-    }()
-
-    override open func viewDidLoad() {
-        super.viewDidLoad()
-        navigationController?.isNavigationBarHidden = true
-        view.backgroundColor = PQBFConfig.shared.styleBackGroundColor
-        navHeadImageView = UIImageView(image: UIImage())
-        navHeadImageView?.isUserInteractionEnabled = true
-        navHeadImageView?.backgroundColor = PQBFConfig.shared.styleBackGroundColor
-        navHeadImageView?.frame = CGRect(x: 0, y: 0, width: cScreenWidth, height: cDevice_iPhoneNavBarAndStatusBarHei)
-        view.addSubview(navHeadImageView!)
-
-        lineView = UIView(frame: CGRect(x: 0, y: (navHeadImageView?.frame.maxY ?? cDevice_iPhoneNavBarAndStatusBarHei) - 0.5, width: cScreenWidth, height: 0.5))
-        lineView?.backgroundColor = PQBFConfig.shared.styleBackGroundColor
-        view.addSubview(lineView!)
-//        UINavigationBar.appearance().setBackgroundImage(UIImage(), for: .default)
-        automaticallyAdjustsScrollViewInsets = false
-        navigationController?.interactivePopGestureRecognizer?.delegate = self
-        fd_prefersNavigationBarHidden = true
-    }
-
-    public func hiddenNavigation() {
-        navHeadImageView?.isHidden = true
-        lineView?.isHidden = true
-    }
-
-    public func showNavigation() {
-        if navHeadImageView != nil {
-            navHeadImageView?.isHidden = false
-            lineView?.isHidden = false
-            view.bringSubviewToFront(navHeadImageView!)
-        }
-    }
-
-    open func leftBackButton(image: UIImage? = nil) {
-        leftButton(image: image, imageName: "icon_detail_back")
-    }
-
-    public func leftButton(image: UIImage? = nil, imageName: String? = nil, tintColor: UIColor? = nil) {
-        let leftButton = UIButton(type: .custom)
-        leftButton.frame = CGRect(x: 0, y: cDevice_iPhoneStatusBarHei, width: cDefaultMargin * 4, height: cDefaultMargin * 4)
-        leftButton.imageEdgeInsets = UIEdgeInsets(top: 0, left: 0, bottom: -5, right: 0)
-        if tintColor != nil {
-            leftButton.tintColor = tintColor
-            leftButton.setImage((image ?? UIImage.moduleImage(named: imageName ?? "icon_detail_back", moduleName: "BFCommonKit"))?.withRenderingMode(.alwaysTemplate), for: .normal)
-        } else {
-            leftButton.setImage(image ?? UIImage.moduleImage(named: imageName ?? "icon_detail_back", moduleName: "BFCommonKit"), for: .normal)
-        }
-        leftButton.addTarget(self, action: #selector(backBtnClick), for: .touchUpInside)
-        navHeadImageView?.addSubview(leftButton)
-        backButton = leftButton
-    }
-
-    public func rightButtonItem(image: String?, title: String?) {
-        let rightButtonItem = UIButton(type: .custom)
-        var rightW: CGFloat = cDefaultMargin
-        if title != nil, title?.count ?? 0 > 0 {
-            rightW = rightW + sizeWithText(text: title ?? "", font: UIFont.systemFont(ofSize: 16), size: CGSize(width: CGFloat.greatestFiniteMagnitude, height: cDefaultMargin * 4)).width
-            rightButtonItem.setTitle(title, for: .normal)
-            rightButtonItem.setTitleColor(UIColor.hexColor(hexadecimal: "#242F44"), for: .normal)
-            rightButtonItem.titleLabel?.font = UIFont.systemFont(ofSize: 16)
-        }
-        if image != nil, image?.count ?? 0 > 0 {
-            rightW = rightW + cDefaultMargin * 4
-            rightButtonItem.setImage(UIImage(named: image ?? ""), for: .normal)
-            rightButtonItem.imageEdgeInsets = UIEdgeInsets(top: 0, left: 0, bottom: (title != nil && title?.count ?? 0 > 0) ? 0 : -5, right: 0)
-        }
-        rightButtonItem.adjustsImageWhenHighlighted = false
-        rightButtonItem.frame = CGRect(x: cScreenWidth - rightW, y: cDevice_iPhoneStatusBarHei, width: rightW, height: cDefaultMargin * 4)
-        rightButtonItem.addTarget(self, action: #selector(rightBtnClick(sender:)), for: .touchUpInside)
-        rightButtonItem.contentHorizontalAlignment = .center
-        navHeadImageView?.addSubview(rightButtonItem)
-        rightButton = rightButtonItem
-    }
-
-    public func setTitle(title: String?, color: UIColor = UIColor.white) {
-        naviTitle = title
-        if navTitleLabel == nil {
-            let titleLabel = UILabel(frame: CGRect(x: cDefaultMargin * 5, y: cDevice_iPhoneStatusBarHei, width: cScreenWidth - 100, height: cDefaultMargin * 4))
-            titleLabel.textColor = color
-            titleLabel.textAlignment = .center
-            navTitleLabel = titleLabel
-            navHeadImageView?.addSubview(titleLabel)
-        }
-        navTitleLabel?.text = title
-    }
-
-    @objc open func rightBtnClick(sender _: UIButton) {}
-
-    @objc open func backBtnClick() {
-        if isPresent {
-            dismiss(animated: true, completion: nil)
-        } else {
-            navigationController?.popViewController(animated: true)
-        }
-    }
-
-    override open func viewDidAppear(_ animated: Bool) {
-        super.viewDidAppear(animated)
-    }
-
-    override open func viewWillDisappear(_ animated: Bool) {
-        super.viewWillDisappear(animated)
-        PQLoadingHUB.shared.dismissHUB()
-    }
-
-    override open func viewDidDisappear(_ animated: Bool) {
-        super.viewDidDisappear(animated)
-
-        if view.viewWithTag(cGuideTag) != nil {
-            view.viewWithTag(cGuideTag)?.removeFromSuperview()
-        }
-    }
-
-    deinit {
-        PQNotification.removeObserver(self)
-        BFLog(message: "\(String(describing: type(of: self)))被销毁")
-    }
-
-    override open var preferredStatusBarStyle: UIStatusBarStyle {
-        if PQBFConfig.shared.statusBarStyle == .dark {
-            if #available(iOS 13.0, *) {
-                return .darkContent
-            } else {
-                return .default
-            }
-        } else {
-            return .lightContent
-        }
-    }
-
-    override open var prefersStatusBarHidden: Bool {
-        return isHiddenStatus
-    }
-
-    /// 禁止滑动返回
-    /// - Returns: <#description#>
-    public func disablePopGesture() -> PQBaseViewController {
-        let traget = navigationController?.interactivePopGestureRecognizer?.delegate
-        let pan = UIPanGestureRecognizer(target: traget, action: #selector(popGesture(panGes:)))
-        view.addGestureRecognizer(pan)
-        return self
-    }
-
-    /// 拦截侧滑手势
-    /// - Returns: <#description#>
-    @objc private func popGesture(panGes: UIPanGestureRecognizer) {
-        if panGes.state == .ended {
-            let translation = panGes.translation(in: view)
-            if popGestureHandle != nil, translationDric(translation: translation) == .moveDirectionRight, translation.x > 60 {
-                popGestureHandle!()
-            }
-        }
-    }
-
-    open func gestureRecognizer(_: UIGestureRecognizer, shouldReceive touch: UITouch) -> Bool {
-        if touch.view is UISlider {
-            return false
-        }
-        return true
-    }
-
-    /// 判断滑动方向
-    /// - Parameter translation: <#translation description#>
-    /// - Returns: <#description#>
-    func translationDric(translation: CGPoint) -> moveDirection {
-        let absX = abs(translation.x)
-        let absY = abs(translation.y)
-        // 设置滑动有效距离
-        if max(absX, absY) < 10 {
-            return .moveDirectionNormal
-        }
-        if absX > absY {
-            if translation.x < 0 {
-                return .moveDirectionLeft
-            } else {
-                return .moveDirectionRight
-            }
-
-        } else if absY > absX {
-            if translation.y < 0 {
-                return .moveDirectionUp
-            } else {
-                return .moveDirectionDown
-            }
-        }
-        return .moveDirectionNormal
-    }
-}

+ 0 - 282
BFCommonKit/Classes/BFBase/Controller/PQBaseWebViewController.swift

@@ -1,282 +0,0 @@
-
-//
-//  PQBaseWebViewController.swift
-//  PQSpeed
-//
-//  Created by SanW on 2020/5/27.
-//  Copyright © 2020 BytesFlow. All rights reserved.
-//
-
-import UIKit
-import WebKit
-
-open class PQBaseWebViewController: PQBaseViewController {
-    public var emptyData: PQEmptyModel? = {
-        let emptyData = PQEmptyModel()
-        emptyData.title = "网页加载失败,请重试~"
-        emptyData.emptyImage = "pic_network"
-        emptyData.netDisRefreshBgColor = UIColor.hexColor(hexadecimal: "#FA6400")
-        emptyData.netDisTitle = "内容加载失败"
-        emptyData.netDisTitleColor = UIColor.hexColor(hexadecimal: "#333333")
-        emptyData.netemptyDisImage = UIImage.init(named: "empty_netDis_icon")
-        emptyData.netDisRefreshTitle = NSMutableAttributedString(string: "重新加载", attributes: [.font: UIFont.systemFont(ofSize: 16, weight: .medium), .foregroundColor: UIColor.white])
-        return emptyData
-    }()
-
-    public lazy var emptyRemindView: PQEmptyRemindView = {
-        let emptyRemindView = PQEmptyRemindView(frame: CGRect(x: 0, y: cDevice_iPhoneNavBarAndStatusBarHei, width: cScreenWidth, height: cScreenHeigth - cDevice_iPhoneNavBarAndStatusBarHei))
-        emptyRemindView.isHidden = true
-        emptyRemindView.fullRefreshBloc = { [weak self] _, _ in
-            self?.refreshClick()
-        }
-        emptyRemindView.emptyData = emptyData
-        return emptyRemindView
-    }()
-
-    public lazy var webView: WKWebView = {
-        let config: WKWebViewConfiguration = WKWebViewConfiguration()
-        config.allowsInlineMediaPlayback = true
-        let webView: WKWebView = WKWebView(frame: CGRect(x: 0, y: cDevice_iPhoneNavBarAndStatusBarHei, width: cScreenWidth, height: cScreenHeigth - cDevice_iPhoneNavBarAndStatusBarHei), configuration: config)
-        webView.backgroundColor = UIColor.white
-        if #available(iOS 11.0, *) {
-            webView.scrollView.contentInsetAdjustmentBehavior = .never
-        } else {
-            automaticallyAdjustsScrollViewInsets = false
-        }
-        webView.navigationDelegate = self
-        return webView
-    }()
-
-    public lazy var progresslayer: CALayer = {
-        let progresslayer = CALayer()
-        progresslayer.frame = CGRect(x: 0, y: cDevice_iPhoneNavBarAndStatusBarHei, width: cScreenWidth * 0.1, height: 2)
-        progresslayer.backgroundColor = UIColor.hexColor(hexadecimal: "#FF9500").cgColor
-        return progresslayer
-    }()
-
-    @objc public var baseUrl: String? {
-        didSet {
-            if baseUrl != nil, baseUrl?.count ?? 0 > 0 {
-                webView.load(URLRequest(url: NSURL(string: baseUrl ?? "")! as URL, cachePolicy: .reloadIgnoringCacheData))
-                // 添加属性监听
-                webView.addObserver(self, forKeyPath: "estimatedProgress", options: .new, context: nil)
-                isAddObserve = true
-                view.layer.addSublayer(progresslayer)
-            }
-        }
-    }
-
-    @objc public var request: URLRequest? {
-        didSet {
-            if request != nil, request?.url != nil {
-                webView.load(request!)
-                // 添加属性监听
-                webView.addObserver(self, forKeyPath: "estimatedProgress", options: .new, context: nil)
-                isAddObserve = true
-                view.layer.addSublayer(progresslayer)
-            }
-        }
-    }
-
-    public var deleteBtn: UIButton = {
-        let deleteBtn = UIButton(type: .custom)
-        deleteBtn.frame = CGRect(x: 0, y: cDevice_iPhoneStatusBarHei, width: cDefaultMargin * 4, height: cDefaultMargin * 4)
-        deleteBtn.imageEdgeInsets = UIEdgeInsets(top: 0, left: 0, bottom: -5, right: 0)
-        deleteBtn.tintColor = UIColor.black
-        deleteBtn.setImage(UIImage(named: "upload_delete")?.withRenderingMode(.alwaysTemplate), for: .normal)
-        deleteBtn.addTarget(self, action: #selector(clickHandle), for: .touchUpInside)
-        deleteBtn.isHidden = true
-        return deleteBtn
-    }()
-
-    @objc public var baseTitle: String?
-    public var isShowDelete: Bool = false {
-        didSet {
-            deleteBtn.isHidden = !isShowDelete
-        }
-    }
-
-    public var evaluateJavaScript: String? // 交互
-    public var isAddObserve: Bool = false
-
-    override open func viewDidLoad() {
-        super.viewDidLoad()
-        // Do any additional setup after loading the view.
-        view.addSubview(webView)
-        view.addSubview(emptyRemindView)
-        leftButton(imageName: "icon_blanc_back")
-        backButton?.tintColor = UIColor.black
-//        backButton?.setImage(UIImage(named: "icon_blanc_back")?.withRenderingMode(.alwaysTemplate), for: .normal)
-        navHeadImageView?.backgroundColor = UIColor.white
-        navHeadImageView?.addSubview(deleteBtn)
-        deleteBtn.frame.origin.x = (backButton?.frame.maxX ?? 0)
-        // 拦截侧滑返回
-//        disablePopGesture().popGestureHandle = { [weak self] in
-//            self?.back()
-//        }
-    }
-
-    override public func viewWillAppear(_ animated: Bool) {
-        super.viewWillAppear(animated)
-        if (UIApplication.shared.keyWindow?.viewWithTag(cProtocalViewTag)) != nil {
-            (UIApplication.shared.keyWindow?.viewWithTag(cProtocalViewTag))?.isHidden = true
-        }
-    }
-
-    override public func viewWillDisappear(_ animated: Bool) {
-        super.viewWillDisappear(animated)
-        if (UIApplication.shared.keyWindow?.viewWithTag(cProtocalViewTag)) != nil {
-            (UIApplication.shared.keyWindow?.viewWithTag(cProtocalViewTag))?.isHidden = false
-        }
-    }
-
-    override open func backBtnClick() {
-        back()
-    }
-
-    deinit {
-        if isAddObserve {
-            webView.removeObserver(self, forKeyPath: "estimatedProgress")
-        }
-    }
-}
-
-extension PQBaseWebViewController: WKNavigationDelegate {
-    public func refreshClick() {
-        if baseUrl != nil, baseUrl?.count ?? 0 > 0 {
-            webView.load(URLRequest(url: NSURL(string: baseUrl ?? "")! as URL, cachePolicy: .useProtocolCachePolicy))
-        } else if request != nil, request?.url != nil {
-            webView.load(request!)
-        }
-    }
-
-    @objc public func clickHandle() {
-        if navigationController != nil {
-            navigationController?.popViewController(animated: true)
-        } else {
-            dismiss(animated: true, completion: nil)
-        }
-    }
-
-    @objc open func back() {
-        if webView.canGoBack {
-            webView.goBack()
-        } else if navigationController != nil {
-            navigationController?.popViewController(animated: true)
-        } else {
-            dismiss(animated: true, completion: nil)
-        }
-    }
-
-    override public func observeValue(forKeyPath keyPath: String?, of object: Any?, change: [NSKeyValueChangeKey: Any]?, context: UnsafeMutableRawPointer?) {
-        if keyPath == "estimatedProgress" {
-            progresslayer.opacity = 1
-            let float = (change?[NSKeyValueChangeKey.newKey] as! NSNumber).floatValue
-            progresslayer.frame = CGRect(x: 0, y: cDevice_iPhoneNavBarAndStatusBarHei, width: cScreenWidth * CGFloat(float), height: 3)
-            if float == 1 {
-                weak var weakself = self
-                DispatchQueue.main.asyncAfter(deadline: DispatchTime.now() + 0.2) {
-                    weakself?.progresslayer.opacity = 0
-                }
-                DispatchQueue.main.asyncAfter(deadline: DispatchTime.now() + 0.8) {
-                    weakself?.progresslayer.frame = CGRect(x: 0, y: cDevice_iPhoneNavBarAndStatusBarHei, width: 0, height: 3)
-                }
-            }
-        } else {
-            super.observeValue(forKeyPath: keyPath, of: object, change: change, context: context)
-        }
-    }
-
-    public func webView(_ webView: WKWebView, didFinish _: WKNavigation!) {
-        debugPrint("webView回调-didFinish")
-//        if baseTitle == nil || baseTitle?.count ?? 0 <= 0 {
-        webView.evaluateJavaScript("document.title") { [weak self] (any, _) -> Void in
-            self?.setTitle(title: any as? String, color: UIColor.black)
-            self?.baseTitle = any as? String
-        }
-//        }
-        if evaluateJavaScript != nil, (evaluateJavaScript?.count ?? 0) > 0 {
-            webView.evaluateJavaScript(evaluateJavaScript!) { _, _ in
-            }
-        }
-        if !emptyRemindView.isHidden {
-            emptyRemindView.isHidden = true
-        }
-    }
-
-    public func webView(_ webView: WKWebView, didFail _: WKNavigation!, withError error: Error) {
-        debugPrint("webView回调-didFailProvisionalNavigation -error:\(error)")
-//        if baseTitle == nil || baseTitle?.count ?? 0 <= 0 {
-        webView.evaluateJavaScript("document.title") { [weak self] (any, _) -> Void in
-            self?.setTitle(title: any as? String, color: UIColor.black)
-            self?.baseTitle = any as? String
-        }
-//        }
-        if emptyRemindView.isHidden {
-            emptyRemindView.isHidden = false
-        }
-    }
-
-    public func webView(_: WKWebView, didFailProvisionalNavigation _: WKNavigation!, withError error: Error) {
-        debugPrint("webView回调-didFailProvisionalNavigation -error:\(error)")
-//        if emptyRemindView.isHidden {
-//            emptyRemindView.isHidden = false
-//        }
-    }
-
-    public func webView(_: WKWebView, decidePolicyFor navigationResponse: WKNavigationResponse, decisionHandler: @escaping (WKNavigationResponsePolicy) -> Void) {
-        debugPrint("navigationResponse:\(String(describing: navigationResponse))")
-        webView.evaluateJavaScript("document.title") { [weak self] (any, _) -> Void in
-            self?.setTitle(title: any as? String, color: UIColor.black)
-            self?.baseTitle = any as? String
-        }
-        decisionHandler(.allow)
-    }
-
-    public func webView(_: WKWebView, didStartProvisionalNavigation navigation: WKNavigation!) {
-        debugPrint("didStartProvisionalNavigation:\(String(describing: navigation))")
-    }
-
-    public func webView(_: WKWebView, didReceiveServerRedirectForProvisionalNavigation navigation: WKNavigation!) {
-        debugPrint("didReceiveServerRedirectForProvisionalNavigation:\(String(describing: navigation))")
-    }
-
-    public func webView(_: WKWebView, didCommit navigation: WKNavigation!) {
-        debugPrint("\(String(describing: navigation))")
-    }
-
-    public func webView(_: WKWebView, decidePolicyFor navigationAction: WKNavigationAction, decisionHandler: @escaping (WKNavigationActionPolicy) -> Void) {
-        let urlString: String = navigationAction.request.url?.absoluteString ?? ""
-        let url: URL? = URL(string: urlString)
-//        if urlString.count == 0 || urlString == "about:blank" {
-//            decisionHandler(.cancel)
-//            return
-//        }
-        if urlString.hasPrefix("weixin://"), url != nil {
-            let canOpenUrl = UIApplication.shared.canOpenURL(url!)
-            if canOpenUrl {
-                UIApplication.shared.open(url!, options: [:], completionHandler: nil)
-                decisionHandler(.allow)
-            } else {
-                decisionHandler(.cancel)
-            }
-        } else {
-            decisionHandler(.allow)
-        }
-
-//        let vc = PQBaseWebViewController.init()
-//        vc.baseUrl = url
-//        navigationController?.pushViewController(vc, animated: true)
-//        PQLog(message: "decidePolicyFor \(String(describing: navigationAction))")
-//        decisionHandler(.allow)
-    }
-
-    override public var preferredStatusBarStyle: UIStatusBarStyle {
-        if #available(iOS 13.0, *) {
-            return .darkContent
-        } else {
-            // Fallback on earlier versions
-            return .default
-        }
-    }
-}

+ 0 - 46
BFCommonKit/Classes/BFBase/Controller/PQNavigatinController.swift

@@ -1,46 +0,0 @@
-//
-//  PQNavigatinController.swift
-//  PQSpeed
-//
-//  Created by SanW on 2020/5/25.
-//  Copyright © 2020 BytesFlow. All rights reserved.
-//
-
-import UIKit
-
-open class PQNavigatinController: UINavigationController, UIGestureRecognizerDelegate {
-    public var isPop: Bool = false
-
-   open  override func viewDidLoad() {
-        super.viewDidLoad()
-
-        // Do any additional setup after loading the view.
-    }
-
-   open override func pushViewController(_ viewController: UIViewController, animated _: Bool) {
-        if viewControllers.count > 0 {
-            viewController.hidesBottomBarWhenPushed = true
-        }
-        super.pushViewController(viewController, animated: true)
-    }
-
-   public func supportedInterfaceOrientations() -> UIInterfaceOrientationMask {
-        return topViewController!.supportedInterfaceOrientations
-    }
-
-   public func preferredInterfaceOrientationForPresentation() -> UIInterfaceOrientation {
-        return topViewController!.preferredInterfaceOrientationForPresentation
-    }
-
-   open override var childForStatusBarStyle: UIViewController? {
-        return topViewController
-    }
-
-   open override var childForStatusBarHidden: UIViewController? {
-        return topViewController
-    }
-
-   public func gestureRecognizerShouldBegin(_: UIGestureRecognizer) -> Bool {
-        return viewControllers.count > 1
-    }
-}

+ 0 - 122
BFCommonKit/Classes/BFBase/View/PQFollowButton.swift

@@ -1,122 +0,0 @@
-//
-//  PQFollowButton.swift
-//  PQSpeed
-//
-//  Created by lieyunye on 2020/6/18.
-//  Copyright © 2020 BytesFlow. All rights reserved.
-//
-
-import Foundation
-import SnapKit
-
-public class PQFollowButton: UIButton {
-    public  let bgLayer = CAShapeLayer()
-
-    public  var attenBtn: UIButton = {
-        let attenBtn = UIButton(type: .custom)
-        attenBtn.isUserInteractionEnabled = false
-        attenBtn.setTitle("", for: .selected)
-        attenBtn.setImage(UIImage.moduleImage(named: "icon_oder", moduleName: "BFCommonKit"), for: .selected)
-        attenBtn.setTitle("+", for: .normal)
-        attenBtn.setImage(nil, for: .normal)
-        attenBtn.setTitleColor(UIColor.white, for: .normal)
-        attenBtn.titleLabel?.font = UIFont.systemFont(ofSize: 20, weight: .bold)
-        attenBtn.layer.cornerRadius = 10
-//        attenBtn.layer.masksToBounds = true
-        attenBtn.backgroundColor = UIColor.hexColor(hexadecimal: "#EE0051")
-        attenBtn.tag = 2
-        attenBtn.titleEdgeInsets = UIEdgeInsets(top: -3, left: 0, bottom: 0, right: 0)
-        return attenBtn
-    }()
-
-    override public  init(frame: CGRect) {
-        super.init(frame: frame)
-        addSubview(attenBtn)
-    }
-
-    required public  init?(coder _: NSCoder) {
-        fatalError("init(coder:) has not been implemented")
-    }
-
-    override public func layoutSubviews() {
-        super.layoutSubviews()
-        attenBtn.snp.makeConstraints { make in
-            make.edges.equalTo(self).inset(UIEdgeInsets(top: 0, left: 0, bottom: 0, right: 0))
-        }
-    }
-
-    public  func reset() {
-        attenBtn.isHidden = false
-        attenBtn.layer.removeAllAnimations()
-        bgLayer.removeAllAnimations()
-        bgLayer.sublayers?.forEach {
-            $0.removeAllAnimations()
-            $0.removeFromSuperlayer()
-        }
-        bgLayer.removeFromSuperlayer()
-    }
-
-    public  func start() {
-        let bounds = self.bounds
-
-        bgLayer.frame = bounds
-        bgLayer.cornerRadius = bounds.height / 2.0
-        bgLayer.masksToBounds = true
-        layer.addSublayer(bgLayer)
-
-        let bgScale = CABasicAnimation(keyPath: "transform.scale")
-        bgScale.fromValue = 1
-        bgScale.toValue = 1.2
-        bgScale.duration = 0.2
-        attenBtn.layer.add(bgScale, forKey: nil)
-
-        DispatchQueue.main.asyncAfter(deadline: DispatchTime.now() + 0.2) {
-            self.attenBtn.isHidden = true
-            let opacity = CAKeyframeAnimation(keyPath: "backgroundColor")
-            opacity.values = [UIColor.red.cgColor, UIColor.white.cgColor]
-            opacity.duration = 0.5
-            opacity.fillMode = .forwards
-            opacity.isRemovedOnCompletion = false
-            self.bgLayer.add(opacity, forKey: nil)
-
-            let bgLayer1 = CAShapeLayer()
-            let frame = CGRect(x: (bounds.size.width - bounds.size.height) / 2.0, y: 0, width: bounds.size.height, height: bounds.size.height)
-            bgLayer1.frame = frame
-            self.bgLayer.addSublayer(bgLayer1)
-
-            let linePath = UIBezierPath()
-
-            let radius: CGFloat = frame.size.width / 2.0
-            linePath.move(to: CGPoint(x: radius * 0.45, y: radius * 1.0))
-            linePath.addLine(to: CGPoint(x: radius * 0.84, y: radius * 1.32))
-            linePath.addLine(to: CGPoint(x: radius * 1.48, y: radius * 0.68))
-
-            let layer = CAShapeLayer()
-
-            layer.path = linePath.cgPath
-            layer.fillColor = UIColor.clear.cgColor
-            layer.strokeColor = UIColor.hexColor(hexadecimal: "#EE0051").cgColor
-            layer.lineWidth = 2.5
-            bgLayer1.addSublayer(layer)
-
-            let animation = CABasicAnimation()
-            animation.duration = 0.5
-            animation.keyPath = "strokeEnd"
-            animation.fromValue = 0
-            animation.toValue = 1
-            animation.fillMode = .forwards
-            animation.isRemovedOnCompletion = false
-
-            layer.add(animation, forKey: "strokeEnd")
-
-            let scale = CABasicAnimation(keyPath: "transform.scale")
-            scale.fromValue = 1
-            scale.toValue = 0
-            scale.duration = 0.2
-            scale.beginTime = CACurrentMediaTime() + 1.5
-            scale.fillMode = .forwards
-            scale.isRemovedOnCompletion = false
-            self.bgLayer.add(scale, forKey: nil)
-        }
-    }
-}

+ 0 - 43
BFCommonKit/Classes/BFBase/View/PQGIFImageView.swift

@@ -1,43 +0,0 @@
-//
-//  PQGIFImageView.swift
-//  PQSpeed
-//
-//  Created by SanW on 2020/9/2.
-//  Copyright © 2020 BytesFlow. All rights reserved.
-//
-
-import UIKit
-
-public class PQGIFImageView: UIImageView {
-   public var imagesDara: [String]? {
-        didSet {
-            generateImages()
-            displayGIF(1, Int.max)
-        }
-    }
-
-    public var images: [UIImage] = Array<UIImage>.init()
-    public func generateImages() {
-        if imagesDara != nil, (imagesDara?.count ?? 0) > 0 {
-            for item in imagesDara! {
-                let image = UIImage(named: item)
-                if image != nil {
-                    images.append(image!)
-                }
-            }
-        }
-    }
-
-    public func displayGIF(_ duration: TimeInterval, _ repeatCount: Int) {
-        if !isAnimating {
-            layer.removeAllAnimations()
-            if images.count <= 0 {
-                return
-            }
-            animationImages = images
-            animationDuration = duration
-            animationRepeatCount = repeatCount
-            startAnimating()
-        }
-    }
-}

+ 0 - 53
BFCommonKit/Classes/BFBase/View/PQHeartAnimation.swift

@@ -1,53 +0,0 @@
-//
-//  PQHeartAnimation.swift
-//  PQSpeed
-//
-//  Created by SanW on 2020/6/11.
-//  Copyright © 2020 BytesFlow. All rights reserved.
-//
-
-import UIKit
-
-public class PQHeartAnimation: NSObject {
-    static let angleArr: [CGFloat] = [CGFloat.pi / 4.0, -CGFloat.pi / 4.0]
-    var isRepeat: Bool = false
-
-    static public func showAnimation(isRepeat: Bool = false, point: CGPoint, size: CGFloat = 80.0, baseView: UIView,imageName:String? = nil, completeHander: @escaping (_ isFinised: Bool) -> Void) {
-        if isRepeat, baseView.viewWithTag(cHeartTag) != nil {
-            return
-        }
-        let imgV = UIImageView(frame: CGRect(x: point.x - size / 2.0, y: point.y - size / 2.0, width: size, height: size))
-        imgV.tag = cHeartTag
-        imgV.image = (imageName != nil && (imageName?.count ?? 0) > 0) ? UIImage.init(named: imageName!) :  UIImage.moduleImage(named: "ic_heart", moduleName: "BFCommonKit")
-        imgV.contentMode = .scaleAspectFill
-        baseView.addSubview(imgV)
-
-        // 偏移角度
-//        var num = 2
-//        if !isRepeat {
-//            num = Int(arc4random_uniform(2))
-//        }
-//        debugPrint("num = \(num)")
-//        imgV.transform = CGAffineTransform(rotationAngle: angleArr[num])
-        // 放大动画
-        let animation = CAKeyframeAnimation(keyPath: "transform.scale")
-        animation.duration = 0.5
-        animation.calculationMode = CAAnimationCalculationMode.cubic
-        animation.values = [1.3, 0.8, 1.0]
-        imgV.layer.add(animation, forKey: "transform.scale")
-
-        UIView.animate(withDuration: 1, delay: 0, options: .allowUserInteraction, animations: {
-            imgV.alpha = 0.0
-            var newFrame = imgV.frame
-            newFrame.origin.x -= (isRepeat ? -cDefaultMargin * 2 : cDefaultMargin)
-            newFrame.origin.y -= 45.0
-            newFrame.size.height += 10.0
-            newFrame.size.width += 10.0
-            imgV.frame = newFrame
-        }) { isOK in
-            imgV.layer.removeAllAnimations()
-            imgV.removeFromSuperview()
-            completeHander(isOK)
-        }
-    }
-}

+ 0 - 157
BFCommonKit/Classes/BFBase/View/PQLoadingHUB.swift

@@ -1,157 +0,0 @@
-//
-//  PQLoadingHUB.swift
-//  PQSpeed
-//
-//  Created by SanW on 2020/6/5.
-//  Copyright © 2020 BytesFlow. All rights reserved.
-//
-
-import UIKit
-
-public class PQLoadingHUBView: UIView {
-    // gif每一帧图
-    public var gifImages: [UIImage]?
-    // gif播放时长
-    public var duration: Double?
-    // 主题色
-    public var lodingColor: UIColor? {
-        didSet{
-            if lodingColor != nil {
-                loadingImage.tintColor = lodingColor ??  UIColor.hexColor(hexadecimal: PQBFConfig.shared.styleColor.rawValue)
-                let data = try? Data(contentsOf: URL(fileURLWithPath: Bundle.current(moduleName: "BFCommonKit")?.path(forResource: "stuckPoint_music_loading", ofType: ".gif") ?? ""))
-                if data != nil {
-                    PQPHAssetVideoParaseUtil.parasGIFImage(data: data!, isRenderingColor: lodingColor ?? UIColor.hexColor(hexadecimal: PQBFConfig.shared.styleColor.rawValue)) { [weak self] _, images, duration in
-                        self?.gifImages = images
-                        self?.duration = duration
-                    }
-                }
-            }
-        }
-    }
-    
-    public lazy var loadingImage: UIImageView = {
-        let loadingImage = UIImageView()
-        loadingImage.tintColor = lodingColor ??  UIColor.hexColor(hexadecimal: PQBFConfig.shared.styleColor.rawValue)
-        return loadingImage
-    }()
-
-    override public init(frame: CGRect) {
-        super.init(frame: frame)
-        addSubview(loadingImage)
-        isUserInteractionEnabled = false
-        let data = try? Data(contentsOf: URL(fileURLWithPath: Bundle.current(moduleName: "BFCommonKit")?.path(forResource: "stuckPoint_music_loading", ofType: ".gif") ?? ""))
-        if data != nil {
-            PQPHAssetVideoParaseUtil.parasGIFImage(data: data!, isRenderingColor: lodingColor ?? UIColor.hexColor(hexadecimal: PQBFConfig.shared.styleColor.rawValue)) { [weak self] _, images, duration in
-                self?.gifImages = images
-                self?.duration = duration
-            }
-        }
-    }
-
-    required init?(coder _: NSCoder) {
-        fatalError("init(coder:) has not been implemented")
-    }
-
-    override public func layoutSubviews() {
-        super.layoutSubviews()
-        // 334 * 307
-        let imageW: CGFloat = 67
-        let imageH: CGFloat = 67
-        loadingImage.frame = CGRect(x: (frame.width - imageW) / 2, y: (frame.height - imageW) / 2, width: imageW, height: imageH)
-    }
-
-    /// 开始加载
-    public func loading() {
-        loadingImage.displayGIF(data: nil, images: gifImages, repeatCount: .max, duration: duration ?? 2)
-    }
-
-    /// 停止加载
-    public func endLoading() {
-        loadingImage.removePlayGIF()
-    }
-
-    override public func removeFromSuperview() {
-        loadingImage.removePlayGIF()
-        loadingImage.removeFromSuperview()
-    }
-}
-
-public class PQLoadingHUB: NSObject {
-    public static let shared = PQLoadingHUB()
-    public let viewTag = 11111
-    public var isLoading: Bool = false
-
-    public func showHUB(isMode:Bool = false,lodingColor:UIColor? = nil) {
-        DispatchQueue.main.async { [weak self] in
-            let window = UIApplication.shared.keyWindow
-            if (window?.viewWithTag(self!.viewTag)) == nil {
-                let loadingHUB: PQLoadingHUBView = PQLoadingHUBView(frame: CGRect(x: 0, y: 0, width: 100, height: 100))
-                loadingHUB.lodingColor = lodingColor
-                if(isMode){
-                    let backView = UIImageView.init(frame: window?.frame ?? .zero)
-                    backView.backgroundColor = .clear
-                    backView.isUserInteractionEnabled = true
-                    backView.addSubview(loadingHUB)
-                    backView.tag = self!.viewTag
-                    window?.addSubview(backView)
-                }else{
-                    loadingHUB.tag = self!.viewTag
-                    window?.addSubview(loadingHUB)
-                }
-             
-                loadingHUB.center = window?.center as! CGPoint
-                loadingHUB.loading()
-                self?.isLoading = true
-            }
-        }
-    }
-
-    public func dismissHUB() {
-        DispatchQueue.main.async { [weak self] in
-            let window = UIApplication.shared.keyWindow
-            if (window?.viewWithTag(self!.viewTag)) != nil {
-                window?.viewWithTag(self!.viewTag)?.removeFromSuperview()
-                self?.isLoading = false
-            }
-        }
-    }
-
-    public func showHUB(superView: UIView, isVerticality: Bool = false,lodingColor:UIColor? = nil) {
-        DispatchQueue.main.async { [weak self] in
-            if superView.viewWithTag(self!.viewTag) == nil {
-                let hubW: CGFloat = 100
-                let supW: CGFloat = superView.frame.width
-                let supH: CGFloat = superView.frame.height
-                let hubY: CGFloat = isVerticality ? ((supW - hubW) / 2) : ((supH - hubW) / 2)
-                let hubX: CGFloat = isVerticality ? ((supH - hubW) / 2) : ((supW - hubW) / 2)
-                let loadingHUB: PQLoadingHUBView = PQLoadingHUBView(frame: CGRect(x: hubX, y: hubY, width: 100, height: 100))
-                loadingHUB.lodingColor = lodingColor
-                loadingHUB.tag = self!.viewTag
-                superView.addSubview(loadingHUB)
-                loadingHUB.loading()
-                self?.isLoading = true
-            }
-        }
-    }
-
-    public func dismissHUB(superView: UIView) {
-        DispatchQueue.main.async { [weak self] in
-            if superView.viewWithTag(self!.viewTag) != nil {
-                superView.viewWithTag(self!.viewTag)?.removeFromSuperview()
-                self?.isLoading = false
-            }
-        }
-    }
-
-    override private init() {
-        super.init()
-    }
-
-    override public func copy() -> Any {
-        return self
-    }
-
-    override public func mutableCopy() -> Any {
-        return self
-    }
-}

+ 0 - 557
BFCommonKit/Classes/BFBase/View/PQRemindView.swift

@@ -1,557 +0,0 @@
-
-// MARK: - 设置页退出登录跟注销账号提示视图
-
-/// 设置页退出登录跟注销账号提示视图
-open class PQRemindView: UIView {
-    public var isBanned: Bool = false // 是否是拉黑用户提示
-    public var isBlank: Bool = false { // 是否是黑色弹窗
-        didSet {
-            if isBlank {
-                contentView.backgroundColor = UIColor.hexColor(hexadecimal: "#212223")
-                titleLab.textColor = UIColor.white
-                contentLab.textColor = UIColor.white
-                cancelBtn.setTitleColor(UIColor.white, for: .normal)
-                confirmBtn.setTitleColor(UIColor.white, for: .normal)
-            } else {
-                contentView.backgroundColor = UIColor.white
-                contentLab.textColor = UIColor.hexColor(hexadecimal: "#666666")
-                titleLab.textColor = UIColor.black
-                cancelBtn.setTitleColor(UIColor.black, for: .normal)
-                confirmBtn.setTitleColor(UIColor.black, for: .normal)
-            }
-        }
-    }
-
-    public var remindBlock: ((_ sender: UIButton, _ remindData: PQBaseModel?) -> Void)?
-
-    lazy public var contentView: UIView = {
-        let contentView = UIView()
-        contentView.backgroundColor = UIColor.white
-        contentView.addCorner(corner: 4)
-        return contentView
-    }()
-
-    lazy public var titleLab: UILabel = {
-        let titleLab = UILabel()
-        titleLab.font = UIFont.systemFont(ofSize: 18, weight: .medium)
-        titleLab.textAlignment = .center
-        titleLab.numberOfLines = 0
-        titleLab.textColor = UIColor.black
-        return titleLab
-    }()
-
-    lazy public var contentLab: UILabel = {
-        //        let contentLab = TYAttributedLabel.init()
-        //        contentLab.textAlignment = CTTextAlignment.center
-        //        contentLab.verticalAlignment = .center
-        //        contentLab.highlightedLinkBackgroundColor = UIColor.white
-        //        contentLab.numberOfLines = 0
-        //        contentLab.font = UIFont.systemFont(ofSize: 14)
-        //        contentLab.textColor = UIColor.hexColor(hexadecimal: "#666666")
-        let contentLab = UILabel()
-        contentLab.font = UIFont.systemFont(ofSize: 16)
-        contentLab.textAlignment = .center
-        contentLab.numberOfLines = 0
-        contentLab.textColor = UIColor.hexColor(hexadecimal: "#666666")
-        return contentLab
-    }()
-
-    lazy public var cancelBtn: UIButton = {
-        let cancelBtn = UIButton(type: .custom)
-        cancelBtn.setTitle("取消", for: .normal)
-        cancelBtn.setTitleColor(UIColor.black, for: .normal)
-        cancelBtn.tag = 1
-        cancelBtn.addTarget(self, action: #selector(btnClck(sender:)), for: .touchUpInside)
-        cancelBtn.titleLabel?.font = UIFont.systemFont(ofSize: 16, weight: .medium)
-        return cancelBtn
-    }()
-
-    lazy public var confirmBtn: UIButton = {
-        let confirmBtn = UIButton(type: .custom)
-        confirmBtn.setTitle("确定", for: .normal)
-        confirmBtn.setTitleColor(UIColor.black, for: .normal)
-        confirmBtn.tag = 2
-        confirmBtn.addTarget(self, action: #selector(btnClck(sender:)), for: .touchUpInside)
-        confirmBtn.titleLabel?.font = UIFont.systemFont(ofSize: 16, weight: .medium)
-        return confirmBtn
-    }()
-
-    lazy public var verticalLine: UIView = {
-        let verticalLine = UIView()
-        verticalLine.backgroundColor = UIColor.hexColor(hexadecimal: "#E5E5E5")
-        return verticalLine
-    }()
-
-    lazy public var horizonLine: UIView = {
-        let horizonLine = UIView()
-        horizonLine.backgroundColor = UIColor.hexColor(hexadecimal: "#E5E5E5")
-        return horizonLine
-    }()
-
-    override public init(frame: CGRect) {
-        super.init(frame: frame)
-        addSubview(contentView)
-        contentView.addSubview(titleLab)
-        contentView.addSubview(contentLab)
-        contentView.addSubview(cancelBtn)
-        contentView.addSubview(confirmBtn)
-        contentView.addSubview(verticalLine)
-        contentView.addSubview(horizonLine)
-        backgroundColor = cShadowColor
-    }
-
-    required public init?(coder _: NSCoder) {
-        fatalError("init(coder:) has not been implemented")
-    }
-
-    public var  remindData: PQBaseModel? {
-        didSet {
-            addData()
-            addLayout()
-        }
-    }
-
-    open func addData() {
-        titleLab.text = remindData?.title
-        contentLab.text = remindData?.summary
-        cancelBtn.setTitleColor(isBanned ? (isBlank ? UIColor.white : UIColor.black) : (isBlank ? UIColor.white : UIColor.hexColor(hexadecimal: "#666666")), for: .normal)
-        if isBanned {
-            titleLab.textAlignment = .center
-        } else {
-            titleLab.textAlignment = .left
-        }
-    }
-
-   open func addLayout() {
-        var summH: CGFloat = 0
-        var titleH: CGFloat = 0
-        if (remindData?.summary?.count ?? 0) > 0 {
-            summH = sizeWithText(text: remindData?.summary ?? "", font: UIFont.systemFont(ofSize: 16, weight: .medium), size: CGSize(width: cScreenWidth - cDefaultMargin * 12, height: CGFloat.greatestFiniteMagnitude)).height + cDefaultMargin
-        }
-        if (remindData?.title?.count ?? 0) > 0 {
-            titleH = sizeWithText(text: remindData?.title ?? "", font: UIFont.systemFont(ofSize: 18, weight: .medium), size: CGSize(width: cScreenWidth - cDefaultMargin * 12, height: CGFloat.greatestFiniteMagnitude)).height + cDefaultMargin
-            if titleH < cDefaultMargin * 2 {
-                titleH = cDefaultMargin * 2
-            }
-        }
-        let contentH: CGFloat = cDefaultMargin * 2 + (titleH > 0 ? titleH + cDefaultMargin : 0) + (summH > 0 ? summH + cDefaultMargin : 0) + cDefaultMargin * 3 + (isBanned ? cDefaultMargin * 2 : 0)
-        contentView.snp.makeConstraints { make in
-            make.left.equalTo(self).offset(cDefaultMargin * 4)
-            make.right.equalTo(self).offset(-cDefaultMargin * 4)
-            make.height.equalTo(contentH)
-            make.center.equalTo(self)
-        }
-        titleLab.snp.makeConstraints { make in
-            make.left.equalTo(contentView).offset(cDefaultMargin * 2)
-            make.right.equalTo(contentView).offset(-cDefaultMargin * 2)
-            make.height.equalTo(titleH)
-            make.top.equalTo(contentView).offset(cDefaultMargin * 2)
-        }
-        contentLab.snp.makeConstraints { make in
-            make.top.equalTo(titleLab.snp.bottom).offset(summH > 0 ? cDefaultMargin : 0)
-            make.left.right.equalTo(titleLab)
-            make.height.equalTo(summH)
-        }
-        if isBanned {
-            let btnW: CGFloat = (cScreenWidth - 1 - cDefaultMargin * 8) / 2
-            verticalLine.snp.makeConstraints { make in
-                make.top.equalTo(contentLab.snp.bottom).offset(cDefaultMargin)
-                make.height.equalTo(1)
-                make.left.width.equalToSuperview()
-            }
-            cancelBtn.snp.makeConstraints { make in
-                make.left.equalToSuperview()
-                make.top.equalTo(verticalLine.snp.bottom)
-                make.width.equalTo(btnW)
-                make.bottom.equalTo(contentView)
-            }
-            horizonLine.snp.makeConstraints { make in
-                make.left.equalTo(cancelBtn.snp.right)
-                make.height.top.equalTo(cancelBtn)
-                make.width.equalTo(1)
-            }
-            confirmBtn.snp.makeConstraints { make in
-                make.right.equalToSuperview()
-                make.height.width.bottom.equalTo(cancelBtn)
-            }
-        } else {
-            confirmBtn.snp.makeConstraints { make in
-                make.right.equalTo(titleLab)
-                make.height.equalTo(cDefaultMargin * 4)
-                make.width.equalTo(cDefaultMargin * 6)
-                make.bottom.equalTo(contentView).offset(-cDefaultMargin)
-            }
-            cancelBtn.snp.makeConstraints { make in
-                make.right.equalTo(confirmBtn.snp.left).offset(-cDefaultMargin)
-                make.height.equalTo(cDefaultMargin * 4)
-                make.width.equalTo(cDefaultMargin * 6)
-                make.bottom.equalTo(confirmBtn)
-            }
-        }
-    }
-
-    @objc open func btnClck(sender: UIButton) {
-        removeFromSuperview()
-        if remindBlock != nil {
-            remindBlock!(sender, remindData!)
-        }
-    }
-}
-
-// MARK: 空白提示页
-
-/// 空白提示页
-open class PQEmptyRemindView: UIView {
-    // 是否没网提示
-    public var isNetLost:Bool = false {
-        didSet {
-            
-            addData()
-            addLayout()
-        }
-    }
-    // 回调
-    public var fullRefreshBloc: ((_ isNetConnected: Bool, _ emptyData: PQEmptyModel?) -> Void)?
-
-    lazy public var imageView: UIImageView = {
-        let imageView = UIImageView()
-        imageView.backgroundColor = UIColor.clear
-        imageView.contentMode = .scaleAspectFit
-        return imageView
-    }()
-
-    lazy public var remindLab: UILabel = {
-        let remindLab = UILabel()
-        remindLab.font = UIFont.systemFont(ofSize: 16)
-        remindLab.numberOfLines = 1
-        remindLab.textAlignment = NSTextAlignment.center
-        remindLab.textColor = UIColor.white
-        return remindLab
-    }()
-
-//    lazy public var shimmeringView: FBShimmeringView = {
-//        let shimmeringView = FBShimmeringView()
-//        shimmeringView.isShimmering = false
-//        shimmeringView.shimmeringBeginFadeDuration = 0.3
-//        shimmeringView.shimmeringEndFadeDuration = 0.1
-//        shimmeringView.shimmeringOpacity = 0.2
-//        shimmeringView.shimmeringSpeed = 300
-//        shimmeringView.contentView = remindLab
-//        return shimmeringView
-//    }()
-
-    lazy public var remindSubLab: UILabel = {
-        let remindSubLab = UILabel()
-        remindSubLab.font = UIFont.systemFont(ofSize: 14)
-        remindSubLab.numberOfLines = 1
-        remindSubLab.textAlignment = NSTextAlignment.center
-        remindSubLab.textColor = UIColor.hexColor(hexadecimal: "#999999")
-        return remindSubLab
-    }()
-
-    lazy public var refreshBtn: UIButton = {
-        let refreshBtn = UIButton(type: .custom)
-        refreshBtn.backgroundColor = UIColor.hexColor(hexadecimal: "#EE0051")
-        refreshBtn.titleLabel?.font = UIFont.systemFont(ofSize: 15)
-        refreshBtn.setTitleColor(UIColor.white, for: .normal)
-        refreshBtn.setTitle("刷新", for: .normal)
-        refreshBtn.setTitle("重新连接网络", for: .selected)
-        refreshBtn.addCorner(corner: cDefaultMargin * 2)
-        refreshBtn.isHidden = true
-        refreshBtn.addTarget(self, action: #selector(fullRefresh), for: .touchUpInside)
-        return refreshBtn
-    }()
-
-    override public init(frame: CGRect) {
-        super.init(frame: frame)
-        addSubview(imageView)
-//        addSubview(shimmeringView)
-        addSubview(remindLab)
-        addSubview(remindSubLab)
-        addSubview(refreshBtn)
-        let ges = UITapGestureRecognizer(target: self, action: #selector(fullRefresh))
-        addGestureRecognizer(ges)
-        backgroundColor = PQBFConfig.shared.styleBackGroundColor
-    }
-
-    required public init?(coder _: NSCoder) {
-        fatalError("init(coder:) has not been implemented")
-    }
-
-    @objc public var emptyData: PQEmptyModel? {
-        didSet {
-            addData()
-            addLayout()
-        }
-    }
-}
-
-extension PQEmptyRemindView {
-    public func addData() {
-        backgroundColor = emptyData?.bgColor ?? PQBFConfig.shared.styleBackGroundColor
-        if emptyData?.titleColor != nil {
-            remindLab.textColor = (emptyData?.titleColor)!
-        }
-        if emptyData?.summaryColor != nil {
-            remindSubLab.textColor = (emptyData?.summaryColor)!
-        }
-        if isNetLost {
-            remindSubLab.isHidden = true
-            refreshBtn.isHidden = false
-            remindLab.text = emptyData?.netDisTitle ?? "网络连接失败,请检查网络后重试"
-            if emptyData?.netDisRefreshBgColor != nil {
-                refreshBtn.backgroundColor = emptyData?.netDisRefreshBgColor
-            } else {
-                refreshBtn.backgroundColor = UIColor.hexColor(hexadecimal: "#EE0051")
-            }
-            if emptyData?.netDisTitleColor != nil {
-                refreshBtn.setTitleColor(emptyData?.netDisTitleColor, for: .normal)
-            }else{
-                refreshBtn.setTitleColor(UIColor.white, for: .normal)
-            }
-            if emptyData?.netDisRefreshTitle != nil {
-                refreshBtn.setAttributedTitle(emptyData?.netDisRefreshTitle, for: .normal)
-            }else {
-                refreshBtn.setTitle("刷新", for: .normal)
-            }
-            imageView.image = emptyData?.netemptyDisImage ?? UIImage.moduleImage(named: "pic_network", moduleName: "BFCommonKit")
-        } else {
-//            if emptyData?.emptyImage != nil, emptyData?.emptyImage?.count ?? 0 > 0 {
-//                imageView.image = UIImage.moduleImage(named: emptyData?.emptyImage ?? "", moduleName: "BFCommonKit")
-//            } else {
-//                imageView.image = nil
-//            }
-            remindSubLab.isHidden = !(emptyData?.title != nil && emptyData?.title?.count ?? 0 > 0)
-            remindSubLab.isHidden = !(emptyData?.summary != nil && emptyData?.summary?.count ?? 0 > 0)
-            imageView.image = emptyData?.emptySoureImage ?? UIImage.moduleImage(named: emptyData?.emptyImage ?? "", moduleName: "BFCommonKit")
-            remindLab.text = emptyData?.title
-            remindSubLab.text = emptyData?.summary
-            refreshBtn.isHidden = emptyData?.isRefreshHidden ?? true
-            if emptyData?.refreshImage != nil, (emptyData?.refreshImage?.count ?? 0) > 0 {
-                refreshBtn.setImage(UIImage.moduleImage(named: emptyData?.refreshImage ?? "", moduleName: "BFCommonKit"), for: .normal)
-            } else {
-                refreshBtn.setImage(nil, for: .normal)
-            }
-            refreshBtn.setAttributedTitle(emptyData?.refreshTitle, for: .normal)
-            if emptyData?.refreshBgColor != nil {
-                refreshBtn.backgroundColor = emptyData?.refreshBgColor
-            }
-        }
-    }
-
-    override public var isHidden: Bool {
-        didSet {
-//            addData()
-//            addLayout()
-        }
-    }
-
-    public func addLayout() {
-        let margin: CGFloat = 10
-        var imageH: CGFloat = margin * 7
-        var contentH: CGFloat = 0
-        let normalH : CGFloat = margin * 2
-        
-        if (emptyData?.emptySoureImage != nil) || (emptyData?.emptyImage != nil &&  emptyData?.emptyImage?.count ?? 0 > 0) || isNetLost {
-            contentH = contentH + imageH
-        } else {
-            imageH = 0
-        }
-        if !remindLab.isHidden {
-            contentH = contentH + normalH + margin
-        }
-        if !remindSubLab.isHidden {
-            contentH = contentH + normalH + margin
-        }
-        if !refreshBtn.isHidden {
-            contentH = contentH + normalH + margin * 4
-        }
-        let topY = (frame.height - contentH) / 2 - normalH
-        imageView.snp.remakeConstraints { make in
-            make.top.equalTo(topY)
-            make.centerX.equalTo(self)
-            make.height.equalTo(imageH)
-        }
-//        shimmeringView.snp.makeConstraints { make in
-//            make.left.right.equalTo(self)
-//            make.top.equalTo(imageView.snp.bottom).offset(cDefaultMargin)
-//        }
-        remindLab.snp.remakeConstraints { make in
-            make.left.right.equalToSuperview()
-            make.height.equalTo(remindLab.isHidden ? 0 : normalH)
-            make.top.equalTo(imageView.snp.bottom).offset(remindLab.isHidden ? 0 : margin)
-        }
-        remindSubLab.snp.remakeConstraints { make in
-            make.left.right.equalToSuperview()
-            make.height.equalTo(remindSubLab.isHidden ? 0 : normalH)
-            make.top.equalTo(remindLab.snp.bottom).offset(remindSubLab.isHidden ? 0 : cDefaultMargin)
-        }
-        refreshBtn.snp.remakeConstraints { make in
-            make.width.equalTo(margin * 16)
-            make.height.equalTo(margin * 4)
-            make.top.equalTo(remindSubLab.snp.bottom).offset(normalH)
-            make.centerX.equalToSuperview()
-        }
-    }
-
-    @objc func fullRefresh() {
-//        let isConnected: Bool = isNetConnected()
-//        if isNetLost {
-//            cShowHUB(superView: nil, msg: "网络不给力")
-//        }
-        if fullRefreshBloc != nil {
-            fullRefreshBloc!(isNetLost, emptyData)
-        }
-    }
-
-    func addShimmeringView() {}
-
-    func removeShimmeringView() {}
-}
-
-// MARK: - 上传提示框
-
-/// 上传提示框
-public class PQUploadRemindView: PQRemindView {
-    public var canMoreOpration: Bool = false // 是否还有更多操作
-    public var confirmTitle: String = "我知道了"
-    public var cancelTitle: String = "取消"
-    public var cacelColor: UIColor = UIColor.hexColor(hexadecimal: "#666666")
-    public var attributedTitle: NSAttributedString?
-
-    override public func addData() {
-        titleLab.textAlignment = .center
-        if attributedTitle != nil {
-            titleLab.attributedText = attributedTitle
-        } else {
-            titleLab.text = remindData?.title
-        }
-        if remindData?.attributedTitle != nil {
-            contentLab.attributedText = remindData?.attributedTitle
-        } else {
-            contentLab.text = remindData?.summary
-        }
-        cancelBtn.setTitleColor(cacelColor, for: .normal)
-        confirmBtn.setTitleColor(UIColor.hexColor(hexadecimal: "#EE0051"), for: .normal)
-        confirmBtn.setTitle(confirmTitle, for: .normal)
-        cancelBtn.setTitle(cancelTitle, for: .normal)
-        let ges = UITapGestureRecognizer(target: self, action: #selector(removeView))
-        addGestureRecognizer(ges)
-    }
-
-    override public func addLayout() {
-        let titleH: CGFloat = ((remindData?.title != nil && (remindData?.title?.count ?? 0) > 0) || attributedTitle != nil) ? cDefaultMargin * 2 : 0
-
-        let summH: CGFloat = sizeTextFits(attributedText: remindData?.attributedTitle != nil ? remindData?.attributedTitle : NSMutableAttributedString(string: remindData?.summary ?? ""), text: nil, numberOfLines: 0, font: UIFont.systemFont(ofSize: 14), maxSize: CGSize(width: cScreenWidth - cDefaultMargin * 12, height: CGFloat.greatestFiniteMagnitude)).height + cDefaultMargin
-
-        let contentH: CGFloat = (titleH == 0 ? 0 : cDefaultMargin * 3) + cDefaultMargin * 2 + summH + cDefaultMargin + cDefaultMargin * 5
-
-        contentView.snp.makeConstraints { make in
-            make.left.equalTo(self).offset(cDefaultMargin * 3)
-            make.right.equalTo(self).offset(-cDefaultMargin * 3)
-            make.height.equalTo(contentH)
-            make.center.equalTo(self)
-        }
-        titleLab.snp.makeConstraints { make in
-            make.left.equalTo(contentView).offset(cDefaultMargin * 2)
-            make.right.equalTo(contentView).offset(-cDefaultMargin * 2)
-            make.height.equalTo(titleH)
-            make.top.equalTo(contentView).offset(titleH == 0 ? 0 : cDefaultMargin * 2)
-        }
-        contentLab.snp.makeConstraints { make in
-            make.top.equalTo(titleLab.snp.bottom).offset(cDefaultMargin)
-            make.left.right.equalTo(titleLab)
-            make.height.equalTo(summH)
-        }
-        if canMoreOpration {
-            let btnW: CGFloat = (cScreenWidth - 1 - cDefaultMargin * 8) / 2
-            verticalLine.snp.makeConstraints { make in
-                make.top.equalTo(contentLab.snp.bottom).offset(cDefaultMargin)
-                make.height.equalTo(1)
-                make.left.width.equalToSuperview()
-            }
-            cancelBtn.snp.makeConstraints { make in
-                make.left.equalToSuperview()
-                make.top.equalTo(verticalLine.snp.bottom)
-                make.width.equalTo(btnW)
-                make.bottom.equalTo(contentView)
-            }
-            horizonLine.snp.makeConstraints { make in
-                make.left.equalTo(cancelBtn.snp.right)
-                make.height.top.equalTo(cancelBtn)
-                make.width.equalTo(1)
-            }
-            confirmBtn.snp.makeConstraints { make in
-                make.right.equalToSuperview()
-                make.height.width.bottom.equalTo(cancelBtn)
-            }
-        } else {
-            verticalLine.snp.makeConstraints { make in
-                make.top.equalTo(contentLab.snp.bottom).offset(cDefaultMargin)
-                make.height.equalTo(1)
-                make.left.width.equalToSuperview()
-            }
-            confirmBtn.snp.makeConstraints { make in
-                make.right.left.equalTo(titleLab)
-                make.top.equalTo(verticalLine.snp.bottom)
-                make.bottom.equalTo(contentView)
-            }
-        }
-    }
-
-    @objc func removeView() {
-        removeFromSuperview()
-    }
-
-    @objc public override func btnClck(sender: UIButton) {
-        removeFromSuperview()
-        if remindBlock != nil {
-            remindBlock!(sender, remindData!)
-        }
-    }
-
-    /// 快速生成
-    /// - Parameters:
-    ///   - title: <#title description#>
-    ///   - summary: <#summary description#>
-    ///   - confirmTitle: <#confirmTitle description#>
-    ///   - remindHandle: <#remindHandle description#>
-    /// - Returns: <#description#>
-    class public func showUploadRemindView(title: String?, attributedTitle: NSAttributedString? = nil, summary: String, canMoreOpration: Bool = false, confirmTitle: String?, cancelTitle: String? = nil, cancelColor: UIColor? = nil,confirmColor: UIColor? = nil, remindHandle: @escaping (_ sender: UIButton, _ baseModel: PQBaseModel?) -> Void) {
-        if UIApplication.shared.keyWindow?.viewWithTag(cUploadViewRemindTag) != nil {
-            UIApplication.shared.keyWindow?.viewWithTag(cUploadViewRemindTag)?.removeFromSuperview()
-        }
-        let remindData = PQBaseModel()
-        let paragraphStyle = NSMutableParagraphStyle()
-        paragraphStyle.lineSpacing = 3.0
-        paragraphStyle.alignment = .center
-        remindData.title = title
-        remindData.attributedTitle = NSMutableAttributedString(string: summary, attributes: [NSAttributedString.Key.font: UIFont.systemFont(ofSize: 14), NSAttributedString.Key.foregroundColor: UIColor.hexColor(hexadecimal: "#666666"), NSAttributedString.Key.paragraphStyle: paragraphStyle])
-        let remindView = PQUploadRemindView(frame: CGRect(x: 0, y: 0, width: cScreenWidth, height: cScreenHeigth))
-        remindView.canMoreOpration = canMoreOpration
-        if confirmTitle != nil {
-            remindView.confirmTitle = confirmTitle!
-        }
-        if cancelTitle != nil {
-            remindView.cancelTitle = cancelTitle!
-        }
-        if cancelColor != nil {
-            remindView.cacelColor = cancelColor!
-        }
-        if attributedTitle != nil {
-            remindView.attributedTitle = attributedTitle
-        }
-        remindView.remindBlock = { sender, baseModel in
-            remindHandle(sender, baseModel)
-        }
-
-        remindView.tag = cUploadViewRemindTag
-        UIApplication.shared.keyWindow?.addSubview(remindView)
-        remindView.remindData = remindData
-        
-        if(confirmColor != nil){
-            remindView.confirmBtn.setTitleColor(confirmColor, for: .normal)
-        }
-      
-    }
-}

+ 0 - 198
BFCommonKit/Classes/BFBase/View/PQSlideView.swift

@@ -1,198 +0,0 @@
-//
-//  PQSlideView.swift
-//  PQSpeed
-//
-//  Created by SanW on 2020/6/3.
-//  Copyright © 2020 BytesFlow. All rights reserved.
-//
-
-import UIKit
-
-public class PQPlayerSlider: UISlider {
-    override public func thumbRect(forBounds bounds: CGRect, trackRect rect: CGRect, value: Float) -> CGRect {
-        var newRect = rect
-
-        newRect.origin.x = newRect.origin.x - 5
-        newRect.size.width = newRect.size.width + 10
-        return super.thumbRect(forBounds: bounds, trackRect: newRect, value: value)
-    }
-}
-
-public class PQSlideView: UIView {
-    /// 拖动进度
-    public var valueChangeBloc: ((_ slideer: UISlider) -> Void)?
-    public var btnClickBloc: ((_ sender: UIButton) -> Void)?
-    public var isDragingProgressSlder: Bool = false
-
-    public var isHiddenPlayBtn: Bool = false {
-        didSet {
-            playerBtn.isHidden = isHiddenPlayBtn
-        }
-    }
-
-    public lazy var playerBtn: UIButton = {
-        let playerBtn = UIButton()
-        playerBtn.setImage(UIImage(named: "icon_video_stop"), for: .normal)
-        playerBtn.setImage(UIImage(named: "icon_video_play"), for: .selected)
-        playerBtn.tag = 1
-        playerBtn.addTarget(self, action: #selector(btnClick(sender:)), for: .touchUpInside)
-        return playerBtn
-    }()
-
-    public lazy var fullScreenBtn: UIButton = {
-        let fullScreenBtn = UIButton()
-        fullScreenBtn.setImage(UIImage(named: "icon_video_narrow"), for: .selected)
-        fullScreenBtn.setImage(UIImage(named: "icon_video_amplification"), for: .normal)
-        fullScreenBtn.tag = 2
-        fullScreenBtn.addTarget(self, action: #selector(btnClick(sender:)), for: .touchUpInside)
-        return fullScreenBtn
-    }()
-
-    public lazy var sliderView: PQPlayerSlider = {
-        let sliderView = PQPlayerSlider()
-        let thbImage = UIImage(named: "icon_point")
-        sliderView.setMinimumTrackImage(thbImage, for: .normal)
-        sliderView.setMaximumTrackImage(thbImage, for: .normal)
-        sliderView.setThumbImage(thbImage, for: .highlighted)
-        sliderView.setThumbImage(thbImage, for: .normal)
-        sliderView.maximumTrackTintColor = UIColor.hexColor(hexadecimal: "#303030")
-        sliderView.minimumTrackTintColor = UIColor.hexColor(hexadecimal: "#FA6400")
-        sliderView.addTarget(self, action: #selector(sliderTouchBegan(sender:)), for: .touchDown)
-        sliderView.addTarget(self, action: #selector(sliderTouchEnded(sender:)), for: .touchUpInside)
-        sliderView.addTarget(self, action: #selector(sliderTouchEnded(sender:)), for: .touchUpOutside)
-        sliderView.addTarget(self, action: #selector(sliderTouchEnded(sender:)), for: .touchCancel)
-        return sliderView
-    }()
-
-    public lazy var currentTimeLab: UILabel = {
-        let currentTimeLab = UILabel()
-        currentTimeLab.text = "00:00"
-        currentTimeLab.textColor = UIColor.white
-        currentTimeLab.font = UIFont.systemFont(ofSize: 12)
-        currentTimeLab.layer.shadowColor = UIColor.black.cgColor
-        currentTimeLab.layer.shadowRadius = 4.0
-        currentTimeLab.layer.shadowOpacity = 0.4
-        currentTimeLab.layer.shadowOffset = CGSize.zero
-        return currentTimeLab
-    }()
-
-    public lazy var totalLab: UILabel = {
-        let totalLab = UILabel()
-        totalLab.textColor = UIColor.white
-        totalLab.text = "00:00"
-        totalLab.font = UIFont.systemFont(ofSize: 12)
-        totalLab.layer.shadowColor = UIColor.black.cgColor
-        totalLab.layer.shadowRadius = 4.0
-        totalLab.layer.shadowOpacity = 0.4
-        totalLab.layer.shadowOffset = CGSize.zero
-        return totalLab
-    }()
-
-    override public init(frame: CGRect) {
-        super.init(frame: frame)
-        addSubview(playerBtn)
-        addSubview(currentTimeLab)
-        addSubview(sliderView)
-        addSubview(totalLab)
-        addSubview(fullScreenBtn)
-    }
-
-    public required init?(coder _: NSCoder) {
-        fatalError("init(coder:) has not been implemented")
-    }
-
-    public var progressValue: Float = 0 {
-        didSet {
-            if !isDragingProgressSlder {
-                addData()
-            }
-        }
-    }
-
-    public var duration: Float = 0 {
-        didSet {
-            if !isDragingProgressSlder {
-                addData()
-            }
-        }
-    }
-
-    override public func layoutSubviews() {
-        super.layoutSubviews()
-        addLayout()
-    }
-
-    public func addData() {
-        if progressValue >= 3600 {
-            currentTimeLab.snp.updateConstraints { make in
-                make.width.greaterThanOrEqualTo(54)
-            }
-        } else {
-            currentTimeLab.snp.updateConstraints { make in
-                make.width.greaterThanOrEqualTo(35)
-            }
-        }
-        sliderView.setValue(progressValue / duration, animated: false)
-        currentTimeLab.text = Float64(progressValue).formatDurationToHMS()
-        totalLab.text = Float64(duration).formatDurationToHMS()
-    }
-
-    public func addLayout() {
-        if isHiddenPlayBtn {
-            playerBtn.snp.remakeConstraints { make in
-                make.size.equalTo(CGSize.zero)
-            }
-            currentTimeLab.snp.remakeConstraints { make in
-                make.left.equalToSuperview()
-                make.width.greaterThanOrEqualTo(35)
-                make.centerY.equalToSuperview()
-            }
-        } else {
-            playerBtn.snp.remakeConstraints { make in
-                make.centerY.equalToSuperview()
-                make.height.width.equalTo(cDefaultMargin * 4)
-                make.left.equalTo(self)
-            }
-            currentTimeLab.snp.remakeConstraints { make in
-                make.left.equalTo(playerBtn.snp.right).offset(cDefaultMargin)
-                make.width.greaterThanOrEqualTo(35)
-                make.centerY.equalToSuperview()
-            }
-        }
-        fullScreenBtn.snp.makeConstraints { make in
-            make.right.equalTo(self)
-            make.centerY.equalToSuperview()
-            make.width.height.equalTo(cDefaultMargin * 4)
-        }
-        totalLab.snp.makeConstraints { make in
-            make.right.equalTo(fullScreenBtn.snp.left).offset(-cDefaultMargin)
-            make.centerY.equalToSuperview()
-        }
-        sliderView.snp.makeConstraints { make in
-            make.left.equalTo(currentTimeLab.snp.right).offset(cDefaultMargin)
-            make.right.equalTo(totalLab.snp.left).offset(-cDefaultMargin)
-            make.centerY.equalToSuperview()
-            make.height.equalTo(cDefaultMargin * 4)
-        }
-    }
-
-    @objc public func sliderTouchBegan(sender _: UISlider) {
-        isDragingProgressSlder = true
-    }
-
-    @objc public func sliderTouchEnded(sender: UISlider) {
-        if valueChangeBloc != nil {
-            valueChangeBloc!(sender)
-        }
-        isDragingProgressSlder = false
-        progressValue = sender.value * duration
-        addData()
-    }
-
-    @objc public func btnClick(sender: UIButton) {
-        if btnClickBloc != nil {
-            sender.isSelected = !sender.isSelected
-            btnClickBloc!(sender)
-        }
-    }
-}

+ 0 - 27
BFCommonKit/Classes/BFBase/View/PQTabBar.swift

@@ -1,27 +0,0 @@
-//
-//  PQTabBar.swift
-//  PQSpeed
-//
-//  Created by SanW on 2021/1/18.
-//  Copyright © 2021 BytesFlow. All rights reserved.
-//
-
-import UIKit
-
-public class PQTabBar: UITabBar {
-    override open func hitTest(_ point: CGPoint, with event: UIEvent?) -> UIView? {
-        if isHidden { // 如果隐藏的话不处理事件
-            return super.hitTest(point, with: event)
-        }
-        let view = super.hitTest(point, with: event)
-        if view == nil {
-            for subView in subviews {
-                let myPoint = subView.convert(point, from: self)
-                if subView.bounds.contains(myPoint) {
-                    return subView
-                }
-            }
-        }
-        return view
-    }
-}

+ 0 - 106
BFCommonKit/Classes/BFBase/View/PQTextView.swift

@@ -1,106 +0,0 @@
-//
-//  PQTextView.swift
-//  PQSpeed
-//
-//  Created by SanW on 2020/6/11.
-//  Copyright © 2020 BytesFlow. All rights reserved.
-//
-
-import UIKit
-
-open class PQTextView: UITextView {
-    private let textValuesQueue = DispatchQueue(label: "com.BytesFlow.textValuesQueue", qos: .default)
-
-   public var textDidChangedHandle: ((_ textView: UITextView) -> Void)?
-    // 最多输入的个数
-    public  var maxTextLength : Int?
-    // 输入个数超过时提示
-    public  var maxTextLengthRemind : String?
-    // add by ak 默认字的起点位置
-    public  var placeHolderDefultPoint = CGPoint.init(x: 5, y: 7)
-    /// setNeedsDisplay调用drawRect
-    public  var placeHolder: String = "" {
-        didSet {
-            setNeedsDisplay()
-        }
-    }
-
-    /// placeHolder是否居中
-    public  var isCenter: Bool = false {
-        didSet {
-            setNeedsDisplay()
-        }
-    }
-
-    public var placeHolderColor: UIColor = UIColor.gray {
-        didSet {
-            setNeedsDisplay()
-        }
-    }
-
-    open override var font: UIFont? {
-        didSet {
-            setNeedsDisplay()
-        }
-    }
-
-    open override var text: String! {
-        didSet{
-           setNeedsLayout()
-        }
-    }
-
-    open override var attributedText: NSAttributedString! {
-        didSet {
-            setNeedsDisplay()
-        }
-    }
-
-    public override init(frame: CGRect, textContainer: NSTextContainer?) {
-        super.init(frame: frame, textContainer: textContainer)
-        /// default字号
-        PQNotification.addObserver(self, selector: #selector(textDidChanged(noti:)), name: UITextView.textDidChangeNotification, object: self)
-    }
-
-    required public init?(coder _: NSCoder) {
-        fatalError("init(coder:) has not been implemented")
-    }
-
-    @objc func textDidChanged(noti _: NSNotification) {
-        if maxTextLength != nil && text.count > maxTextLength! {
-            text = String(text.prefix(maxTextLength!))
-            cShowHUB(superView: nil, msg: (maxTextLengthRemind != nil && (maxTextLengthRemind?.count ?? 0) > 0) ? maxTextLengthRemind : "最多输入\( maxTextLength!)个字符")
-        }
-        setNeedsDisplay()
-        if textDidChangedHandle != nil {
-            textDidChangedHandle!(self)
-        }
-    }
-
-    open override func draw(_ rect: CGRect) {
-        if hasText {
-            return
-        }
-        let size = sizeWithText(text: placeHolder, font: font ?? UIFont.systemFont(ofSize: 14), size: rect.size)
-        var newRect = CGRect()
-        newRect.size.width = size.width
-        newRect.size.height = size.height
-        if isCenter {
-            newRect.origin.x = (rect.width - size.width) / 2
-            newRect.origin.y = (rect.height - size.height) / 2
-        } else {
-            newRect.origin.x = placeHolder.contains("未识别到文字") ? 0 : placeHolderDefultPoint.x
-            newRect.origin.y = placeHolder.contains("未识别到文字") ? 0 : placeHolderDefultPoint.y
-        }
-        (placeHolder as NSString).draw(in: newRect, withAttributes: [NSAttributedString.Key.font: font ?? UIFont.systemFont(ofSize: 14), NSAttributedString.Key.foregroundColor: placeHolderColor])
-    }
-
-    open override func layoutSubviews() {
-        super.layoutSubviews()
-        setNeedsDisplay()
-    }
-
-    deinit {
-        PQNotification.removeObserver(self, name: UITextView.textDidChangeNotification, object: self)
-    }
-}

+ 0 - 6
BFCommonKit/Classes/BFUtility/PQCommonMethodUtil.swift

@@ -147,12 +147,6 @@ public func BFLog<T>(message: T) {
 //    }
 }
 
-public func HHZPrint<T>(_ message:T,file:String = #file,funcName:String = #function,lineNum:Int = #line){
-    #if DEBUG
-        let file = (file as NSString).lastPathComponent;
-        print("hhz-\(file):(\(lineNum))--\(message)");
-    #endif
-}
 
 // MARK: 获取公共参数