|
@@ -131,7 +131,13 @@ class CommunityVideoCoverCollectionCell: UICollectionViewCell {
|
|
|
|
|
|
addSubview(playStatusImageView)
|
|
|
|
|
|
- self.addTapGesture(1, target: self, action: #selector(tapView(doubleTap:)))
|
|
|
+
|
|
|
+// self.addTapGesture(1, target: self, action: #selector(tapView(doubleTap:)))
|
|
|
+ let tap = UITapGestureRecognizer(target: self, action: #selector(tapView(doubleTap:)))
|
|
|
+ tap.numberOfTapsRequired = 1
|
|
|
+ tap.delegate = self
|
|
|
+ addGestureRecognizer(tap)
|
|
|
+ isUserInteractionEnabled = true
|
|
|
}
|
|
|
|
|
|
@objc func tapView(doubleTap:UITapGestureRecognizer) {
|
|
@@ -164,9 +170,6 @@ class CommunityVideoCoverCollectionCell: UICollectionViewCell {
|
|
|
|
|
|
}
|
|
|
YPDouYinLikeAnimation.shareInstance()?.createAnimation(withTap: doubleTap)
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
}
|
|
|
//更新上一次点击时间
|
|
|
lastTapTime = time
|
|
@@ -350,7 +353,7 @@ class CommunityVideoCoverCollectionCell: UICollectionViewCell {
|
|
|
])
|
|
|
|
|
|
let moreString = " 展开"
|
|
|
- let text = NSMutableAttributedString(string: "... \(moreString)")
|
|
|
+ let text = NSMutableAttributedString(string: "...\(moreString)")
|
|
|
let expandRange = (text.string as NSString).range(of: moreString)
|
|
|
|
|
|
text.addAttribute(.foregroundColor, value: kffffffColor, range: expandRange)
|
|
@@ -438,7 +441,6 @@ class CommunityVideoCoverCollectionCell: UICollectionViewCell {
|
|
|
// MARK: 视频播放View
|
|
|
lazy var videoPlayView: CommunityVideoPlayView = {
|
|
|
let videoPlayView = CommunityVideoPlayView()
|
|
|
- videoPlayView.isUserInteractionEnabled = true
|
|
|
return videoPlayView
|
|
|
}()
|
|
|
|
|
@@ -693,6 +695,7 @@ class CommunityVideoCoverCollectionCell: UICollectionViewCell {
|
|
|
contentLabel.numberOfLines = 0;
|
|
|
contentLabel.textColor = kffffffColor
|
|
|
contentLabel.font = kRegularFont14
|
|
|
+
|
|
|
return contentLabel
|
|
|
}()
|
|
|
|
|
@@ -1041,5 +1044,13 @@ class CommunityVideoCoverCollectionCell: UICollectionViewCell {
|
|
|
bottomGradientView.layer.cornerRadius = 2;
|
|
|
bottomGradientView.alpha = 1
|
|
|
}
|
|
|
-
|
|
|
+}
|
|
|
+
|
|
|
+extension CommunityVideoCoverCollectionCell : UIGestureRecognizerDelegate {
|
|
|
+ func gestureRecognizer(_ gestureRecognizer: UIGestureRecognizer, shouldReceive touch: UITouch) -> Bool {
|
|
|
+ if touch.view is YYLabel {
|
|
|
+ return false
|
|
|
+ }
|
|
|
+ return true
|
|
|
+ }
|
|
|
}
|