|
@@ -1038,6 +1038,11 @@ public class BFRecordScreenController: BFBaseViewController {
|
|
|
}
|
|
|
beginOnStartBtn = false
|
|
|
|
|
|
+ recordBtn.isEnabled = false
|
|
|
+ DispatchQueue.main.asyncAfter(deadline: .now() + 0.25) {[weak self] in
|
|
|
+ self?.recordBtn.isEnabled = true
|
|
|
+ }
|
|
|
+
|
|
|
isRecording = false
|
|
|
// progressThumV.progressView.isUserInteractionEnabled = true
|
|
|
// collectionView.isScrollEnabled = true
|
|
@@ -1063,6 +1068,7 @@ public class BFRecordScreenController: BFBaseViewController {
|
|
|
if !avatarView.isHidden {
|
|
|
avatarView.endRecord()
|
|
|
}
|
|
|
+
|
|
|
}
|
|
|
|
|
|
@objc func cancleRecord() {
|
|
@@ -1961,6 +1967,10 @@ extension BFRecordScreenController: UICollectionViewDelegate, UICollectionViewDa
|
|
|
|
|
|
public func collectionView(_: UICollectionView, didSelectItemAt _: IndexPath) {}
|
|
|
|
|
|
+ public func scrollViewWillBeginDragging(_ scrollView: UIScrollView) {
|
|
|
+ BFLog(1, message: "开始滚动")
|
|
|
+ recordBtn.isEnabled = false
|
|
|
+ }
|
|
|
public func scrollViewDidEndDecelerating(_ scrollView: UIScrollView) {
|
|
|
endScrollItem(scrollView)
|
|
|
}
|
|
@@ -1974,6 +1984,7 @@ extension BFRecordScreenController: UICollectionViewDelegate, UICollectionViewDa
|
|
|
func endScrollItem(_ scrollView: UIScrollView) {
|
|
|
// public func scrollViewDidScroll(_ scrollView: UIScrollView) {
|
|
|
BFLog(1, message: "滚动结束")
|
|
|
+
|
|
|
let page = Int((scrollView.contentOffset.x + scrollView.frame.width / 2) / scrollView.frame.width)
|
|
|
if page != currItemModelIndex {
|
|
|
// 切换素材时先把录制状态切为不可用,延迟可点,避免在缩略图未加载出来时即可录制
|
|
@@ -2038,6 +2049,7 @@ extension BFRecordScreenController: UICollectionViewDelegate, UICollectionViewDa
|
|
|
cell?.contentView.addSubview(subtitleLabel)
|
|
|
updateSubtitle(time: currentAssetProgress)
|
|
|
}
|
|
|
+ recordBtn.isEnabled = true
|
|
|
}
|
|
|
|
|
|
public func updateContentOffset(index: Int) {
|