| | |
| | | private(set) var tableView:UITableView! |
| | | private var viewModel = WorldCupRecordViewModel() |
| | | var partModel:BehaviorRelay<ActivityDetailPartModel?>? |
| | | var superScrollView:UIScrollView? |
| | | override func viewDidLoad() { |
| | | super.viewDidLoad() |
| | | view.backgroundColor = .clear |
| | |
| | | }).disposed(by: disposeBag) |
| | | } |
| | | } |
| | | extension WorldCupRecordVC:UIScrollViewDelegate{ |
| | | |
| | | func scrollViewDidScroll(_ scrollView: UIScrollView) { |
| | | let off = superScrollView!.contentOffset.y + scrollView.contentOffset.y |
| | | superScrollView!.contentOffset.y = max(0,min(350,off)) |
| | | } |
| | | } |
| | | |
| | | extension WorldCupRecordVC:UITableViewDelegate,UITableViewDataSource{ |
| | | func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int { |
| | |
| | | func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell { |
| | | let cell = tableView.dequeueReusableCell(withIdentifier: "_WorldCupRecordTCell") as! WorldCupRecordTCell |
| | | cell.backgroundColor = .clear |
| | | cell.model = viewModel.dataSource.value!.list[indexPath.row] |
| | | return cell |
| | | } |
| | | |