无故事王国
2023-09-18 b395e5ea758b24803743535f86bf443765237551
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
//
//  GamesDataSourceSubListVC.swift
//  WanPai
//
//  Created by 无故事王国 on 2023/9/15.
//
 
import UIKit
 
class GamesDataSourceSubListVC: BaseVC {
 
    private var type:GamesSubType!
 
    private var tableView:UITableView!
 
    init(type:GamesSubType) {
        super.init(nibName: nil, bundle: nil)
        self.type = type
    }
 
    required init?(coder: NSCoder) {
        fatalError("init(coder:) has not been implemented")
    }
 
    override func viewDidLoad() {
        super.viewDidLoad()
 
    }
 
    override func setUI() {
        tableView = UITableView(frame: .zero, style: .plain)
        tableView.delegate = self
        tableView.dataSource = self
        tableView.separatorStyle = .none
        tableView.register(UINib(nibName: "GamesDataSourceTCell", bundle: nil), forCellReuseIdentifier: "_GamesDataSourceTCell")
        view.addSubview(tableView)
        tableView.snp.makeConstraints { make in
            make.edges.equalToSuperview().inset(UIEdgeInsets(top: 7.5, left: 0, bottom: 0, right: 0))
        }
    }
}
 
extension GamesDataSourceSubListVC:UITableViewDelegate{
 
}
 
extension GamesDataSourceSubListVC:UITableViewDataSource{
    func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
        let cell = tableView.dequeueReusableCell(withIdentifier: "_GamesDataSourceTCell") as! GamesDataSourceTCell
        return cell
    }
 
    func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
        return 5
    }
}