|
@@ -14,7 +14,7 @@ class MVPlayControlViewCell: UICollectionViewCell {
|
|
|
lazy var coverImageView: UIImageView = {
|
|
|
let coverImageView = UIImageView()
|
|
|
coverImageView.contentMode = .scaleAspectFit
|
|
|
- coverImageView.clipsToBounds = true
|
|
|
+// coverImageView.clipsToBounds = true
|
|
|
coverImageView.isUserInteractionEnabled = true
|
|
|
coverImageView.tag = cCellTag
|
|
|
coverImageView.backgroundColor = UIColor.black
|
|
@@ -23,6 +23,12 @@ class MVPlayControlViewCell: UICollectionViewCell {
|
|
|
return coverImageView
|
|
|
}()
|
|
|
|
|
|
+ lazy var maskImageView: UIImageView = {
|
|
|
+ let maskImageView = UIImageView(image: UIImage(named: "play_mask"))
|
|
|
+ maskImageView.contentMode = .scaleAspectFill
|
|
|
+ return maskImageView
|
|
|
+ }()
|
|
|
+
|
|
|
lazy var pauseBtn: UIButton = {
|
|
|
let pauseBtn = UIButton(type: .custom)
|
|
|
pauseBtn.setImage(UIImage(named: "video_pause"), for: .selected)
|
|
@@ -155,6 +161,7 @@ class MVPlayControlViewCell: UICollectionViewCell {
|
|
|
override init(frame: CGRect) {
|
|
|
super.init(frame: frame)
|
|
|
contentView.addSubview(coverImageView)
|
|
|
+ contentView.addSubview(maskImageView)
|
|
|
contentView.addSubview(pauseBtn)
|
|
|
contentView.addSubview(watchCountLab)
|
|
|
contentView.addSubview(nickNameBtn)
|
|
@@ -234,6 +241,10 @@ class MVPlayControlViewCell: UICollectionViewCell {
|
|
|
make.size.equalToSuperview()
|
|
|
}
|
|
|
|
|
|
+ maskImageView.snp.remakeConstraints { make in
|
|
|
+ make.size.equalToSuperview()
|
|
|
+ }
|
|
|
+
|
|
|
pauseBtn.snp.remakeConstraints { make in
|
|
|
make.width.height.equalTo(shareW)
|
|
|
make.centerX.equalToSuperview()
|