浏览代码

修改参数的数据类型

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)
             }
         }
     }