Commit 5f1824026956b7d71cfc5adc096f7b83e8e538fd
1 parent
3129de4c
看点展开列表 选中当前播放index
Showing
2 changed files
with
10 additions
and
4 deletions
metaCode/Classes/Main/HuBiLieHomePage/Controller/CNLiveTVPlayerViewController.swift
| @@ -1167,6 +1167,7 @@ class CNLiveTVPlayerViewController:UIViewController, UITableViewDataSource, UITa | @@ -1167,6 +1167,7 @@ class CNLiveTVPlayerViewController:UIViewController, UITableViewDataSource, UITa | ||
| 1167 | let detailBgView = CNLiveVodCellBottomView(frame: bottomCommentShowContainView.bounds) | 1167 | let detailBgView = CNLiveVodCellBottomView(frame: bottomCommentShowContainView.bounds) |
| 1168 | detailBgView.backgroundColor = .white | 1168 | detailBgView.backgroundColor = .white |
| 1169 | bottomCommentShowContainView.addSubview(detailBgView) | 1169 | bottomCommentShowContainView.addSubview(detailBgView) |
| 1170 | + detailBgView.selectIdx = self.kanDianIndex | ||
| 1170 | detailBgView.vodPlayBlockListModel = vodPlayBlockListModel | 1171 | detailBgView.vodPlayBlockListModel = vodPlayBlockListModel |
| 1171 | detailBgView.expandHideBlock = {[weak self] in | 1172 | detailBgView.expandHideBlock = {[weak self] in |
| 1172 | guard let self = self else { return } | 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,7 +14,7 @@ typealias CNLiveVodTrailersExpandCellUpdateBlock = (_ selectIdx:Int,_ model:CNLi | ||
| 14 | class CNLiveVodCellBottomView:UIView, UITableViewDataSource, UITableViewDelegate{ | 14 | class CNLiveVodCellBottomView:UIView, UITableViewDataSource, UITableViewDelegate{ |
| 15 | var expandHideBlock:CNLiveVodTrailersExpandCellHidenBlock?//收起 | 15 | var expandHideBlock:CNLiveVodTrailersExpandCellHidenBlock?//收起 |
| 16 | var updateBlock:CNLiveVodTrailersExpandCellUpdateBlock?//更新 | 16 | var updateBlock:CNLiveVodTrailersExpandCellUpdateBlock?//更新 |
| 17 | - var selectIdx:Int = 0 | 17 | + var selectIdx:Int = -1 |
| 18 | 18 | ||
| 19 | var _vodPlayBlockListModel : CNLiveVodPlayBlockListModel? | 19 | var _vodPlayBlockListModel : CNLiveVodPlayBlockListModel? |
| 20 | var vodPlayBlockListModel : CNLiveVodPlayBlockListModel? { | 20 | var vodPlayBlockListModel : CNLiveVodPlayBlockListModel? { |
| @@ -118,9 +118,14 @@ class CNLiveVodCellBottomView:UIView, UITableViewDataSource, UITableViewDelegate | @@ -118,9 +118,14 @@ class CNLiveVodCellBottomView:UIView, UITableViewDataSource, UITableViewDelegate | ||
| 118 | let cell = CNLiveVodTrailerExpandCell() | 118 | let cell = CNLiveVodTrailerExpandCell() |
| 119 | return cell | 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 | }else{ | 129 | }else{ |
| 125 | //不选中 | 130 | //不选中 |
| 126 | cell.isJiShuSelected = false | 131 | cell.isJiShuSelected = false |