|
@@ -16,9 +16,9 @@ class MVBannerCell: UICollectionViewCell {
|
|
|
// 封面
|
|
|
lazy var converView: UIImageView = {
|
|
|
let iv = UIImageView()
|
|
|
+// iv.backgroundColor = .black
|
|
|
+ iv.contentMode = .scaleAspectFill
|
|
|
iv.clipsToBounds = true
|
|
|
- iv.backgroundColor = .black
|
|
|
- iv.contentMode = .scaleAspectFit
|
|
|
iv.addCorner(corner: 8)
|
|
|
return iv
|
|
|
}()
|
|
@@ -30,15 +30,15 @@ class MVBannerCell: UICollectionViewCell {
|
|
|
|
|
|
}()
|
|
|
|
|
|
- lazy var backShadowView: UIView = {
|
|
|
- let backShowView = UIView()
|
|
|
- backShowView.layer.masksToBounds = false
|
|
|
- backShowView.layer.shadowColor = UIColor.black.cgColor
|
|
|
- backShowView.layer.shadowOpacity = 0.3 // 设置阴影的透明度
|
|
|
- backShowView.layer.shadowRadius = 4
|
|
|
- backShowView.layer.shadowOffset = CGSize(width: 0, height: 4) // 设置阴影的偏移量
|
|
|
- return backShowView
|
|
|
- }()
|
|
|
+// lazy var backShadowView: UIView = {
|
|
|
+// let backShowView = UIView()
|
|
|
+// backShowView.layer.masksToBounds = false
|
|
|
+// backShowView.layer.shadowColor = UIColor.black.cgColor
|
|
|
+// backShowView.layer.shadowOpacity = 0.3 // 设置阴影的透明度
|
|
|
+// backShowView.layer.shadowRadius = 4
|
|
|
+// backShowView.layer.shadowOffset = CGSize(width: 0, height: 4) // 设置阴影的偏移量
|
|
|
+// return backShowView
|
|
|
+// }()
|
|
|
|
|
|
// 下面 marks view
|
|
|
lazy var bottmMaskView: UIImageView = {
|
|
@@ -94,7 +94,7 @@ class MVBannerCell: UICollectionViewCell {
|
|
|
reCreateBtn.addCorner(corner: 8)
|
|
|
reCreateBtn.setImage(UIImage(named: "reCreate"), for: .normal)
|
|
|
reCreateBtn.addTarget(self, action: #selector(btnClick(sender:)), for: .touchUpInside)
|
|
|
- reCreateBtn.backgroundColor = UIColor.init(red: 61.0 / 255.0, green: 193.0 / 255.0, blue: 193.0 / 255.0, alpha: 0.8)
|
|
|
+ reCreateBtn.backgroundColor = UIColor(red: 61.0 / 255.0, green: 193.0 / 255.0, blue: 193.0 / 255.0, alpha: 0.8)
|
|
|
return reCreateBtn
|
|
|
}()
|
|
|
|
|
@@ -129,10 +129,10 @@ class MVBannerCell: UICollectionViewCell {
|
|
|
|
|
|
override init(frame: CGRect) {
|
|
|
super.init(frame: frame)
|
|
|
- contentView.addSubview(backShadowView)
|
|
|
- backShadowView.addSubview(converView)
|
|
|
- backShadowView.addSubview(bottmMaskView)
|
|
|
- backShadowView.addSubview(pauseView)
|
|
|
+// contentView.addSubview(backShadowView)
|
|
|
+ contentView.addSubview(converView)
|
|
|
+ contentView.addSubview(bottmMaskView)
|
|
|
+ contentView.addSubview(pauseView)
|
|
|
bottmMaskView.addSubview(progressView)
|
|
|
bottmMaskView.addSubview(typeImage)
|
|
|
bottmMaskView.addSubview(typeLab)
|
|
@@ -167,18 +167,15 @@ class MVBannerCell: UICollectionViewCell {
|
|
|
///
|
|
|
/// - Returns: <#description#>
|
|
|
func addLayout() {
|
|
|
- backShadowView.snp.remakeConstraints { make in
|
|
|
- make.width.equalToSuperview().offset(-15)
|
|
|
- make.height.equalToSuperview().offset(-15)
|
|
|
- make.left.equalToSuperview().offset(15)
|
|
|
- make.top.equalToSuperview()
|
|
|
- }
|
|
|
+// backShadowView.snp.remakeConstraints { make in
|
|
|
+// make.width.equalToSuperview()
|
|
|
+// make.height.equalToSuperview()
|
|
|
+// make.left.equalToSuperview()
|
|
|
+// make.top.equalToSuperview()
|
|
|
+// }
|
|
|
|
|
|
converView.snp.remakeConstraints { make in
|
|
|
- make.width.equalToSuperview()
|
|
|
- make.height.equalToSuperview()
|
|
|
- make.left.equalToSuperview()
|
|
|
- make.top.equalToSuperview()
|
|
|
+ make.left.bottom.top.right.equalToSuperview()
|
|
|
}
|
|
|
|
|
|
pauseView.snp.remakeConstraints { make in
|