Bladeren bron

Merge branch 'master' of https://git.yishihui.com/iOS/BFFramework
合并代码

jsonwang 3 jaren geleden
bovenliggende
commit
dce682d7fa
28 gewijzigde bestanden met toevoegingen van 86 en 1519 verwijderingen
  1. 2 3
      BFFramework.podspec
  2. 0 46
      BFFramework/Classes/BFModules/BFCategorys/BFColor+Ext.swift
  3. 0 33
      BFFramework/Classes/BFModules/BFCategorys/BFFloat+Ext.swift
  4. 0 1
      BFFramework/Classes/BFModules/BFCategorys/UICollectionView+Ext.swift
  5. 0 0
      BFFramework/Classes/BFModules/BFCustomViews/.gitkeep
  6. 0 0
      BFFramework/Classes/BFModules/BFCustomViews/views/.gitkeep
  7. 0 17
      BFFramework/Classes/BFModules/BFCustomViews/views/BFUIButton.swift
  8. 0 99
      BFFramework/Classes/BFModules/BFCustomViews/views/BFUISlider.swift
  9. 0 114
      BFFramework/Classes/BFModules/BFCustomViews/views/NXBadgeView/NXBadgeControl.swift
  10. 0 28
      BFFramework/Classes/BFModules/BFCustomViews/views/NXBadgeView/NXBadgeView.swift
  11. 0 125
      BFFramework/Classes/BFModules/BFCustomViews/views/NXBadgeView/UIBarButtonItem+NXBadgeView.swift
  12. 0 126
      BFFramework/Classes/BFModules/BFCustomViews/views/NXBadgeView/UITabBarItem+NXBadgeView.swift
  13. 0 260
      BFFramework/Classes/BFModules/BFCustomViews/views/NXBadgeView/UIView+NXBadgeView.swift
  14. 0 166
      BFFramework/Classes/BFModules/BFCustomViews/views/bubbleLayer/NXBubbleLayer.swift
  15. 0 23
      BFFramework/Classes/BFModules/BFCustomViews/views/bubbleLayer/NXContainView.swift
  16. 0 73
      BFFramework/Classes/BFModules/BFCustomViews/views/bubbleLayer/NXInteractiveView.swift
  17. 0 80
      BFFramework/Classes/BFModules/BFCustomViews/views/bubbleLayer/NXNormalBubbleView.swift
  18. 0 40
      BFFramework/Classes/BFModules/BFCustomViews/views/bubbleLayer/NXTextBubbleView.swift
  19. 0 184
      BFFramework/Classes/BFModules/BFCustomViews/views/bubbleLayer/NXVoiceBubbleView.swift
  20. 43 59
      BFFramework/Classes/PQGPUImage/akfilters/PQImageFilter.swift
  21. 2 2
      BFFramework/Classes/Stuckpoint/Controller/PQStuckPointEditerController.swift
  22. 3 0
      BFFramework/Classes/Stuckpoint/Controller/PQStuckPointMaterialController.swift
  23. 2 2
      BFFramework/Classes/Stuckpoint/Controller/PQStuckPointMusicContentController.swift
  24. 1 0
      BFFramework/Classes/Stuckpoint/View/PQCustomSpeedSettingView.swift
  25. 3 3
      BFFramework/Classes/Stuckpoint/View/PQStuckPointLoadingView.swift
  26. 8 8
      BFFramework/Classes/selectImage/PQUploadController.swift
  27. 3 3
      Example/Podfile
  28. 19 24
      Example/Podfile.lock

+ 2 - 3
BFFramework.podspec

@@ -57,8 +57,7 @@ TODO: Add long description of the pod here.
     s.dependency 'AliyunOSSiOS','2.10.10' # 阿里云组件
     s.dependency 'WechatOpenSDK-Swift','1.8.7.1' # 微信组件
     s.dependency 'MJRefresh','3.7.2' # 刷新组件
-    s.dependency 'LMJHorizontalScrollText' ,'2.0.2'
-    s.dependency 'TXLiteAVSDK_Player','9.1.10564' # 腾讯播放器组件
+    s.dependency 'LMJHorizontalScrollText','2.0.2'
+    s.dependency 'TXLiteAVSDK_Player','9.2.10637' # 腾讯播放器组件
     s.dependency 'Bugly','2.5.90' #crash log 收集
-
 end

+ 0 - 46
BFFramework/Classes/BFModules/BFCategorys/BFColor+Ext.swift

@@ -1,46 +0,0 @@
-//
-//  UIColor+Ext.swift
-//  PQSpeed
-//
-//  Created by SanW on 2020/5/25.
-//  Copyright © 2020 BytesFlow. All rights reserved.
-//
-
-import Foundation
-import UIKit
-
-extension UIColor {
-    public  class func hexColor(hexadecimal: String,alpha:CGFloat = 1) -> UIColor {
-        var cstr = hexadecimal.trimmingCharacters(in: CharacterSet.whitespacesAndNewlines).uppercased() as NSString
-        if cstr.length < 6 {
-            return UIColor.clear
-        }
-        if cstr.hasPrefix("0X") {
-            cstr = cstr.substring(from: 2) as NSString
-        }
-        if cstr.hasPrefix("#") {
-            cstr = cstr.substring(from: 1) as NSString
-        }
-        if cstr.length != 6 {
-            return UIColor.clear
-        }
-        var range = NSRange()
-        range.location = 0
-        range.length = 2
-        // r
-        let rStr = cstr.substring(with: range)
-        // g
-        range.location = 2
-        let gStr = cstr.substring(with: range)
-        // b
-        range.location = 4
-        let bStr = cstr.substring(with: range)
-        var r: UInt32 = 0x0
-        var g: UInt32 = 0x0
-        var b: UInt32 = 0x0
-        Scanner(string: rStr).scanHexInt32(&r)
-        Scanner(string: gStr).scanHexInt32(&g)
-        Scanner(string: bStr).scanHexInt32(&b)
-        return UIColor(red: CGFloat(r) / 255.0, green: CGFloat(g) / 255.0, blue: CGFloat(b) / 255.0, alpha: alpha)
-    }
-}

+ 0 - 33
BFFramework/Classes/BFModules/BFCategorys/BFFloat+Ext.swift

@@ -1,33 +0,0 @@
-//
-//  BFFloat+Ext.swift
-//  BFFramework
-//
-//  Created by ak on 2021/10/11.
-//
-
-import Foundation
-
-extension Float {
-    /// 准确的小数尾截取 - 没有进位
-    /*
-     // 11.999003  -> 12.0
-     var pp = 11.999003
-     String(format: "%.1f", pp)  这个方法会进行四舍五入
-     */
-    func decimalString(_ base: Self = 1) -> String {
-       return "\(self.decimalNumber(base))"
-    }
-    func decimalNumber(_ base: Self = 1) -> Float {
-        let tempCount: Self = pow(10, base)
-        let temp = self*tempCount
-        
-        let target = Self(Int(temp))
-        let stepone = target/tempCount
-        if stepone.truncatingRemainder(dividingBy: 1) == 0 {
-            return Float(String(format: "%.0f", stepone)) ?? 0.0
-        }else{
-            return stepone
-        }
-    }
-}
- 

+ 0 - 1
BFFramework/Classes/BFModules/BFCategorys/UICollectionView+Ext.swift

@@ -7,7 +7,6 @@
 //
 
 import Foundation
