瀏覽代碼

手势保护

harry 3 年之前
父節點
當前提交
edef50d179
共有 1 個文件被更改,包括 4 次插入2 次删除
  1. 4 2
      BFRecordScreenKit/Classes/RecordScreen/Controller/BFRecordScreenController.swift

+ 4 - 2
BFRecordScreenKit/Classes/RecordScreen/Controller/BFRecordScreenController.swift

@@ -173,7 +173,6 @@ public class BFRecordScreenController: BFBaseViewController {
         btn.addCorner(corner: 6)
         btn.adjustsImageWhenHighlighted = false
         btn.addTarget(self, action: #selector(startRecord), for: .touchDown)
-        btn.addTarget(self, action: #selector(endRecord), for: .touchCancel)
         btn.addTarget(self, action: #selector(endRecord), for: .touchUpInside)
 
         return btn
@@ -935,6 +934,8 @@ public class BFRecordScreenController: BFBaseViewController {
             BFLog(message: "录音机初始化错误!!!")
             return
         }
+        
+        view.isUserInteractionEnabled = false
 
         let model = PQVoiceModel()
         // 开始时间
@@ -973,7 +974,8 @@ public class BFRecordScreenController: BFBaseViewController {
         isRecording = false
         progressThumV.progressView.isUserInteractionEnabled = true
         collectionView.isScrollEnabled = true
-
+        
+        view.isUserInteractionEnabled = true
         recorderManager?.stopRecord(isCancel: false)
 //        changeWithDrawBtnLayout(2)
         /*