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