Pārlūkot izejas kodu

录音按钮增加cancel状态,调用endrecord

harry 3 gadi atpakaļ
vecāks
revīzija
e5f300836d

+ 1 - 0
BFRecordScreenKit/Classes/RecordScreen/Controller/BFRecordScreenController.swift

@@ -173,6 +173,7 @@ 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