fix
杨锴
2024-08-23 adc2db9bb29e7f316c46b6de679db1522ffc9cc8
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
62
63
64
65
//
//  SpendingDetailContentVC.swift
//  XQMuse
//
//  Created by 无故事王国 on 2024/8/22.
//
 
import UIKit
import JQTools
 
class SpendingDetailContentVC: BaseVC {
 
                private var page:Int!
                private var tableView:UITableView!
 
                init(page:Int) {
                                super.init(nibName: nil, bundle: nil)
                                self.page = page
                }
                
                required init?(coder: NSCoder) {
                                fatalError("init(coder:) has not been implemented")
                }
                
    override func viewDidLoad() {
        super.viewDidLoad()
 
        // Do any additional setup after loading the view.
    }
 
                override func setUI() {
                                tableView = UITableView(frame: .zero, style: .plain)
                                tableView.delegate = self
                                tableView.dataSource = self
                                tableView.register(UINib(nibName: "SpendingDetailContentTCell", bundle: nil), forCellReuseIdentifier: "_SpendingDetailContentTCell")
                                tableView.separatorStyle = .none
 
                                view.addSubview(tableView)
                                tableView.snp.makeConstraints { make in
                                                make.edges.equalToSuperview()
                                }
                }
}
 
extension SpendingDetailContentVC:UITableViewDelegate & UITableViewDataSource{
 
                func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
                                let vc = SpendingDetailInfoVC()
                                JQ_currentViewController().jq_push(vc: vc, animated: true)
                }
 
                func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
                                let cell = tableView.dequeueReusableCell(withIdentifier: "_SpendingDetailContentTCell", for: indexPath) as! SpendingDetailContentTCell
 
                                return cell
                }
 
                func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
                                return 10
                }
 
                func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat {
                                return 70
                }
}