//
|
// 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
|
}
|
}
|