younger_times
2023-04-26 945655d9f53293d7da9d2d11363b3230f6e53bbe
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
//
//  HomeDetailContentVC.swift
//  BrokerDriver
//
//  Created by 无故事王国 on 2023/4/25.
//
 
import UIKit
 
class HomeDetailContentVC: BaseViewController {
 
    @IBOutlet weak var cargoTableview: UITableView!
    @IBOutlet weak var cargoTableHeiCons: NSLayoutConstraint!
    
    override func viewDidLoad() {
        super.viewDidLoad()
 
        view.backgroundColor = .color("#F9FAFF")
    }
 
    override func setUI() {
        super.setUI()
        cargoTableview.delegate = self
        cargoTableview.dataSource = self
        cargoTableview.isScrollEnabled = false
        cargoTableview.register(UINib(nibName: "CargoInfoTCell", bundle: nil), forCellReuseIdentifier: "_CargoInfoTCell")
        cargoTableview.register(UINib(nibName: "CargoTableHeaderView", bundle: nil), forHeaderFooterViewReuseIdentifier: "_CargoTableHeaderView")
        cargoTableHeiCons.constant = 55 * 5.0 + 45.0
 
//        footviewHeiCons.constant = UIDevice.jq_safeEdges.bottom + 44.0
    }
}
 
extension HomeDetailContentVC:UITableViewDelegate{
 
}
 
extension HomeDetailContentVC:UITableViewDataSource{
 
    func tableView(_ tableView: UITableView, viewForHeaderInSection section: Int) -> UIView? {
        let headView = tableView.dequeueReusableHeaderFooterView(withIdentifier: "_CargoTableHeaderView") as? CargoTableHeaderView
        return headView
    }
 
    func tableView(_ tableView: UITableView, heightForHeaderInSection section: Int) -> CGFloat {
        return 45.0
    }
 
    func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
        return 5
    }
 
    func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
        let cell = tableView.dequeueReusableCell(withIdentifier: "_CargoInfoTCell") as! CargoInfoTCell
        return cell
    }
 
    func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat {
        return 50
    }
}