Blame view
App/listCtruong/VCListCtruong.swift
1.75 KB
d774f0637
|
1 |
import UIKit |
1341bf603
|
2 |
import GeneralUtils |
d774f0637
|
3 4 5 6 |
class VCListCtruong: UIViewController, IVCLoadDataTableViewUIThread { @IBOutlet weak var tableView: UITableViewLoadDataFromUIThread! @IBOutlet weak var vTopLogo: VTopLogo! |
1341bf603
|
7 |
static func openController(_ viewController: UIViewController) { |
d774f0637
|
8 9 |
let storyboard: UIStoryboard = UIStoryboard(name: "Main", bundle: nil) let vcOpen = storyboard.instantiateViewController(withIdentifier: "VCListCtruong") as! VCListCtruong |
1341bf603
|
10 |
viewController.present(vcOpen, animated: true, completion: nil) |
d774f0637
|
11 12 13 14 15 16 17 18 19 20 |
} override func viewDidLoad() { super.viewDidLoad() self.tableView.separatorStyle = UITableViewCellSeparatorStyle.none self.tableView.rowHeight = 95//UITableViewAutomaticDimension self.tableView.estimatedRowHeight = 95 tableView.initAndLoadData(self) vTopLogo.leftBtnClick = { self.dismiss(animated: true) } } |
1341bf603
|
21 22 |
override var prefersStatusBarHidden: Bool { return true |
d774f0637
|
23 |
} |
d774f0637
|
24 25 |
//region TableView ======== func loadDataOnUI(complete: @escaping ([Any]?) -> ()) { |
1341bf603
|
26 |
complete(AppUtils.getListCtruong()) |
d774f0637
|
27 28 29 30 31 32 33 34 35 36 37 38 39 |
} func getAllCell() -> [BaseCell] { var baseCells: [BaseCell] = [BaseCell](); baseCells.append(BaseCell(type: 0, identifier: "Cell")) return baseCells } func getTypeOfData(baseobj: Any) -> Int { return 0 } func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) { |
1341bf603
|
40 41 42 43 44 45 46 |
if let cTruong = self.tableView.getItem(indexPath) as? CongTruong { VCShootItemList.openController(self, cTruong: cTruong) } } //endregion override open var supportedInterfaceOrientations: UIInterfaceOrientationMask { return UIInterfaceOrientationMask.portrait |
d774f0637
|
47 |
} |
d774f0637
|
48 |
} |