Browse Source

手势保护

harry 3 years ago
parent
commit
edef50d179

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

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