Browse Source

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

jsonwang 3 years ago
parent
commit
6b3cb710df

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

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