瀏覽代碼

有事件冲突btn 先使用 touch down 事件

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

+ 3 - 3
BFRecordScreenKit/Classes/RecordScreen/Controller/BFRecordScreenController.swift

@@ -395,7 +395,7 @@ public class BFRecordScreenController: BFBaseViewController {
         btn.isEnabled = false
         btn.titleLabel?.font = UIFont.systemFont(ofSize: 12)
         btn.contentVerticalAlignment = UIControl.ContentVerticalAlignment.center
-        btn.addTarget(self, action: #selector(withdrawAction), for: .touchUpInside)
+        btn.addTarget(self, action: #selector(withdrawAction), for: .touchDown)
         return btn
     }()
 
@@ -495,7 +495,7 @@ public class BFRecordScreenController: BFBaseViewController {
         let btn = UIButton(type: .custom)
         btn.setImage(imageInRecordScreenKit(by: "flip"), for: .normal)
         btn.titleLabel?.font = UIFont.systemFont(ofSize: 10)
-        btn.addTarget(self, action: #selector(cameraFlipAction), for: .touchUpInside)
+        btn.addTarget(self, action: #selector(cameraFlipAction), for: .touchDown)
         return btn
     }()
     
@@ -507,7 +507,7 @@ public class BFRecordScreenController: BFBaseViewController {
         btn.setImage(imageInRecordScreenKit(by: "addmusic"), for: .normal)
         btn.setTitle("选择音乐", for: .normal)
         btn.titleLabel?.font = UIFont.systemFont(ofSize: 13)
-        btn.addTarget(self, action: #selector(addMusicAction), for: .touchUpInside)
+        btn.addTarget(self, action: #selector(addMusicAction), for: .touchDown)
         return btn
     }()