CNLiveMineAddInfoViewController.swift
1.95 KB
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
//
// CNLiveMineAddInfoViewController.swift
// metaCode
//
// Created by open on 2023/6/7.
//
import Foundation
class CNLiveMineAddInfoViewController : CNLiveBaseViewController, UITableViewDelegate, UITableViewDataSource {
let kCNLiveMineInfoLListTableViewIdentifier = "kCNLiveMineInfoLListTableViewIdentifier"
lazy var tableView: UITableView = {
let tableView = UITableView(frame: .zero, style: .plain)
tableView.delegate = self
tableView.dataSource = self
tableView.backgroundColor = HexColor("#F7F8FA")
tableView.tableFooterView = UIView.init()
tableView.rowHeight = 100
tableView.separatorStyle = .none
tableView.register(MineInfoLListTableViewCell.self, forCellReuseIdentifier: kCNLiveMineInfoLListTableViewIdentifier)
return tableView
}()
override func viewWillAppear(_ animated: Bool) {
self.navigationBarHidden = false
}
override func viewDidLoad() {
super.viewDidLoad()
self.titleName = "添加身份"
view.addSubview(tableView)
tableView.snp.makeConstraints { make in
make.top.equalTo(get_system_nav_height())
make.left.right.bottom.equalToSuperview()
}
}
}
extension CNLiveMineAddInfoViewController {
func numberOfSections(in tableView: UITableView) -> Int {
return 1
}
func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
return 2
}
func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
let cell = tableView.dequeueReusableCell(withIdentifier: kCNLiveMineInfoLListTableViewIdentifier) as! MineInfoLListTableViewCell
cell.setupWithDataSource(icon: "mine_header_icon_defult_ava", name: "志愿者身份")
return cell
}
func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat {
return 100
}
}