jsonwang před 4 roky
rodič
revize
50328083f9

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

@@ -14,7 +14,7 @@ class MVHomeController: MVBaseController {
         let maxWidth: CGFloat = 9.0 / 16.0 * maxHeight
         let margin = (cScreenWidth - maxWidth) / 2
         let lineSpacing = margin - cDefaultMargin * 3
-        let videoListView = MVBanner(frame: .zero, margin: margin, lineSpacing: lineSpacing, minScale: MVBanner.Scale(scale: 1))
+        let videoListView = MVBanner(frame: .zero, margin: margin, lineSpacing: 15, minScale: MVBanner.Scale(scale: 1))
         videoListView.backgroundColor = UIColor.white
         videoListView.register(classCellType: MVBannerCell.self)
         return videoListView
@@ -57,7 +57,7 @@ class MVHomeController: MVBaseController {
         let flowLayout = UICollectionViewFlowLayout()
         flowLayout.sectionInset = UIEdgeInsets(top: 0, left: 11, bottom: 0, right: 11)
         flowLayout.minimumLineSpacing = 0
-        flowLayout.minimumInteritemSpacing = 10
+        flowLayout.minimumInteritemSpacing = 0
         flowLayout.scrollDirection = .horizontal
         let collectionView = UICollectionView(frame: CGRect(x: 0, y: 0, width: view.frame.width, height: 45), collectionViewLayout: flowLayout)
         collectionView.showsVerticalScrollIndicator = false
@@ -485,9 +485,9 @@ extension MVHomeController: UICollectionViewDelegate, UICollectionViewDataSource
 
     func collectionView(_ collectionView: UICollectionView, layout _: UICollectionViewLayout, sizeForItemAt indexPath: IndexPath) -> CGSize {
         let itemData: MVHotVideoModel = mVideos[indexPath.item]
-        let width: CGFloat = CGFloat(CGFloat(itemData.categoryName.ga_widthForComment(font: UIFont.boldSystemFont(ofSize: 17), height: 17.0)) + 36.0 + 20.0)
+        let width: CGFloat = CGFloat(CGFloat(itemData.categoryName.ga_widthForComment(font: UIFont.boldSystemFont(ofSize: 17), height: 17.0)) + 43)
 
-        return CGSize(width: width, height: collectionView.frame.height - cDefaultMargin)
+        return CGSize(width: width, height: collectionView.frame.height - 14)
     }
 
     func collectionView(_: UICollectionView, didSelectItemAt indexPath: IndexPath) {

+ 1 - 1
MusicVideoPlus/MusicVideoPlus/Classes/Modules/Home/Views/MVBannerCell.swift

@@ -76,7 +76,7 @@ class MVBannerCell: UICollectionViewCell {
 
     /// 音乐歌曲名称
     lazy var musicNameLab: LMJHorizontalScrollText = {
-        let musicNameLab = LMJHorizontalScrollText(frame: CGRect(x: 16 + cDefaultMargin, y: 0, width: musicWidth, height: 32))
+        let musicNameLab = LMJHorizontalScrollText(frame: CGRect(x: 12 + cDefaultMargin, y: 0, width: musicWidth, height: 32))
         musicNameLab.textColor = UIColor.white
         musicNameLab.textFont = UIFont.systemFont(ofSize: 15, weight: .semibold)
         musicNameLab.speed = 0.03

+ 1 - 1
MusicVideoPlus/MusicVideoPlus/Classes/Modules/Home/Views/MVTagsCell.swift

@@ -75,7 +75,7 @@ class MVTagsCell: UICollectionViewCell {
         let margin: CGFloat = 10
  
         audioImageView.snp.remakeConstraints { make in
-            make.left.equalToSuperview().offset(13)
+            make.left.equalToSuperview().offset(8)
             make.centerY.equalToSuperview()
             make.width.height.equalTo(22)
         }