Blame view
App/createNew/VCConfirmMucDaChon.swift
2.36 KB
d774f0637
|
1 |
import UIKit |
1341bf603
|
2 |
import GeneralUtils |
d774f0637
|
3 4 5 6 |
class VCConfirmMucDaChon: UIViewController, IVCLoadDataTableViewUIThread { @IBOutlet weak var topMargin: NSLayoutConstraint! @IBOutlet weak var tableView: UITableViewLoadDataFromUIThread! |
1341bf603
|
7 |
@IBOutlet weak var vTopLogo: VTopLogo! |
d774f0637
|
8 9 10 11 12 13 14 15 16 |
static func getInstance() -> VCConfirmMucDaChon { let storyboard: UIStoryboard = UIStoryboard(name: "Main", bundle: nil) let vcOpen = storyboard.instantiateViewController(withIdentifier: "VCConfirmMucDaChon") as! VCConfirmMucDaChon return vcOpen } override func viewDidLoad() { super.viewDidLoad() |
1341bf603
|
17 18 19 |
vTopLogo.leftBtnClick = { self.btnLeftClick(self.vTopLogo) } |
fbd62afcf
|
20 |
tableView.emptyText = LocalizedString("list_empty") |
d774f0637
|
21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 |
CellMucChupWithCamera.registerClass(tableView: tableView, forCellReuseIdentifier: "CellMucChupWithCamera") self.tableView.separatorStyle = UITableViewCellSeparatorStyle.singleLine self.tableView.allowsSelection = false self.tableView.rowHeight = UITableViewAutomaticDimension self.tableView.estimatedRowHeight = 150 } override func viewWillAppear(_ animated: Bool) { super.viewWillAppear(animated) tableView.initAndLoadData(self) } @IBAction func btnRightClick(_ sender: Any) { _ = getVcRoot()?.changeCurrentController(VCSettingBienQC.getInstance()) } @IBAction func btnLeftClick(_ sender: Any) { _ = getVcRoot()?.changeCurrentController(VCChonMucChup.getInstance()) } //region ============== TableView Data ========= func loadDataOnUI(complete: @escaping ([Any]?) -> ()) { if let list = getVcRoot()?.mucChups { |
1341bf603
|
45 |
var mucChups = [ShootItem]() |
d774f0637
|
46 |
for item in list { |
defd9642e
|
47 |
if item.willShoot == 1 { mucChups.append(item) } |
d774f0637
|
48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 |
} complete(mucChups) } else { complete(nil) } } func getAllCell() -> [BaseCell] { var baseCells: [BaseCell] = [BaseCell](); baseCells.append(BaseCell(type: 0, identifier: "CellMucChupWithCamera")) return baseCells } func getTypeOfData(baseobj: Any) -> Int { return 0 } func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) { } //endregion func getVcRoot() -> VCRootCreateNew? { return self.parent as? VCRootCreateNew } } |