Commit 5f1824026956b7d71cfc5adc096f7b83e8e538fd

Authored by “张旭”
1 parent 3129de4c

看点展开列表 选中当前播放index

metaCode/Classes/Main/HuBiLieHomePage/Controller/CNLiveTVPlayerViewController.swift
... ... @@ -1167,6 +1167,7 @@ class CNLiveTVPlayerViewController:UIViewController, UITableViewDataSource, UITa
1167 1167 let detailBgView = CNLiveVodCellBottomView(frame: bottomCommentShowContainView.bounds)
1168 1168 detailBgView.backgroundColor = .white
1169 1169 bottomCommentShowContainView.addSubview(detailBgView)
  1170 + detailBgView.selectIdx = self.kanDianIndex
1170 1171 detailBgView.vodPlayBlockListModel = vodPlayBlockListModel
1171 1172 detailBgView.expandHideBlock = {[weak self] in
1172 1173 guard let self = self else { return }
... ...
metaCode/Classes/Main/HuBiLieHomePage/View/VodDetail/CNLiveVodCellBottomView.swift
... ... @@ -14,7 +14,7 @@ typealias CNLiveVodTrailersExpandCellUpdateBlock = (_ selectIdx:Int,_ model:CNLi
14 14 class CNLiveVodCellBottomView:UIView, UITableViewDataSource, UITableViewDelegate{
15 15 var expandHideBlock:CNLiveVodTrailersExpandCellHidenBlock?//收起
16 16 var updateBlock:CNLiveVodTrailersExpandCellUpdateBlock?//更新
17   - var selectIdx:Int = 0
  17 + var selectIdx:Int = -1
18 18  
19 19 var _vodPlayBlockListModel : CNLiveVodPlayBlockListModel?
20 20 var vodPlayBlockListModel : CNLiveVodPlayBlockListModel? {
... ... @@ -118,9 +118,14 @@ class CNLiveVodCellBottomView:UIView, UITableViewDataSource, UITableViewDelegate
118 118 let cell = CNLiveVodTrailerExpandCell()
119 119 return cell
120 120 }
121   - if self.selectIdx == indexPath.row{
122   - //当前cell选中
123   - cell.isJiShuSelected = true
  121 + if self.selectIdx >= 0{
  122 + if self.selectIdx == indexPath.row{
  123 + //当前cell选中
  124 + cell.isJiShuSelected = true
  125 + }else{
  126 + //不选中
  127 + cell.isJiShuSelected = false
  128 + }
124 129 }else{
125 130 //不选中
126 131 cell.isJiShuSelected = false
... ...