فهرست منبع

修改参数的数据类型

jsonwang 3 سال پیش
والد
کامیت
1da21c1fc9
1فایلهای تغییر یافته به همراه2 افزوده شده و 2 حذف شده
  1. 2 2
      BFRecordScreenKit/Classes/RecordScreen/View/BFVideoThumbProgressView.swift

+ 2 - 2
BFRecordScreenKit/Classes/RecordScreen/View/BFVideoThumbProgressView.swift

@@ -32,7 +32,7 @@ class BFVideoThumbProgressView: UIView {
                                         iv.clipsToBounds = true
                                         sself.progressView.contentView.addSubview(iv)
                                         iv.snp.makeConstraints { make in
-                                            make.left.equalTo(CGFloat(i) * sself.thumbImageWidth + sself.width * 0.5)
+                                            make.left.equalTo(CGFloat(i) * CGFloat(sself.thumbImageWidth) + sself.width * 0.5)
                                             make.top.bottom.equalToSuperview()
                                             make.height.equalTo(50)
                                             make.width.equalTo(sself.thumbImageWidth)
@@ -73,7 +73,7 @@ class BFVideoThumbProgressView: UIView {
         didSet{
             if let second = self.videoAsset?.duration.seconds, second > 0 {
                 let w = progressView.contentSize.width - width
-                progressView.contentOffset = CGPoint(x: progress * w / second, y: 0)
+                progressView.contentOffset = CGPoint(x: progress * Double(w) / second, y: 0)
             }
         }
     }