|
@@ -17,16 +17,17 @@ class VideoExportController: BFBaseViewController{
|
|
|
var videoAsset : AVURLAsset?
|
|
|
|
|
|
lazy var progressView : UIView = {
|
|
|
- let v = UIView(frame: CGRect(x: 0, y: cDevice_iPhoneStatusBarHei, width: 0, height: 30))
|
|
|
+ let v = UIView(frame: CGRect(x: 0, y: navHeadImageView!.bottomY, width: 0, height: 10))
|
|
|
v.backgroundColor = .red
|
|
|
return v
|
|
|
}()
|
|
|
|
|
|
lazy var progressL : UILabel = {
|
|
|
- let la = UILabel(frame: CGRect(x: 0, y: cDevice_iPhoneStatusBarHei, width: cScreenWidth, height: 30))
|
|
|
+ let la = UILabel(frame: CGRect(x: 0, y: navHeadImageView!.bottomY, width: cScreenWidth, height: 10))
|
|
|
la.textColor = .white
|
|
|
+ la.textAlignment = .center
|
|
|
la.text = "0%"
|
|
|
- la.font = UIFont.systemFont(ofSize: 18)
|
|
|
+ la.font = UIFont.systemFont(ofSize: 8)
|
|
|
return la
|
|
|
}()
|
|
|
|
|
@@ -34,8 +35,8 @@ class VideoExportController: BFBaseViewController{
|
|
|
let export = BFRecordExport()
|
|
|
|
|
|
export.progress = {[weak self] progress in
|
|
|
- self?.progressView.frame = CGRect(x: 0, y: cDevice_iPhoneStatusBarHei, width: (cScreenWidth) * CGFloat(progress), height: 30)
|
|
|
- self?.progressL.text = String(format: "%d", Int(progress*100))
|
|
|
+ self?.progressView.frame = CGRect(x: 0, y: self?.navHeadImageView?.bottomY ?? 0, width: (cScreenWidth) * CGFloat(progress), height: 10)
|
|
|
+ self?.progressL.text = String(format: "%d%%", Int(progress*100))
|
|
|
}
|
|
|
export.exportCompletion = {[weak self] (error, url) in
|
|
|
guard let strongSelf = self else {
|
|
@@ -68,8 +69,11 @@ class VideoExportController: BFBaseViewController{
|
|
|
|
|
|
override func viewDidLoad() {
|
|
|
super.viewDidLoad()
|
|
|
+ view.backgroundColor = .black
|
|
|
+ navHeadImageView?.backgroundColor = .black
|
|
|
+ leftButton(image: nil, imageName: nil, tintColor: UIColor.white)
|
|
|
|
|
|
- let backV = UIView(frame: CGRect(x: 10, y: 100, width: cScreenWidth - 20, height: 30))
|
|
|
+ let backV = UIView(frame: CGRect(x: 0, y: navHeadImageView!.bottomY, width: cScreenWidth, height: 10))
|
|
|
backV.backgroundColor = .gray
|
|
|
view.addSubview(backV)
|
|
|
view.addSubview(progressView)
|