-import MJRefresh
 
 extension UICollectionView{
     /// 获取当前cell

+ 0 - 0
BFFramework/Classes/BFModules/BFCustomViews/.gitkeep


+ 0 - 0
BFFramework/Classes/BFModules/BFCustomViews/views/.gitkeep


+ 0 - 17
BFFramework/Classes/BFModules/BFCustomViews/views/BFUIButton.swift

@@ -1,17 +0,0 @@
-//
-//  BFUIButton.swift
-//  Alamofire
-//
-//  Created by ak on 2021/8/4.
-//  功能:默认扩大 btn 的点击范围
-
-import Foundation
-
-public class BFUIButton: UIButton {
-    //扩大点击范围 PX
-    var margin: CGFloat = 60
-    public override func point(inside point: CGPoint, with _: UIEvent?) -> Bool {
-        let area = bounds.insetBy(dx: -margin, dy: -margin) // 负值是方法响应范围
-        return area.contains(point)
-    }
-}

+ 0 - 99
BFFramework/Classes/BFModules/BFCustomViews/views/BFUISlider.swift

@@ -1,99 +0,0 @@
-//
-//  BFSlider.swift
-//  BFFramework
-//
-//  Created by ak on 2021/8/4.
-//  功能:自定义 UISlider
-
-import Foundation
-
-class BFUISlider: UISlider {
-    
-    //slider的value文本
-    var valueText:String?{
-        didSet {
-            valueLabel.text = valueText
-            valueLabel.sizeToFit()
-            
-            let trackRect = convert(bounds, to: nil)
-            let thumbRectTemp = thumbRect(forBounds: bounds, trackRect: trackRect, value: value)
-            valueLabel.center = CGPoint.init(x: (thumbRectTemp.origin.x - thumbRectTemp.origin.x + thumbRectTemp.size.width / 2), y: -self.frame.size.height)
-            
-//            CGPointMake((thumbRect.origin.x - trackRect.origin.x + thumbRect.size.width / 2), -self.frame.size.height);
-            
-//            [super trackRectForBounds:bounds];
-//           return CGRectMake(bounds.origin.x, bounds.origin.y + (bounds.size.height - 3.0) / 2, bounds.size.width, 3.0);
-       
-        }
-    }
-    override var value: Float{
-        didSet {
-            sliderValueChanged(sender: self)
-        }
-    }
-    //slider的value字体
-    var valueFont:UIFont?
-    //slider的value文本颜色
-    var valueTextColor:UIColor?
-    
-    //返回的数值是否为整形
-    var valueIsInt:Bool = false
-    
-    lazy var valueLabel:UILabel = {
-        let valueLabel = UILabel.init()
-        valueLabel.text = "0"
-        valueLabel.textColor = valueTextColor != nil ? valueTextColor : self.thumbTintColor
-        valueLabel.font = valueFont != nil ? valueFont : UIFont.systemFont(ofSize: 14);
-        valueLabel.textAlignment = .center
-        
-        return valueLabel
-        
-    }()
-    override init(frame: CGRect) {
-        super.init(frame: frame)
-        addTarget(self, action: #selector(sliderTouchDown(sender:)), for: .touchDown)
-        addTarget(self, action: #selector(sliderValueChanged(sender:)), for: .valueChanged)
-        addTarget(self, action: #selector(sliderTouchUpInside(sender:)), for: .touchUpInside)
- 
-    }
-    
-    required init?(coder: NSCoder) {
-        fatalError("init(coder:) has not been implemented")
-    }
-    
-    override func layoutSubviews() {
-        super.layoutSubviews()
-        addSubview(valueLabel)
-        sliderValueChanged(sender: self)
-    }
-    
-    override func setValue(_ value: Float, animated: Bool) {
-        super.setValue(value, animated: animated)
-        sliderValueChanged(sender: self)
-    }
- 
-    //重写方法-返回进度条的bounds-修改进度条的高度
-    override func trackRect(forBounds bounds: CGRect) -> CGRect {
- 
-        let bounds = super.trackRect(forBounds: bounds)
-        return CGRect.init(origin: CGPoint.init(x: bounds.origin.x, y: bounds.origin.y + (bounds.size.height - 3.0) / 2 ), size: CGSize.init(width:  bounds.size.width, height: 3))
-    }
-    
-    @objc func sliderTouchDown(sender: BFUISlider) {
-         
-    }
-    @objc func sliderValueChanged(sender: BFUISlider) {
-        
-        if(valueIsInt){
-            valueText = "\(Int(sender.value))x"
-        }else{
-            valueText = "\(sender.value.decimalString())x"
-        }
-      
- 
-    }
-    @objc func sliderTouchUpInside(sender: BFUISlider) {
-         
-    }
-    
-}

+ 0 - 114
BFFramework/Classes/BFModules/BFCustomViews/views/NXBadgeView/NXBadgeControl.swift

@@ -1,114 +0,0 @@
-//
-//  NXBadgeControl.swift
-//  NXFramework-Swift
-//
-//  Created by ak on 2020/11/11.
-//
-
-
-import UIKit
-
-
-open class NXBadgeControl: UIControl {
-    
-    /// 记录Badge的偏移量 Record the offset of Badge
-    public var offset: CGPoint = CGPoint(x: 0, y: 0)
-    
-    /// Badge伸缩的方向, Default is NXBadgeViewFlexModeTail
-    public var flexMode: NXBadgeViewFlexMode = .tail
-    
-    private lazy var textLabel: UILabel = UILabel()
-    
-    private lazy var imageView: UIImageView = UIImageView()
-    
-    private var badgeViewColor: UIColor?
-    private var badgeViewHeightConstraint: NSLayoutConstraint?
-    
-    public class func `default`() -> Self {
-        return self.init(frame: .zero)
-    }
-    
-    required override public init(frame: CGRect) {
-        super.init(frame: frame)
-        setupSubviews()
-    }
-    
-    required public init?(coder aDecoder: NSCoder) {
-        super.init(coder: aDecoder)
-        fatalError("init(coder:) has not been implemented")
-    }
-    
-    /// Set Text
-    open var text: String? {
-        didSet {
-            textLabel.text = text
-        }
-    }
-    
-    /// Set AttributedText
-    open var attributedText: NSAttributedString? {
-        didSet {
-            textLabel.attributedText = attributedText
-        }
-    }
-    
-    /// Set Font
-    open var font: UIFont? {
-        didSet {
-            textLabel.font = font
-        }
-    }
-    
-    /// Set background image
-    open var backgroundImage: UIImage? {
-        didSet {
-            imageView.image = backgroundImage
-            if let _ = backgroundImage {
-                if let constraint = heightConstraint() {
-                    badgeViewHeightConstraint = constraint
-                    removeConstraint(constraint)
-                }
-                backgroundColor = UIColor.clear
-            } else {
-                if heightConstraint() == nil, let constraint = badgeViewHeightConstraint {
-                    addConstraint(constraint)
-                }
-                backgroundColor = badgeViewColor
-            }
-        }
-    }
-    
-    open override var backgroundColor: UIColor? {
-        didSet {
-            super.backgroundColor = backgroundColor
-            if let color = backgroundColor, color != .clear {
-                badgeViewColor = backgroundColor
-            }
-        }
-    }
-    
-    private func setupSubviews() {
-        layer.masksToBounds = true
-        layer.cornerRadius = 9.0
-        translatesAutoresizingMaskIntoConstraints = false
-        backgroundColor = UIColor.red
-        textLabel.textColor = UIColor.white
-        textLabel.font = UIFont.systemFont(ofSize: 13)
-        textLabel.textAlignment = .center
-        addSubview(textLabel)
-        addSubview(imageView)
-        addLayout(with: imageView, leading: 0, trailing: 0)
-        addLayout(with: textLabel, leading: 5, trailing: -5)
-    }
-    
-    private func addLayout(with view: UIView, leading: CGFloat, trailing: CGFloat) {
-        view.translatesAutoresizingMaskIntoConstraints = false
-        let topConstraint = NSLayoutConstraint(item: view, attribute: .top, relatedBy: .equal, toItem: self, attribute: .top, multiplier: 1.0, constant: 0)
-        let leadingConstraint = NSLayoutConstraint(item: view, attribute: .leading, relatedBy: .equal, toItem: self, attribute: .leading, multiplier: 1.0, constant: leading)
-        let bottomConstraint = NSLayoutConstraint(item: view, attribute: .bottom, relatedBy: .equal, toItem: self, attribute: .bottom, multiplier: 1.0, constant: 0)
-        let trailingConstraint = NSLayoutConstraint(item: view, attribute: .trailing, relatedBy: .equal, toItem: self, attribute: .trailing, multiplier: 1.0, constant: trailing)
-        leadingConstraint.priority = UILayoutPriority(rawValue: 999)
-        trailingConstraint.priority = UILayoutPriority(rawValue: 999)
-        addConstraints([topConstraint, leadingConstraint, bottomConstraint, trailingConstraint])
-    }
-}

+ 0 - 28
BFFramework/Classes/BFModules/BFCustomViews/views/NXBadgeView/NXBadgeView.swift

@@ -1,28 +0,0 @@
-//
-//  NXBadgeView.swift.swift
-//  NXFramework-Swift
-//
-//  Created by ak on 2020/11/11.
-//
-
-
-import UIKit
-
-public struct NX<Base> {
-    public let base: Base
-    public init(_ base: Base) {
-        self.base = base
-    }
-}
-
-public extension NSObjectProtocol {
-    var nx: NX<Self> {
-        return NX(self)
-    }
-}
-
-public enum NXBadgeViewFlexMode {
-    case head    // 左伸缩 Head Flex    : <==●
-    case tail    // 右伸缩 Tail Flex    : ●==>
-    case middle  // 左右伸缩 Middle Flex : <=●=>
-}

+ 0 - 125
BFFramework/Classes/BFModules/BFCustomViews/views/NXBadgeView/UIBarButtonItem+NXBadgeView.swift

@@ -1,125 +0,0 @@
-//
-//  UIBarButtonItem+NXBadgeView.swift
-//  NXFramework-Swift
-//
-//  Created by ak on 2020/11/11.
-//
-
-import UIKit
-
-public extension NX where Base: UIBarButtonItem {
-    
-    public var badgeView: NXBadgeControl {
-        return _bottomView.nx.badgeView
-    }
-    
-    /// 添加带文本内容的Badge, 默认右上角, 红色, 18pts
-    ///
-    /// Add Badge with text content, the default upper right corner, red backgroundColor, 18pts
-    ///
-    /// - Parameter text: 文本字符串
-     public  func addBadge(text: String) {
-        _bottomView.nx.addBadge(text: text)
-    }
-    
-    /// 添加带数字的Badge, 默认右上角,红色,18pts
-    ///
-    /// Add the Badge with numbers, the default upper right corner, red backgroundColor, 18pts
-    ///
-    /// - Parameter number: 整形数字
-     public  func addBadge(number: Int) {
-        _bottomView.nx.addBadge(number: number)
-    }
-    
-    /// 添加带颜色的小圆点, 默认右上角, 红色, 8pts
-    ///
-    /// Add small dots with color, the default upper right corner, red backgroundColor, 8pts
-    ///
-    /// - Parameter color: 颜色
-     public  func addDot(color: UIColor?) {
-        _bottomView.nx.addDot(color: color)
-    }
-    
-    /// 设置Badge的偏移量, Badge中心点默认为其父视图的右上角
-    ///
-    /// Set Badge offset, Badge center point defaults to the top right corner of its parent view
-    ///
-    /// - Parameters:
-    ///   - x: X轴偏移量 (x<0: 左移, x>0: 右移) axis offset (x <0: left, x> 0: right)
-    ///   - y: Y轴偏移量 (y<0: 上移, y>0: 下移) axis offset (Y <0: up,   y> 0: down)
-     public  func moveBadge(x: CGFloat, y: CGFloat) {
-        _bottomView.nx.moveBadge(x: x, y: y)
-    }
-    
-    /// 设置Badge伸缩的方向
-    ///
-    /// Setting the direction of Badge expansion
-    ///
-    /// NXBadgeViewFlexModeHead,    左伸缩 Head Flex    : <==●
-    /// NXBadgeViewFlexModeTail,    右伸缩 Tail Flex    : ●==>
-    /// NXBadgeViewFlexModeMiddle   左右伸缩 Middle Flex : <=●=>
-    /// - Parameter flexMode : Default is PPBadgeViewFlexModeTail
-     public  func setBadge(flexMode: NXBadgeViewFlexMode = .tail) {
-        _bottomView.nx.setBadge(flexMode: flexMode)
-    }
-    
-    /// 设置Badge的高度,因为Badge宽度是动态可变的,通过改变Badge高度,其宽度也按比例变化,方便布局
-    ///
-    /// (注意: 此方法需要将Badge添加到控件上后再调用!!!)
-    ///
-    /// Set the height of Badge, because the Badge width is dynamically and  variable.By changing the Badge height in proportion to facilitate the layout.
-    ///
-    /// (Note: this method needs to add Badge to the controls and then use it !!!)
-    ///
-    /// - Parameter points: 高度大小
-     public  func setBadge(height: CGFloat) {
-        _bottomView.nx.setBadge(height: height)
-    }
-    
-    /// 显示Badge
-     public  func showBadge() {
-        _bottomView.nx.showBadge()
-    }
-    
-    /// 隐藏Badge
-     public  func hiddenBadge() {
-        _bottomView.nx.hiddenBadge()
-    }
-    
-    // MARK: - 数字增加/减少, 注意:以下方法只适用于Badge内容为纯数字的情况
-    // MARK: - Digital increase /decrease, note: the following method applies only to cases where the Badge content is purely numeric
-    /// badge数字加1
-     public  func increase() {
-        _bottomView.nx.increase()
-    }
-    
-    /// badge数字加number
-     public  func increaseBy(number: Int) {
-        _bottomView.nx.increaseBy(number: number)
-    }
-    
-    /// badge数字加1
-     public  func decrease() {
-        _bottomView.nx.decrease()
-    }
-    
-    /// badge数字减number
-     public  func decreaseBy(number: Int) {
-        _bottomView.nx.decreaseBy(number: number)
-    }
-
-    /// 通过Xcode视图调试工具找到UIBarButtonItem的Badge所在父视图为:UIImageView
-    private var _bottomView: UIView {
-        let navigationButton = (self.base.value(forKey: "_view") as? UIView) ?? UIView()
-        let systemVersion = (UIDevice.current.systemVersion as NSString).doubleValue
-        let controlName = (systemVersion < 11.0 ? "UIImageView" : "UIButton" )
-        for subView in navigationButton.subviews {
-            if subView.isKind(of: NSClassFromString(controlName)!) {
-                subView.layer.masksToBounds = false
-                return subView
-            }
-        }
-        return navigationButton
-    }
-}
-

+ 0 - 126
BFFramework/Classes/BFModules/BFCustomViews/views/NXBadgeView/UITabBarItem+NXBadgeView.swift

@@ -1,126 +0,0 @@
-
-//
-//  UITabBarItem+NXBadgeView.swift
-//  NXFramework-Swift
-//
-//  Created by ak on 2020/11/11.
-//
-
-import Foundation
-
-public extension NX where Base: UITabBarItem {
-    
-    var badgeView: NXBadgeControl {
-        return _bottomView.nx.badgeView
-    }
-    
-    /// 添加带文本内容的Badge, 默认右上角, 红色, 18pts
-    ///
-    /// Add Badge with text content, the default upper right corner, red backgroundColor, 18pts
-    ///
-    /// - Parameter text: 文本字符串
-    func addBadge(text: String) {
-        _bottomView.nx.addBadge(text: text)
-        _bottomView.nx.moveBadge(x: 4, y: 3)
-    }
-    
-    /// 添加带数字的Badge, 默认右上角,红色,18pts
-    ///
-    /// Add the Badge with numbers, the default upper right corner, red backgroundColor, 18pts
-    ///
-    /// - Parameter number: 整形数字
-    func addBadge(number: Int) {
-        _bottomView.nx.addBadge(number: number)
-        _bottomView.nx.moveBadge(x: 4, y: 3)
-    }
-    
-    /// 添加带颜色的小圆点, 默认右上角, 红色, 8pts
-    ///
-    /// Add small dots with color, the default upper right corner, red backgroundColor, 8pts
-    ///
-    /// - Parameter color: 颜色
-    func addDot(color: UIColor?) {
-        _bottomView.nx.addDot(color: color)
-    }
-    
-    /// 设置Badge的偏移量, Badge中心点默认为其父视图的右上角
-    ///
-    /// Set Badge offset, Badge center point defaults to the top right corner of its parent view
-    ///
-    /// - Parameters:
-    ///   - x: X轴偏移量 (x<0: 左移, x>0: 右移) axis offset (x <0: left, x> 0: right)
-    ///   - y: Y轴偏移量 (y<0: 上移, y>0: 下移) axis offset (Y <0: up,   y> 0: down)
-    func moveBadge(x: CGFloat, y: CGFloat) {
-        _bottomView.nx.moveBadge(x: x, y: y)
-    }
-    
-    /// 设置Badge伸缩的方向
-    ///
-    /// Setting the direction of Badge expansion
-    ///
-    /// PPBadgeViewFlexModeHead,    左伸缩 Head Flex    : <==●
-    /// PPBadgeViewFlexModeTail,    右伸缩 Tail Flex    : ●==>
-    /// PPBadgeViewFlexModeMiddle   左右伸缩 Middle Flex : <=●=>
-    /// - Parameter flexMode : Default is PPBadgeViewFlexModeTail
-    func setBadge(flexMode: NXBadgeViewFlexMode = .tail) {
-        _bottomView.nx.setBadge(flexMode: flexMode)
-    }
-    
-    /// 设置Badge的高度,因为Badge宽度是动态可变的,通过改变Badge高度,其宽度也按比例变化,方便布局
-    ///
-    /// (注意: 此方法需要将Badge添加到控件上后再调用!!!)
-    ///
-    /// Set the height of Badge, because the Badge width is dynamically and  variable.By changing the Badge height in proportion to facilitate the layout.
-    ///
-    /// (Note: this method needs to add Badge to the controls and then use it !!!)
-    ///
-    /// - Parameter height: 高度大小
-    func setBadge(height: CGFloat) {
-        _bottomView.nx.setBadge(height: height)
-    }
-    
-    
-    /// 显示Badge
-    func showBadge() {
-        _bottomView.nx.showBadge()
-    }
-    
-    /// 隐藏Badge
-    func hiddenBadge() {
-        _bottomView.nx.hiddenBadge()
-    }
-    
-    // MARK: - 数字增加/减少, 注意:以下方法只适用于Badge内容为纯数字的情况
-    // MARK: - Digital increase /decrease, note: the following method applies only to cases where the Badge content is purely numeric
-    /// badge数字加1
-    func increase() {
-        _bottomView.nx.increase()
-    }
-    
-    /// badge数字加number
-    func increaseBy(number: Int) {
-        _bottomView.nx.increaseBy(number: number)
-    }
-    
-    /// badge数字加1
-    func decrease() {
-        _bottomView.nx.decrease()
-    }
-    
-    /// badge数字减number
-    func decreaseBy(number: Int) {
-        _bottomView.nx.decreaseBy(number: number)
-    }
-    
-    /// 通过Xcode视图调试工具找到UITabBarItem原生Badge所在父视图
-    private var _bottomView: UIView {
-        let tabBarButton = (self.base.value(forKey: "_view") as? UIView) ?? UIView()
-        for subView in tabBarButton.subviews {
-            guard let superclass = subView.superclass else { return tabBarButton }
-            if superclass == NSClassFromString("UIImageView") {
-                return subView
-            }
-        }
-        return tabBarButton
-    }
-}

+ 0 - 260
BFFramework/Classes/BFModules/BFCustomViews/views/NXBadgeView/UIView+NXBadgeView.swift

@@ -1,260 +0,0 @@
-//
-//  UIView+NXBadgeView.swift
-//  NXFramework-Swift
-//
-//  Created by ak on 2020/11/11.
-//
-
-import UIKit
-
-private var kBadgeView = "kNXBadgeView"
-
-// MARK: - add Badge
-public extension NX where Base: UIView {
-    
-    var badgeView: NXBadgeControl {
-        return base.badgeView
-    }
-    
-    /// 添加带文本内容的Badge, 默认右上角, 红色, 18pts
-    ///
-    /// Add Badge with text content, the default upper right corner, red backgroundColor, 18pts
-    ///
-    /// - Parameter text: 文本字符串
-    func addBadge(text: String?) {
-        showBadge()
-        base.badgeView.text = text
-        setBadge(flexMode: base.badgeView.flexMode)
-        if text == nil {
-            if base.badgeView.widthConstraint()?.relation == .equal { return }
-            base.badgeView.widthConstraint()?.isActive = false
-            let constraint = NSLayoutConstraint(item: base.badgeView, attribute: .width, relatedBy: .equal, toItem: base.badgeView, attribute: .height, multiplier: 1.0, constant: 0)
-            base.badgeView.addConstraint(constraint)
-        } else {
-            if base.badgeView.widthConstraint()?.relation == .greaterThanOrEqual { return }
-            base.badgeView.widthConstraint()?.isActive = false
-            let constraint = NSLayoutConstraint(item: base.badgeView, attribute: .width, relatedBy: .greaterThanOrEqual, toItem: base.badgeView, attribute: .height, multiplier: 1.0, constant: 0)
-            base.badgeView.addConstraint(constraint)
-        }
-    }
-    
-    /// 添加带数字的Badge, 默认右上角,红色,18pts
-    ///
-    /// Add the Badge with numbers, the default upper right corner, red backgroundColor, 18pts
-    ///
-    /// - Parameter number: 整形数字
-    func addBadge(number: Int) {
-        if number <= 0 {
-            addBadge(text: "0")
-            hiddenBadge()
-            return
-        }
-        addBadge(text: "\(number)")
-    }
-    
-    /// 添加带颜色的小圆点, 默认右上角, 红色, 8pts
-    ///
-    /// Add small dots with color, the default upper right corner, red backgroundColor, 8pts
-    ///
-    /// - Parameter color: 颜色
-    func addDot(color: UIColor? = .red) {
-        addBadge(text: nil)
-        setBadge(height: 8.0)
-        base.badgeView.backgroundColor = color
-    }
-    
-    /// 设置Badge的偏移量, Badge中心点默认为其父视图的右上角
-    ///
-    /// Set Badge offset, Badge center point defaults to the top right corner of its parent view
-    ///
-    /// - Parameters:
-    ///   - x: X轴偏移量 (x<0: 左移, x>0: 右移) axis offset (x <0: left, x> 0: right)
-    ///   - y: Y轴偏移量 (y<0: 上移, y>0: 下移) axis offset (Y <0: up,   y> 0: down)
-    func moveBadge(x: CGFloat, y: CGFloat) {
-        base.badgeView.offset = CGPoint(x: x, y: y)
-        base.centerYConstraint(with: base.badgeView)?.constant = y
-        
-        let badgeHeight = base.badgeView.heightConstraint()?.constant ?? 0
-        switch base.badgeView.flexMode {
-        case .head:
-            base.centerXConstraint(with: base.badgeView)?.isActive = false
-            base.leadingConstraint(with: base.badgeView)?.isActive = false
-            if let constraint = base.trailingConstraint(with: base.badgeView) {
-                constraint.constant = badgeHeight * 0.5 + x
-                return
-            }
-            let trailingConstraint = NSLayoutConstraint(item: base.badgeView, attribute: .trailing, relatedBy: .equal, toItem: base, attribute: .trailing, multiplier: 1.0, constant: badgeHeight * 0.5 + x)
-            base.addConstraint(trailingConstraint)
-            
-        case .tail:
-            base.centerXConstraint(with: base.badgeView)?.isActive = false
-            base.trailingConstraint(with: base.badgeView)?.isActive = false
-            if let constraint = base.leadingConstraint(with: base.badgeView) {
-                constraint.constant = x - badgeHeight * 0.5
-                return
-            }
-            let leadingConstraint = NSLayoutConstraint(item: base.badgeView, attribute: .leading, relatedBy: .equal, toItem: base, attribute: .trailing, multiplier: 1.0, constant: x - badgeHeight * 0.5)
-            base.addConstraint(leadingConstraint)
-            
-        case .middle:
-            base.leadingConstraint(with: base.badgeView)?.isActive = false
-            base.trailingConstraint(with: base.badgeView)?.isActive = false
-            base.centerXConstraint(with: base.badgeView)?.constant = x
-            if let constraint = base.centerXConstraint(with: base.badgeView) {
-                constraint.constant = x
-                return
-            }
-            let centerXConstraint = NSLayoutConstraint(item: base.badgeView, attribute: .centerX, relatedBy: .equal, toItem: base, attribute: .centerX, multiplier: 1.0, constant: x)
-            base.addConstraint(centerXConstraint)
-        }
-    }
-    
-    /// 设置Badge伸缩的方向
-    ///
-    /// Setting the direction of Badge expansion
-    ///
-    /// NXBadgeViewFlexModeHead,    左伸缩 Head Flex    : <==●
-    /// NXBadgeViewFlexModeTail,    右伸缩 Tail Flex    : ●==>
-    /// NXBadgeViewFlexModeMiddle   左右伸缩 Middle Flex : <=●=>
-    /// - Parameter flexMode : Default is PPBadgeViewFlexModeTail
-    func setBadge(flexMode: NXBadgeViewFlexMode = .tail) {
-        base.badgeView.flexMode = flexMode
-        moveBadge(x: base.badgeView.offset.x, y: base.badgeView.offset.y)
-    }
-    
-    /// 设置Badge的高度,因为Badge宽度是动态可变的,通过改变Badge高度,其宽度也按比例变化,方便布局
-    ///
-    /// (注意: 此方法需要将Badge添加到控件上后再调用!!!)
-    ///
-    /// Set the height of Badge, because the Badge width is dynamically and  variable.By changing the Badge height in proportion to facilitate the layout.
-    ///
-    /// (Note: this method needs to add Badge to the controls and then use it !!!)
-    ///
-    /// - Parameter height: 高度大小
-    func setBadge(height: CGFloat) {
-        base.badgeView.layer.cornerRadius = height * 0.5
-        base.badgeView.heightConstraint()?.constant = height
-        moveBadge(x: base.badgeView.offset.x, y: base.badgeView.offset.y)
-    }
-    
-    /// 显示Badge
-    func showBadge() {
-        base.badgeView.isHidden = false
-    }
-    
-    /// 隐藏Badge
-    func hiddenBadge() {
-        base.badgeView.isHidden = true
-    }
-    
-    // MARK: - 数字增加/减少, 注意:以下方法只适用于Badge内容为纯数字的情况
-    // MARK: - Digital increase /decrease, note: the following method applies only to cases where the Badge content is purely numeric
-    /// badge数字加1
-    func increase() {
-        increaseBy(number: 1)
-    }
-    
-    /// badge数字加number
-    func increaseBy(number: Int) {
-        let label = base.badgeView
-        let result = (Int(label.text ?? "0") ?? 0) + number
-        if result > 0 {
-            showBadge()
-        }
-        label.text = "\(result)"
-    }
-    
-    /// badge数字加1
-    func decrease() {
-        decreaseBy(number: 1)
-    }
-    
-    /// badge数字减number
-    func decreaseBy(number: Int) {
-        let label = base.badgeView
-        let result = (Int(label.text ?? "0") ?? 0) - number
-        if (result <= 0) {
-            hiddenBadge()
-            label.text = "0"
-            return
-        }
-        label.text = "\(result)"
-    }
-}
-
-extension UIView {
-    
-      public  func addBadgeViewLayoutConstraint() {
-        badgeView.translatesAutoresizingMaskIntoConstraints = false
-        let centerXConstraint = NSLayoutConstraint(item: badgeView, attribute: .centerX, relatedBy: .equal, toItem: self, attribute: .trailing, multiplier: 1.0, constant: 0)
-        let centerYConstraint = NSLayoutConstraint(item: badgeView, attribute: .centerY, relatedBy: .equal, toItem: self, attribute: .top, multiplier: 1.0, constant: 0)
-        let widthConstraint = NSLayoutConstraint(item: badgeView, attribute: .width, relatedBy: .greaterThanOrEqual, toItem: badgeView, attribute: .height, multiplier: 1.0, constant: 0)
-        let heightConstraint = NSLayoutConstraint(item: badgeView, attribute: .height, relatedBy: .equal, toItem: nil, attribute: .notAnAttribute, multiplier: 1.0, constant: 18)
-        addConstraints([centerXConstraint, centerYConstraint])
-        badgeView.addConstraints([widthConstraint, heightConstraint])
-    }
-}
-
-// MARK: - getter/setter
-extension UIView {
-
-    public var badgeView: NXBadgeControl {
-        get {
-            if let aValue = objc_getAssociatedObject(self, &kBadgeView) as? NXBadgeControl {
-                return aValue
-            }
-            else {
-                let badgeControl = NXBadgeControl.default()
-                self.addSubview(badgeControl)
-                self.bringSubviewToFront(badgeControl)
-                self.badgeView = badgeControl
-                self.addBadgeViewLayoutConstraint()
-                return badgeControl
-            }
-        }
-        set {
-            objc_setAssociatedObject(self, &kBadgeView, newValue, objc_AssociationPolicy.OBJC_ASSOCIATION_RETAIN_NONATOMIC)
-        }
-    }
-    
-       public  func topConstraint(with item: AnyObject?) -> NSLayoutConstraint? {
-        return constraint(with: item, attribute: .top)
-    }
-    
-       public  func leadingConstraint(with item: AnyObject?) -> NSLayoutConstraint? {
-        return constraint(with: item, attribute: .leading)
-    }
-    
-       public  func bottomConstraint(with item: AnyObject?) -> NSLayoutConstraint? {
-        return constraint(with: item, attribute: .bottom)
-    }
-
-       public  func trailingConstraint(with item: AnyObject?) -> NSLayoutConstraint? {
-        return constraint(with: item, attribute: .trailing)
-    }
-    
-       public  func widthConstraint() -> NSLayoutConstraint? {
-        return constraint(with: self, attribute: .width)
-    }
-    
-       public  func heightConstraint() -> NSLayoutConstraint? {
-        return constraint(with: self, attribute: .height)
-    }
-
-       public  func centerXConstraint(with item: AnyObject?) -> NSLayoutConstraint? {
-        return constraint(with: item, attribute: .centerX)
-    }
-    
-       public  func centerYConstraint(with item: AnyObject?) -> NSLayoutConstraint? {
-        return constraint(with: item, attribute: .centerY)
-    }
-    
-       public  func constraint(with item: AnyObject?, attribute: NSLayoutConstraint.Attribute) -> NSLayoutConstraint? {
-        for constraint in constraints {
-            if let isSame = constraint.firstItem?.isEqual(item), isSame, constraint.firstAttribute == attribute {
-                return constraint
-            }
-        }
-        return nil
-    }
-}

+ 0 - 166
BFFramework/Classes/BFModules/BFCustomViews/views/bubbleLayer/NXBubbleLayer.swift

@@ -1,166 +0,0 @@
-//
-//  NXBubbleLayer.swift
-//  bubbleLayer_swift
-//
-//  Created by liuming on 2020/8/23.
-//  Copyright © 2020 liuming. All rights reserved.
-//
-
-import UIKit
-// 箭头方向枚举
-public enum ArrowDirection: Int {
-    case right = 0 // 指向右边, 即在圆角矩形的右边
-    case bottom = 1 // 指向下边
-    case left = 2 // 指向左边
-    case top = 3 // 指向上边
-}
-
-class NXBubbleLayer: NSObject {
-    // 矩形的圆角的半径
-    var cornerRadius: CGFloat = 8
-    // 箭头位置的圆角半径
-    var arrowRadius: CGFloat = 3
-    // 箭头的高度
-    var arrowHeight: CGFloat = 12
-    // 箭头的宽度
-    var arrowWidth: CGFloat = 30
-    // 箭头方向
-    var arrowDirection: ArrowDirection = .bottom
-    // 箭头的相对位置
-    var arrowPosition: CGFloat = 0.5
-    // 这里的size是需要mask成气泡形状的view的size
-    public var size: CGSize = CGSize.zero
-
-    /// 气泡layer 在视图层的位置
-    public var bubbleLayerRect: CGRect = .zero
-
-    init(originalSize: CGSize) {
-        size = originalSize
-    }
-
-    // 最终拿这个layer去设置mask
-    func layer() -> CAShapeLayer {
-        let layer = CAShapeLayer()
-        layer.path = bubblePath()
-        return layer
-    }
-
-    // 绘制气泡形状,获取path
-    func bubblePath() -> CGPath? {
-        UIGraphicsBeginImageContextWithOptions(size, false, 0.0)
-        let ctx = UIGraphicsGetCurrentContext()
-
-        // 获取绘图所需要的关键点
-        let points = keyPoints()
-
-        // 第一步是要画箭头的“第一个支点”所在的那个角,所以要把“笔”放在这个支点顺时针顺序的上一个点
-        // 所以把“笔”放在最后才画的矩形框的角的位置, 准备开始画箭头
-        let currentPoint = points[6]
-        ctx?.move(to: currentPoint)
-
-        // 用于 CGContextAddArcToPoint函数的变量
-        var pointA = CGPoint.zero
-        var pointB = CGPoint.zero
-        var radius: CGFloat = 0
-        var count: Int = 0
-
-        while count < 7 {
-            // 整个过程需要画七个圆角(矩形框的四个角和箭头处的三个角),所以分为七个步骤
-
-            // 箭头处的三个圆角和矩形框的四个圆角不一样
-            radius = count < 3 ? arrowRadius : cornerRadius
-
-            pointA = points[count]
-            pointB = points[(count + 1) % 7]
-            // 画矩形框最后一个角的时候,pointB就是points[0]
-
-            ctx?.addArc(tangent1End: pointA, tangent2End: pointB, radius: radius)
-
-            count = count + 1
-        }
-
-        ctx?.closePath()
-        UIGraphicsEndImageContext()
-
-        return ctx?.path?.copy()
-    }
-
-    // 关键点: 绘制气泡形状前,需要计算箭头的三个点和矩形的四个角的点的坐标
-    func keyPoints() -> [CGPoint] {
-        // 先确定箭头的三个点
-        var beginPoint = CGPoint.zero // 按顺时针画箭头时的第一个支点,例如箭头向上时的左边的支点
-        var topPoint = CGPoint.zero // 顶点
-        var endPoint = CGPoint.zero // 另外一个支点
-
-        // 箭头顶点topPoint的X坐标(或Y坐标)的范围(用来计算arrowPosition)
-        let tpXRange = size.width - 2 * cornerRadius - arrowWidth
-        let tpYRange = size.height - 2 * cornerRadius - arrowWidth
-
-        // 用于表示矩形框的位置和大小
-        var rX: CGFloat = 0
-        var rY: CGFloat = 0
-        var rWidth = size.width
-        var rHeight = size.height
-
-        // 计算箭头的位置,以及调整矩形框的位置和大小
-        switch arrowDirection {
-        case .right: // 箭头在右时
-            topPoint = CGPoint(x: size.width, y: size.height / 2 + tpYRange * (arrowPosition - 0.5))
-            beginPoint = CGPoint(x: topPoint.x - arrowHeight, y: topPoint.y - arrowWidth / 2)
-            endPoint = CGPoint(x: beginPoint.x, y: beginPoint.y + arrowWidth)
-
-            rWidth = rWidth - arrowHeight // 矩形框右边的位置“腾出”给箭头
-
-        case .bottom: // 箭头在下时
-            topPoint = CGPoint(x: size.width / 2 + tpXRange * (arrowPosition - 0.5), y: size.height)
-            beginPoint = CGPoint(x: topPoint.x + arrowWidth / 2, y: topPoint.y - arrowHeight)
-            endPoint = CGPoint(x: beginPoint.x - arrowWidth, y: beginPoint.y)
-
-            rHeight = rHeight - arrowHeight
-
-        case .left: // 箭头在左时
-            topPoint = CGPoint(x: 0, y: size.height / 2 + tpYRange * (arrowPosition - 0.5))
-            beginPoint = CGPoint(x: topPoint.x + arrowHeight, y: topPoint.y + arrowWidth / 2)
-            endPoint = CGPoint(x: beginPoint.x, y: beginPoint.y - arrowWidth)
-
-            rX = arrowHeight
-            rWidth = rWidth - arrowHeight
-
-        case .top: // 箭头在上时
-            topPoint = CGPoint(x: size.width / 2 + tpXRange * (arrowPosition - 0.5), y: 0)
-            beginPoint = CGPoint(x: topPoint.x - arrowWidth / 2, y: topPoint.y + arrowHeight)
-            endPoint = CGPoint(x: beginPoint.x + arrowWidth, y: beginPoint.y)
-
-            rY = arrowHeight
-            rHeight = rHeight - arrowHeight
-
-        default:
-            ()
-        }
-        bubbleLayerRect = CGRect(x: rX, y: rY, width: rWidth, height: rHeight)
-        // 先把箭头的三个点放进关键点数组中
-        var points = [beginPoint, topPoint, endPoint]
-
-        // 确定圆角矩形的四个点
-        let bottomRight = CGPoint(x: rX + rWidth, y: rY + rHeight) // 右下角的点
-        let bottomLeft = CGPoint(x: rX, y: rY + rHeight)
-        let topLeft = CGPoint(x: rX, y: rY)
-        let topRight = CGPoint(x: rX + rWidth, y: rY)
-
-        // 先放在一个临时数组, 放置顺序跟下面紧接着的操作有关
-        let rectPoints = [bottomRight, bottomLeft, topLeft, topRight]
-
-        // 绘制气泡形状的时候,从箭头开始,顺时针地进行
-        // 箭头向右时,画完箭头之后会先画到矩形框的右下角
-        // 所以此时先把矩形框右下角的点放进关键点数组,其他三个点按顺时针方向添加
-        // 箭头在其他方向时,以此类推
-
-        var rectPointIndex: Int = arrowDirection.rawValue
-        for _ in 0...3 {
-            points.append(rectPoints[rectPointIndex])
-            rectPointIndex = (rectPointIndex + 1) % 4
-        }
-
-        return points
-    }
-}

+ 0 - 23
BFFramework/Classes/BFModules/BFCustomViews/views/bubbleLayer/NXContainView.swift

@@ -1,23 +0,0 @@
-//
-//  NXContainView.swift
-//  bubbleLayer_swift
-//
-//  Created by liuming on 2020/9/1.
-//  Copyright © 2020 liuming. All rights reserved.
-//
-
-import UIKit
-public class NXBubbleContainView: UIView {
-    override public func hitTest(_ point: CGPoint, with event: UIEvent?) -> UIView? {
-        var view = super.hitTest(point, with: event)
-        if view == nil {
-            subviews.forEach { subView in
-                let p = subView.convert(point, from: self)
-                if subView.bounds.contains(p) {
-                    view = subView
-                }
-            }
-        }
-        return view
-    }
-}

+ 0 - 73
BFFramework/Classes/BFModules/BFCustomViews/views/bubbleLayer/NXInteractiveView.swift

@@ -1,73 +0,0 @@
-//
-//  NXInteractiveView.swift
-//  bubbleLayer_swift
-//
-//  Created by liuming on 2020/8/23.
-//  Copyright © 2020 liuming. All rights reserved.
-//
-
-import UIKit
-public class NXInteractiveView: UIView {
-    public var tapGestureRecognizer: UITapGestureRecognizer?
-    public var longPressGestureRecognizer: UILongPressGestureRecognizer?
-    // 点击回调
-    public var tapGestureHander: (() -> Void)?
-    // 长按回调
-    public var longPressGestureHander: (() -> Void)?
-
-    override public init(frame: CGRect) {
-        super.init(frame: frame)
-        addTagGestureRecognizer()
-        addLongGestureRecogizer()
-    }
-
-    required init?(coder _: NSCoder) {
-        fatalError("init(coder:) has not been implemented")
-    }
-
-    // 单机方法
-    private func addTagGestureRecognizer() {
-        let tap = UITapGestureRecognizer(target: self, action: #selector(tapGestureRecognizerHandler(sender:)))
-        tap.numberOfTouchesRequired = 1
-        tap.numberOfTapsRequired = 1
-        addGestureRecognizer(tap)
-        tapGestureRecognizer = tap
-    }
-
-    @objc
-    public func tapGestureRecognizerHandler(sender _: UITapGestureRecognizer) {
-        print("---- tapGestureRecognizerHandler -----")
-        if tapGestureHander != nil {
-            tapGestureHander!()
-        }
-    }
-
-    // 长按事件
-    private func addLongGestureRecogizer() {
-        let longPressGestureRecognizer = UILongPressGestureRecognizer(target: self, action: #selector(longGestureRecognizerHandler(sender:)))
-        longPressGestureRecognizer.numberOfTapsRequired = 1
-        longPressGestureRecognizer.numberOfTouchesRequired = 1
-        addGestureRecognizer(longPressGestureRecognizer)
-        self.longPressGestureRecognizer = longPressGestureRecognizer
-    }
-
-    @objc
-    public func longGestureRecognizerHandler(sender _: UILongPressGestureRecognizer) {
-        print("---- longGestureRecognizerHandler -----")
-        if longPressGestureHander != nil {
-            longPressGestureHander!()
-        }
-    }
-
-    public func removeTapGestureRecognizer() {
-        if let tap = tapGestureRecognizer {
-            removeGestureRecognizer(tap)
-        }
-    }
-
-    public func removeLongPressGestureRecognizer() {
-        if let long = longPressGestureRecognizer {
-            removeGestureRecognizer(long)
-        }
-    }
-}

+ 0 - 80
BFFramework/Classes/BFModules/BFCustomViews/views/bubbleLayer/NXNormalBubbleView.swift

@@ -1,80 +0,0 @@
-//
-//  NXBaseBubbleView.swift
-//  bubbleLayer_swift
-//
-//  Created by liuming on 2020/8/23.
-//  Copyright © 2020 liuming. All rights reserved.
-//
-
-import Foundation
-import UIKit
-public class NXNormalBubbleView: NXInteractiveView {
-    let bubbleLayer = NXBubbleLayer(originalSize: .zero)
-    var currentLayer: CALayer?
-    /// 内部内容控件
-    public var containView = NXBubbleContainView(frame: .zero)
-
-    // 矩形的圆角的半径
-    public var cornerRadius: CGFloat = 8
-    // 箭头位置的圆角半径
-    public var arrowRadius: CGFloat = 3
-    // 箭头的高度
-    public var arrowHeight: CGFloat = 12
-    // 箭头的宽度
-    public var arrowWidth: CGFloat = 30
-    // 箭头方向
-    public var arrowDirection: ArrowDirection = .bottom
-    // 箭头的相对位置
-    public var arrowPosition: CGFloat = 0.5
-
-    public var bubbleColor: UIColor = .white {
-        didSet {
-            self.setNeedsLayout()
-            self.layoutIfNeeded()
-        }
-    }
-
-    override public init(frame: CGRect) {
-        super.init(frame: frame)
-        addSubview(containView)
-    }
-
-    required init?(coder _: NSCoder) {
-        fatalError("init(coder:) has not been implemented")
-    }
-
-    override public func layoutSubviews() {
-        super.layoutSubviews()
-        if let layer = currentLayer {
-            layer.removeFromSuperlayer()
-        }
-        bubbleLayer.size = frame.size
-        bubbleLayer.cornerRadius = cornerRadius
-        bubbleLayer.arrowRadius = arrowRadius
-        bubbleLayer.arrowHeight = arrowHeight
-        bubbleLayer.arrowWidth = arrowWidth
-        bubbleLayer.arrowDirection = arrowDirection
-        bubbleLayer.arrowPosition = arrowPosition
-        let layer = bubbleLayer.layer()
-        layer.fillColor = bubbleColor.cgColor
-        self.layer.insertSublayer(layer, at: 0)
-        currentLayer = layer
-        // 调整 contain坐标
-        containView.frame = bubbleLayer.bubbleLayerRect
-
-        backgroundColor = .clear
-        containView.backgroundColor = .clear
-    }
-
-    // MARK: - 重写交互层的长按和点击事件
-
-    override public func tapGestureRecognizerHandler(sender: UITapGestureRecognizer) {
-        super.tapGestureRecognizerHandler(sender: sender)
-        print("点击了普通气泡")
-    }
-
-    override public func longGestureRecognizerHandler(sender: UILongPressGestureRecognizer) {
-        super.longGestureRecognizerHandler(sender: sender)
-        print("长按了 点击了普通气泡")
-    }
-}

+ 0 - 40
BFFramework/Classes/BFModules/BFCustomViews/views/bubbleLayer/NXTextBubbleView.swift

@@ -1,40 +0,0 @@
-//
-//  NXTextBubbleView.swift
-//  bubbleLayer_swift
-//
-//  Created by liuming on 2020/8/23.
-//  Copyright © 2020 liuming. All rights reserved.
-//
-
-import SnapKit
-import UIKit
-
-class NXTextBubbleView: NXNormalBubbleView {
-    public let textLabel = UILabel(frame: .zero)
-
-    override init(frame: CGRect) {
-        super.init(frame: frame)
-        initSubViews()
-    }
-
-    required init?(coder _: NSCoder) {
-        fatalError("init(coder:) has not been implemented")
-    }
-
-    private func initSubViews() {
-        containView.addSubview(textLabel)
-        textLabel.snp.makeConstraints { make in
-            make.edges.equalTo(UIEdgeInsets(top: 0, left: 5, bottom: 0, right: 5))
-        }
-    }
-
-    // MARK: - 重写交互层的长按和点击事件
-
-    override public func tapGestureRecognizerHandler(sender _: UITapGestureRecognizer) {
-        print("点击了文字气泡")
-    }
-
-    override public func longGestureRecognizerHandler(sender _: UILongPressGestureRecognizer) {
-        print("长按了 点击了文字气泡")
-    }
-}

+ 0 - 184
BFFramework/Classes/BFModules/BFCustomViews/views/bubbleLayer/NXVoiceBubbleView.swift

@@ -1,184 +0,0 @@
-//
-//  NXVoiceBubbleView.swift
-//  bubbleLayer_swift
-//
-//  Created by liuming on 2020/8/23.
-//  Copyright © 2020 liuming. All rights reserved.
-//
-
-import UIKit
-public class NXVoiceBubbleView: NXNormalBubbleView {
-    /// 关闭按钮
-    private let closeBtn = UIButton(type: .custom)
-    /// 声音图片
-    private let voiceImgView = UIImageView(frame: .zero)
-
-    /// 语音时间文本
-    public let durationLabel = UILabel(frame: .zero)
-    /// 语音图片序列帧动画时间
-    public var animationDuration: TimeInterval = 0.5 {
-        didSet {
-            self.initVoiceAnimation()
-        }
-    }
-
-    // 加载圈
-    lazy var activityIndicator: UIActivityIndicatorView = {
-        let activityIndicator: UIActivityIndicatorView = UIActivityIndicatorView(style:
-            .gray)
-        return activityIndicator
-    }()
-
-    /// 语音图片帧图片
-    public var animationImages: [UIImage] = Array() {
-        didSet {
-            initVoiceAnimation()
-        }
-    }
-
-    /// 语音图片动画重复次数
-    public var animationRepeatCount: Int = 1 {
-        didSet {
-            initVoiceAnimation()
-        }
-    }
-
-    /// 音频显示的总时间
-    public var duration: Float64 = 0 {
-        didSet {
-            showTime()
-            activityIndicatorStop()
-        }
-    }
-
-    public var closeBtnClickedHander: (() -> Void)?
-    override public init(frame: CGRect) {
-        super.init(frame: frame)
-        initSubviews()
-    }
-
-    required init?(coder _: NSCoder) {
-        fatalError("init(coder:) has not been implemented")
-    }
-
-    private func initSubviews() {
-        containView.addSubview(voiceImgView)
-        voiceImgView.image = UIImage(named: "icon_voice")
-
-        containView.addSubview(durationLabel)
-
-        closeBtn.setImage(UIImage(named: "videomk_serach_clear"), for: .normal)
-        closeBtn.setImage(UIImage(named: "videomk_serach_clear"), for: .highlighted)
-        closeBtn.addTarget(self, action: #selector(closeBtnClicked(sender:)), for: .touchUpInside)
-        containView.addSubview(closeBtn)
-
-        containView.addSubview(activityIndicator)
-
-        // 布局
-        voiceImgView.snp.makeConstraints { maker in
-            maker.centerY.equalTo(self.containView)
-            maker.left.equalTo(self.containView).offset(10)
-            maker.width.height.equalTo(20)
-        }
-        durationLabel.snp.makeConstraints { maker in
-            maker.right.equalTo(self.containView).offset(-10)
-            maker.centerY.equalTo(self.containView)
-            maker.height.equalTo(20)
-        }
-        closeBtn.snp.makeConstraints { maker in
-
-            maker.right.equalTo(self.containView).offset(10)
-            maker.top.equalTo(self.containView).offset(-8)
-            maker.width.height.equalTo(20)
-        }
-
-        activityIndicator.snp.makeConstraints { maker in
-
-            maker.right.equalTo(self.containView).offset(-10)
-            maker.centerY.equalTo(self.containView)
-            maker.height.equalTo(20)
-        }
-    }
-
-    private func showTime() {
-        durationLabel.text = duration < 1 ? "1'" : duration.formatDurationToMS()
-    }
-
-    private func initVoiceAnimation() {
-        if animationImages.count > 0 {
-            voiceImgView.animationImages = animationImages
-            voiceImgView.animationDuration = animationDuration
-            voiceImgView.animationRepeatCount = animationRepeatCount
-        }
-    }
-
-    /// 加载圈开始动画
-    public func activityIndicatorStart() {
-        durationLabel.text = ""
-        activityIndicator.startAnimating()
-    }
-
-    /// 加载圈结束动画
-    public func activityIndicatorStop() {
-        activityIndicator.stopAnimating()
-    }
-
-    /// 开始动画
-    public func startAnimation() {
-        voiceImgView.startAnimating()
-    }
-
-    /// 结束动画
-    public func stopAnimation() {
-        voiceImgView.stopAnimating()
-    }
-
-    /// 按照中心点抖动
-    func animation() {
-        let animati = CAKeyframeAnimation(keyPath: "transform.rotation")
-        // rotation 旋转,需要添加弧度值
-        // 角度转弧度
-        animati.values = [angle2Radion(angle: -50), angle2Radion(angle: 50), angle2Radion(angle: -50)]
-        animati.repeatCount = 4
-        layer.add(animati, forKey: nil)
-    }
-
-    // MARK: - 重写交互层的长按和点击事件
-
-    override public func tapGestureRecognizerHandler(sender: UITapGestureRecognizer) {
-        super.tapGestureRecognizerHandler(sender: sender)
-        startAnimation()
-        print("点击了语音气泡")
-    }
-
-    override public func longGestureRecognizerHandler(sender: UILongPressGestureRecognizer) {
-        super.longGestureRecognizerHandler(sender: sender)
-        print("长按了 点击了语音气泡")
-        animation()
-    }
-
-    func angle2Radion(angle: Float) -> Float {
-        return angle / Float(180.0 * Double.pi)
-    }
-
-    // MARK: 关闭按钮点击事件
-
-    @objc
-    func closeBtnClicked(sender _: UIButton) {
-        print("点击了关闭按钮")
-        if let block = closeBtnClickedHander {
-            block()
-        }
-    }
-
-    override public func point(inside point: CGPoint, with _: UIEvent?) -> Bool {
-        if bounds.contains(point) {
-            return true
-        }
-        let p = convert(point, to: closeBtn)
-        if closeBtn.bounds.contains(p) {
-            return true
-        }
-        return false
-    }
-}

+ 43 - 59
BFFramework/Classes/PQGPUImage/akfilters/PQImageFilter.swift

@@ -20,46 +20,39 @@ open class PQImageFilter: PQBaseFilter {
     deinit {
         BFLog(1, message: "image filter deinit 析构掉~")
         newImage = nil
-        
+
         if imageTexture != 0 {
             glDeleteTextures(1, &imageTexture)
             imageTexture = 0
         }
-        if(imageVertexBuffer != 0){
+        if imageVertexBuffer != 0 {
             PQGPUImageTools.deleteVBO(imageVertexBuffer)
             imageVertexBuffer = 0
         }
-   
-        
     }
-    
+
     init(sticker: PQEditVisionTrackMaterialsModel, isExport: Bool = true, showUISize: CGSize = .zero) {
         super.init(fragmentShader: PassthroughFragmentShader, numberOfInputs: 1)
-        
+
         mSticker = sticker
         stickerInfo = sticker
-        
         if mSticker!.locationPath.count == 0 {
             BFLog(2, message: "图片数据为空,创建失败")
             return
         }
-        //        print("mSticker path : \(String(describing: mSticker!.locationPath))")
-        
         newImage = UIImage(contentsOfFile: documensDirectory + sticker.locationPath)
-        //try find image file frome in BFFramework bundle
-        if(newImage == nil){
-            newImage = UIImage.moduleImage(named: sticker.locationPath, moduleName: "BFFramework",isAssets: false)
+        // try find image file frome in BFFramework bundle
+        if newImage == nil {
+            newImage = UIImage.moduleImage(named: sticker.locationPath, moduleName: "BFFramework", isAssets: false)
         }
-        
         // 如果是预览时 对原图进行缩放处理
         if !isExport {
             let maxLength = max(showUISize.width, showUISize.height)
             newImage = newImage?.nx_scaleWithMaxLength(maxLength: CGFloat(maxLength * UIScreen.main.scale))
-            
+
             BFLog(message: "newImage is \(newImage?.size.width ?? 0) \(newImage?.size.height ?? 0)")
-            
         }
-        
+
         autoreleasepool {
             if newImage == nil {
    
@@ -77,27 +70,23 @@ open class PQImageFilter: PQBaseFilter {
                 } else { BFLog(2, message: "文件不存在") }
             }
         }
-        
+
         if newImage?.cgImage != nil {
             BFLog(message: "提前加载图片。。。。timelineIn : \(String(describing: mSticker?.timelineIn)) timelineOut :\(String(describing: mSticker?.timelineOut)) \(String(describing: mSticker?.locationPath))")
-            
+
             //            imageTexture = PQGPUImageTools.setupTexture(image: newImage!.cgImage!)
-            
+
         } else { BFLog(2, message: "image filter init error image data is nil!") }
-        
-        
+
         // 保证是16的公倍数
-        let aptImageSize =  NXAVUtil.aptSize(newImage!.size)
-        if (!__CGSizeEqualToSize(aptImageSize, newImage!.size))
-        {
+        let aptImageSize = NXAVUtil.aptSize(newImage?.size ?? CGSize.zero)
+        if !__CGSizeEqualToSize(aptImageSize, newImage?.size ?? CGSize.zero) {
             BFLog(2, message: "原图大小宽度不是16的倍数 \(newImage!.size)")
             //            newImage = newImage?.nx_scaleToSize(size: aptImageSize)
             BFLog(2, message: "归16后大小 \(newImage!.size)")
-            
         }
-        
     }
-    
+
     //    override public func newFramebufferAvailable(_ framebuffer: Framebuffer, fromSourceIndex: UInt) {
     //        super.newFramebufferAvailable(framebuffer, fromSourceIndex: fromSourceIndex)
     //
@@ -109,49 +98,48 @@ open class PQImageFilter: PQBaseFilter {
     ////            } else { BFLog(message: "image filter init error image data is nil!") }
     ////        }
     //    }
-    
-    open override func renderFrame() {
+
+    override open func renderFrame() {
         let inputFramebuffer: Framebuffer = inputFramebuffers[0]!
         let inputSize = inputFramebuffer.sizeForTargetOrientation(.portrait)
-        
+
         //        print("renderFrame timestamp is \(inputFramebuffer.timingStyle)")
-        
+
         let currTime = CMTimeGetSeconds(CMTime(value: inputFramebuffer.timingStyle.timestamp!.value, timescale: inputFramebuffer.timingStyle.timestamp!.timescale))
-        
+
         renderFramebuffer = sharedImageProcessingContext.framebufferCache.requestFramebufferWithProperties(orientation: .portrait, size: inputSize, stencil: false)
-        
+
         // 画布
         let textureProperties = InputTextureProperties(textureCoordinates: inputFramebuffer.orientation.rotationNeededForOrientation(.portrait).textureCoordinates(), texture: inputFramebuffer.texture)
-        
+
         renderFramebuffer.activateFramebufferForRendering()
         clearFramebufferWithColor(Color.white)
         renderQuadWithShader(shader, uniformSettings: uniformSettings,
                              vertexBufferObject: sharedImageProcessingContext.standardImageVBO, inputTextures: [textureProperties])
         releaseIncomingFramebuffers()
-        
+
         if newImage == nil {
             BFLog(2, message: "图片数据有错误!!!! 检查数据\(mSticker!.locationPath)")
             return
         }
-        
+
         BFLog(2, message: " image filter 当前时间: \(currTime) \(newImage!.size)")
-        
+
         if currTime >= mSticker!.timelineIn && currTime <= mSticker!.timelineOut {
             BFLog(2, message: " 显示图片当前时间: \(currTime) 开始时间:\(mSticker!.timelineIn) 结束时间:\(mSticker!.timelineOut)  \(String(describing: newImage?.size))")
             // 取纹理坐标
             var textureCoordinates = PQGPUImageTools.getTextureCoordinates(sticker: mSticker!, textureSize: newImage!.size, cannvasSize: inputSize)
-            
-            BFLog(2, message: "textureCoordinates is \(textureCoordinates) image size :\(newImage!.size ) cannvasSize:\(inputSize)  files path is \(mSticker?.locationPath)")
-            
+
+            BFLog(2, message: "textureCoordinates is \(textureCoordinates) image size :\(newImage!.size) cannvasSize:\(inputSize)  files path is \(mSticker?.locationPath)")
+
             // imageTexture 有可能被析构导致黑屏
             if imageTexture == 0 && newImage?.cgImage != nil {
                 BFLog(2, message: "imageTexture is error !!!!!重新创建")
                 imageTexture = PQGPUImageTools.setupTexture(image: newImage!.cgImage!)
             }
-            
-            
-            //如果设置过大小位置,使用设置值,比如水印
-            if(stickerInfo?.materialPosition?.width != 0){
+
+            // 如果设置过大小位置,使用设置值,比如水印
+            if stickerInfo?.materialPosition?.width != 0 {
                 textureCoordinates = [
                     0.0, 0.0, // 1 bottom left
                     1.0, 0.0, // 2 bottom right
@@ -159,36 +147,32 @@ open class PQImageFilter: PQBaseFilter {
                     1.0, 1.0, // 4 top right
                 ]
             }
-            
+
             let texturePropertiesimagetwo = InputTextureProperties(textureCoordinates: textureCoordinates, texture: imageTexture)
-            
+
             var verticesPoint: [GLfloat] = PQGPUImageTools.getVerticesPoint(sticker: mSticker!, textureSize: newImage!.size, cannvasSize: inputSize)
-            
-            //如果设置过大小位置,使用设置值,比如水印
-            if(stickerInfo?.materialPosition?.width != 0){
-                verticesPoint = PQGPUImageTools.computeVertices(viewSize: CGSize.init(width: CGFloat(inputSize.width), height: CGFloat(inputSize.height)), _bounds: CGRect.init(x: stickerInfo?.materialPosition?.x ?? 0, y:  stickerInfo?.materialPosition?.y ?? 0, width: stickerInfo?.materialPosition?.width ?? 0, height: stickerInfo?.materialPosition?.height ?? 0))
+
+            // 如果设置过大小位置,使用设置值,比如水印
+            if stickerInfo?.materialPosition?.width != 0 {
+                verticesPoint = PQGPUImageTools.computeVertices(viewSize: CGSize(width: CGFloat(inputSize.width), height: CGFloat(inputSize.height)), _bounds: CGRect(x: stickerInfo?.materialPosition?.x ?? 0, y: stickerInfo?.materialPosition?.y ?? 0, width: stickerInfo?.materialPosition?.width ?? 0, height: stickerInfo?.materialPosition?.height ?? 0))
             }
-            
+
             // 设置融合模式支持 alpha
             glEnable(GLenum(GL_DEPTH_TEST))
             glEnable(GLenum(GL_BLEND))
             glBlendFunc(GLenum(GL_SRC_ALPHA), GLenum(GL_ONE_MINUS_SRC_ALPHA))
-            
+
             imageVertexBuffer = PQGPUImageTools.NXGenerateVBO(for: verticesPoint)
-            
+
             renderQuadWithShader(shader,
                                  uniformSettings: uniformSettings,
                                  vertexBufferObject: imageVertexBuffer, inputTextures: [texturePropertiesimagetwo])
             releaseIncomingFramebuffers()
-            
-            if(imageVertexBuffer != 0){
+
+            if imageVertexBuffer != 0 {
                 PQGPUImageTools.deleteVBO(imageVertexBuffer)
                 imageVertexBuffer = 0
             }
-            
-        
         }
-        
-        
     }
 }

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

@@ -2035,7 +2035,7 @@ extension PQStuckPointEditerController {
                 lastSpeedSelectIndex = 0
             }
             
-            // 如果是再创作进来的原视频的模式
+            // 如果是再创作进来的原视频的模式
             if reCreateVideoData != nil {
                 BFLog(message: "是再创作进来的 \(reCreateVideoData!.rhythmMode)")
                 switch reCreateVideoData!.rhythmMode {
@@ -2081,7 +2081,7 @@ extension PQStuckPointEditerController {
                     editModelClick(sender: speedStuckBtn, reportLog: false)
 
                 } else {
-                    // 默认进入卡点模式
+                    // 默认进入跳跃卡点模式
                     editModelClick(sender: jumpPointBtn, reportLog: false)
 
                 }

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

@@ -311,7 +311,10 @@ public class PQStuckPointMaterialController: PQBaseViewController {
     }
 
     deinit {
+        photoMaterialVc.assetCollection = nil
+        photoMaterialVc.allPhotos = nil
         PQNotification.removeObserver(self)
+        BFLog(message: "\(self) 已销毁")
     }
 
     /// 图库选择的回调

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

@@ -67,14 +67,14 @@ class PQStuckPointMusicContentController: PQBaseViewController {
         }
         // 延迟scrollView上子视图的响应,所以当直接拖动UISlider时,如果此时touch时间在150ms以内,UIScrollView会认为是拖动自己,从而拦截了event,导致UISlider接收不到滑动的event
         collectionView.delaysContentTouches = false
-        collectionView.addRefreshView (type:.REFRESH_TYPE_FOOTER) {[weak self] isRefresh in
+        collectionView.addRefreshView (type:.REFRESH_TYPE_FOOTER) {[weak self, weak collectionView] isRefresh in
             if !isRefresh && self?.contentType != .catagery{
                 // 请求一下加载更多
                 if self?.refreshHandle != nil {
                     self?.refreshHandle!(isRefresh, self?.contentType ?? .catagery)
                 }
             }else{
-                collectionView.mj_footer?.endRefreshing()
+                collectionView?.mj_footer?.endRefreshing()
             }
         }
         return collectionView

+ 1 - 0
BFFramework/Classes/Stuckpoint/View/PQCustomSpeedSettingView.swift

@@ -6,6 +6,7 @@
 //  功能:自定义速度界面
 
 import Foundation
+import BFCommonKit
 
 class PQCustomSpeedSettingView: UIView {
     // 左上角返回

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

@@ -71,15 +71,15 @@ class PQStuckPointLoadingView: UIView {
         if self.superview != nil {
             return
         }
- 
+        UIApplication.shared.keyWindow?.addSubview(self)
+        loadingView.startAnimating()
+
     }
 
     /// 移除视图
     /// - Returns: <#description#>
     func removeMarskView() {
         loadingView.stopAnimating()
-        loadingView.layer.removeAllAnimations()
-        loadingView.removeFromSuperview()
      
         if self.superview != nil {
             removeFromSuperview()            

+ 8 - 8
BFFramework/Classes/selectImage/PQUploadController.swift

@@ -539,20 +539,20 @@ extension PQUploadController: UICollectionViewDelegate, UICollectionViewDataSour
                 cell.uploadData = itemData
                 if itemData.image == nil, itemData.asset != nil {
                     cell.representedAssetIdentifier = itemData.asset?.localIdentifier
-                    imageManager.requestImage(for: itemData.asset!, targetSize: itemSize, contentMode: .aspectFill, options: nil) { image, info in
-                        if info?.keys.contains("PHImageResultIsDegradedKey") ?? false, "\(info?["PHImageResultIsDegradedKey"] ?? "0")" == "0", cell.representedAssetIdentifier == itemData.asset?.localIdentifier {
+                    imageManager.requestImage(for: itemData.asset!, targetSize: itemSize, contentMode: .aspectFill, options: nil) {[weak self, weak cell] image, info in
+                        if info?.keys.contains("PHImageResultIsDegradedKey") ?? false, "\(info?["PHImageResultIsDegradedKey"] ?? "0")" == "0", cell?.representedAssetIdentifier == itemData.asset?.localIdentifier {
                             if image != nil {
                                 itemData.image = image
-                                cell.videoImageView.image = image
+                                cell?.videoImageView.image = image
                             } else if image == nil, info?.keys.contains("PHImageResultIsInCloudKey") ?? false {
                                 let option = PHImageRequestOptions()
                                 option.isNetworkAccessAllowed = true
                                 option.resizeMode = .fast
-                                self.imageManager.requestImageData(for: itemData.asset!, options: option) { data, _, _, _ in
+                                self?.imageManager.requestImageData(for: itemData.asset!, options: option) { [weak cell] data, _, _, _ in
                                     if data != nil {
                                         let image = UIImage(data: data!)
                                         itemData.image = image
-                                        cell.videoImageView.image = image
+                                        cell?.videoImageView.image = image
                                     }
                                 }
                             }
@@ -569,10 +569,10 @@ extension PQUploadController: UICollectionViewDelegate, UICollectionViewDataSour
             let asset = itemData.categoryList.object(at: 0)
             if itemData.image == nil {
                 cell.representedAssetIdentifier = asset.localIdentifier
-                imageManager.requestImage(for: asset, targetSize: itemSize, contentMode: .aspectFill, options: nil) { image, info in
-                    if info?.keys.contains("PHImageResultIsDegradedKey") ?? false, "\(info?["PHImageResultIsDegradedKey"] ?? "0")" == "0", cell.representedAssetIdentifier == asset.localIdentifier {
+                imageManager.requestImage(for: asset, targetSize: itemSize, contentMode: .aspectFill, options: nil) { [weak cell] image, info in
+                    if info?.keys.contains("PHImageResultIsDegradedKey") ?? false, "\(info?["PHImageResultIsDegradedKey"] ?? "0")" == "0", cell?.representedAssetIdentifier == asset.localIdentifier {
                         itemData.image = image
-                        cell.uploadData = itemData
+                        cell?.uploadData = itemData
                     }
                 }
             } else {

+ 3 - 3
Example/Podfile

@@ -5,8 +5,8 @@ platform :ios, '10.0'
 target 'BFFramework_Example' do
   source 'https://git.yishihui.com/iOS/BFSpecs.git'
   source 'https://github.com/CocoaPods/Specs.git'
-  pod 'BFCommonKit', :path => '/Users/sanw/Desktop/BytesFlow/Person/Projects/BFCommonKit/'
-  pod 'BFNetRequestKit', :path => '/Users/sanw/Desktop/BytesFlow/Person/Projects/BFNetRequestKit/'
-  pod 'BFMaterialKit', :path => '/Users/sanw/Desktop/BytesFlow/Person/Projects/BFMaterialKit/'
+#  pod 'BFCommonKit', :path => '/Users/sanw/Desktop/BytesFlow/Person/Projects/BFCommonKit/'
+#  pod 'BFNetRequestKit', :path => '/Users/sanw/Desktop/BytesFlow/Person/Projects/BFNetRequestKit/'
+#  pod 'BFMaterialKit', :path => '/Users/sanw/Desktop/BytesFlow/Person/Projects/BFMaterialKit/'
   pod 'BFFramework', :path => '../'
 end

+ 19 - 24
Example/Podfile.lock

@@ -31,16 +31,16 @@ PODS:
     - KingfisherWebP (= 1.3.0)
     - Toast-Swift (= 5.0.1)
   - BFFramework (1.0.7):
-    - AliyunOSSiOS (= 2.10.10)
+    - AliyunOSSiOS
     - BFCommonKit
     - BFMaterialKit
     - BFNetRequestKit
-    - Bugly (= 2.5.90)
-    - LMJHorizontalScrollText (= 2.0.2)
-    - MJRefresh (= 3.7.2)
-    - ObjectMapper (= 4.2.0)
-    - TXLiteAVSDK_Player (= 9.1.10564)
-    - WechatOpenSDK-Swift (= 1.8.7.1)
+    - Bugly
+    - LMJHorizontalScrollText
+    - MJRefresh
+    - ObjectMapper
+    - TXLiteAVSDK_Player
+    - WechatOpenSDK-Swift
   - BFMaterialKit (0.1.6):
     - BFCommonKit
   - BFNetRequestKit (0.2.3):
@@ -71,16 +71,17 @@ PODS:
     - Realm (= 10.7.6)
   - SnapKit (5.0.1)
   - Toast-Swift (5.0.1)
-  - TXLiteAVSDK_Player (9.1.10564)
+  - TXLiteAVSDK_Player (9.2.10637)
   - WechatOpenSDK-Swift (1.8.7.1)
 
 DEPENDENCIES:
-  - BFCommonKit (from `/Users/sanw/Desktop/BytesFlow/Person/Projects/BFCommonKit/`)
   - BFFramework (from `../`)
-  - BFMaterialKit (from `/Users/sanw/Desktop/BytesFlow/Person/Projects/BFMaterialKit/`)
-  - BFNetRequestKit (from `/Users/sanw/Desktop/BytesFlow/Person/Projects/BFNetRequestKit/`)
 
 SPEC REPOS:
+  https://git.yishihui.com/iOS/BFSpecs.git:
+    - BFCommonKit
+    - BFMaterialKit
+    - BFNetRequestKit
   https://github.com/CocoaPods/Specs.git:
     - Alamofire
     - AliyunOSSiOS
@@ -101,22 +102,16 @@ SPEC REPOS:
     - WechatOpenSDK-Swift
 
 EXTERNAL SOURCES:
-  BFCommonKit:
-    :path: "/Users/sanw/Desktop/BytesFlow/Person/Projects/BFCommonKit/"
   BFFramework:
     :path: "../"
-  BFMaterialKit:
-    :path: "/Users/sanw/Desktop/BytesFlow/Person/Projects/BFMaterialKit/"
-  BFNetRequestKit:
-    :path: "/Users/sanw/Desktop/BytesFlow/Person/Projects/BFNetRequestKit/"
 
 SPEC CHECKSUMS:
   Alamofire: e447a2774a40c996748296fa2c55112fdbbc42f9
   AliyunOSSiOS: b8f1dfc229cd9abf68c8ee0cb245c2d66e00dd96
-  BFCommonKit: 61380c2c5d74333d4a60fe52a3321c937b2a1f06
-  BFFramework: 8f1f60ab704eeb51a4da6828588f8da24ab85faa
-  BFMaterialKit: 920e502d41b995c9959199e513b64ae780f52ae5
-  BFNetRequestKit: 5743bcafb3f70502137780461b53d71c05b1d01e
+  BFCommonKit: ae9792ba766f4fad177cd826554a4f6feab5f9cd
+  BFFramework: c821f4a61057287a3c60ea3ce7498ccf57542de1
+  BFMaterialKit: ee4db6e76fdb94af810bc2d098a58ec15e18b2bf
+  BFNetRequestKit: 2af2279251e5304f34ca02771f74328f62fa7b6f
   Bugly: 88bc32c0acc6fef7b74d610f0319ee7560d6b9fe
   FDFullscreenPopGesture: a8a620179e3d9c40e8e00256dcee1c1a27c6d0f0
   KeychainAccess: c0c4f7f38f6fc7bbe58f5702e25f7bd2f65abf51
@@ -130,9 +125,9 @@ SPEC CHECKSUMS:
   RealmSwift: e31c4ddbcc42ac879313d656b86f9ca539f6f4f4
   SnapKit: 97b92857e3df3a0c71833cce143274bf6ef8e5eb
   Toast-Swift: 9b6a70f28b3bf0b96c40d46c0c4b9d6639846711
-  TXLiteAVSDK_Player: b4e91267f601a9cadf265ed4a903816e995ba57a
+  TXLiteAVSDK_Player: 300e6fc7262ae095ee13b18d7d821c5fae0996f9
   WechatOpenSDK-Swift: 18a8f7b12e745c30acc013f72a9f8a25aad6e216
 
-PODFILE CHECKSUM: 0566a3fccd1ba8303834811529466910b942b3bf
+PODFILE CHECKSUM: a70d2c425de0713c3557fd13b3dec4e634e32f2a
 
-COCOAPODS: 1.10.2
+COCOAPODS: 1.11.2