Browse Source

1.update retryBtn title

wenweiwei 3 năm trước cách đây
mục cha
commit
7d402104ca
1 tập tin đã thay đổi với 6 bổ sung1 xóa
  1. 6 1
      Introduce/Record/INVideoExportController.swift

+ 6 - 1
Introduce/Record/INVideoExportController.swift

@@ -130,6 +130,7 @@ class INVideoExportController: BFBaseViewController {
         let retryBtn = UIButton()
         retryBtn.backgroundColor = ThemeStyleColor
         retryBtn.setTitle("重试", for: .normal)
+        retryBtn.tag = 33001
         retryBtn.setTitleColor(.white, for: .normal)
         retryBtn.addCorner(corner:5)
         retryBtn.addTarget(self, action: #selector(retryAction), for: .touchUpInside)
@@ -235,16 +236,20 @@ class INVideoExportController: BFBaseViewController {
                     // 添加播放进度视图
                     self?.addVideoSliderView()
                 }else {
-                    if let l = sself.errorView.viewWithTag(33000) as? UILabel, let err = error as NSError? {
+                    if let l = sself.errorView.viewWithTag(33000) as? UILabel, let err = error as NSError?,let b = sself.errorView.viewWithTag(33001) as? UIButton {
                         switch err.code {
                         case ExportError.FileNotExist.rawValue :
                             l.text = "原视频/图片文件被删除"
+                            b.setTitle("重新制作", for: .normal)
                         case ExportError.DiskNoSpace.rawValue :
                             l.text = "存储空间不足:" + (err.userInfo["msg"] as! String)
+                            b.setTitle("重试", for: .normal)
                         case ExportError.VoiceLost.rawValue :
                             l.text = "手机录音文件丢失"
+                            b.setTitle("重试", for: .normal)
                         default:
                             l.text = "请重新尝试"
+                            b.setTitle("重试", for: .normal)
                         }
                         l.sizeToFit()
                     }