-
Notifications
You must be signed in to change notification settings - Fork 112
/
TableViewVC.swift
66 lines (51 loc) · 2.21 KB
/
TableViewVC.swift
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
66
//
// TableViewVC.swift
// VHBoomMenuButtonSwiftDemo
//
// Created by Nightonke on 2017/5/5.
// Copyright © 2017 Nightonke. All rights reserved.
//
import UIKit
import BoomMenuButton
class TableViewVC: BoomMenuButtonVC, UITableViewDelegate, UITableViewDataSource {
static let identifier = "TableViewVCIdentifier"
// MARK: - UITableViewDelegate
func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
}
// MARK: - UITableViewDataSource
func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
return 1000
}
func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
if let cell = (tableView.dequeueReusableCell(withIdentifier: TableViewVC.identifier) as? BMBTableViewCell) {
cell.label.text = String.init(format: "No.%d", indexPath.row)
cell.bmb1.buttonEnum = .simpleCircle
cell.bmb1.piecePlaceEnum = .share
cell.bmb1.buttonPlaceEnum = .sc_9_1
cell.bmb1.isInList = true
cell.bmb1.clearBuilders()
for _ in 0..<cell.bmb1.buttonPlaceEnum.buttonNumber() {
cell.bmb1.addBuilder(BuilderManager.simpleCircleButtonBuilder())
}
cell.bmb2.buttonEnum = .ham
cell.bmb2.piecePlaceEnum = .ham_3
cell.bmb2.buttonPlaceEnum = .ham_3
cell.bmb2.isInList = true
cell.bmb2.clearBuilders()
for _ in 0..<cell.bmb2.piecePlaceEnum.pieceNumber() {
cell.bmb2.addBuilder(BuilderManager.hamButtonBuilder())
}
cell.bmb3.buttonEnum = .simpleCircle
cell.bmb3.piecePlaceEnum = .dot_9_1
cell.bmb3.buttonPlaceEnum = .sc_9_1
cell.bmb3.isInList = true
cell.bmb3.clearBuilders()
for _ in 0..<cell.bmb3.piecePlaceEnum.pieceNumber() {
cell.bmb3.addBuilder(BuilderManager.simpleCircleButtonBuilder())
}
return cell
} else {
return tableView.dequeueReusableCell(withIdentifier: TableViewVC.identifier)!
}
}
}