Ver código fonte

Merge branch 'dev' of https://git.yishihui.com/iOS/MusicVideoPlus into dev
合并代码

jsonwang 4 anos atrás
pai
commit
7927fa90cf

+ 3 - 3
MusicVideoPlus/MusicVideoPlus/Classes/Modules/Home/Controllers/MVHomeController.swift

@@ -8,9 +8,9 @@
 import BFFramework
 class MVHomeController: MVBaseController {
     // 视频播放列表
-    var margin: CGFloat = cDefaultMargin * 3
-    private var viewListView: MVBanner = {
-        let maxHeight: CGFloat = cScreenHeigth - (cDevice_iPhoneStatusBarHei + 45 + 60 + (cDefaultMargin * 2 + cSafeAreaHeight) + cDefaultMargin * 3 + 15)
+    public let margin: CGFloat = cDefaultMargin * 3
+    public let maxHeight: CGFloat = cScreenHeigth - (cDevice_iPhoneStatusBarHei + 45 + 60 + (cDefaultMargin * 2 + cSafeAreaHeight) + cDefaultMargin * 3)
+    lazy var viewListView: MVBanner = {
         let maxWidth: CGFloat = 9.0 / 16.0 * maxHeight
         let margin = (cScreenWidth - maxWidth) / 2
         let lineSpacing = margin - cDefaultMargin * 3

+ 1 - 1
MusicVideoPlus/MusicVideoPlus/Classes/Modules/Home/Views/Banner/MVBanner.swift

@@ -57,7 +57,7 @@ public class MVBanner: UIView {
     public required init(frame: CGRect = .zero, margin: CGFloat = 0, lineSpacing: CGFloat = 0, minScale: Scale = Scale()) {
         super.init(frame: frame)
         self.flowLayout = MVBannerFlowLayout(margin: margin, lineSpacing: lineSpacing, minScale: minScale)
-        self.flowLayout.sectionInset = UIEdgeInsets.init(top: 0, left: margin, bottom: 0, right: margin)
+        self.flowLayout.sectionInset = UIEdgeInsets.init(top: 0, left: 30, bottom: 0, right: 30)
         self.setupSubviews()
     }
     

+ 23 - 26
MusicVideoPlus/MusicVideoPlus/Classes/Modules/Home/Views/MVBannerCell.swift

@@ -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

+ 2 - 2
MusicVideoPlus/MusicVideoPlus/Classes/Modules/Setting/Controllers/MVSettingController.swift

@@ -34,9 +34,9 @@ class MVSettingController: MVBaseController{
         protocolLab.font = UIFont.systemFont(ofSize: 14)
         protocolLab.text = ""
         protocolLab.textColor = UIColor.hexColor(hexadecimal: "#999999")
-        protocolLab.appendLink(withText: "《用户协议》", linkFont: UIFont.systemFont(ofSize: 14), linkColor: UIColor.hexColor(hexadecimal: "#6783AC"), underLineStyle: CTUnderlineStyle.single, linkData: cUserProtocol)
+        protocolLab.appendLink(withText: "《用户协议》", linkFont: UIFont.systemFont(ofSize: 14), linkColor: UIColor.hexColor(hexadecimal: "#6783AC"), underLineStyle: CTUnderlineStyle.init(), linkData: cUserProtocol)
 
-        protocolLab.appendLink(withText: "《隐私协议》", linkFont: UIFont.systemFont(ofSize: 14), linkColor: UIColor.hexColor(hexadecimal: "#6783AC"), underLineStyle: CTUnderlineStyle.single, linkData: cPrivacy)
+        protocolLab.appendLink(withText: "《隐私协议》", linkFont: UIFont.systemFont(ofSize: 14), linkColor: UIColor.hexColor(hexadecimal: "#6783AC"), underLineStyle: CTUnderlineStyle.init(), linkData: cPrivacy)
 
         protocolLab.textAlignment = CTTextAlignment.center
         return protocolLab