Blame view

App/listCtruong/VCListCtruong.swift 1.52 KB
d774f0637   Trịnh Văn Quân   fisrt comit
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
  import UIKit
  
  class VCListCtruong: UIViewController, IVCLoadDataTableViewUIThread {
      @IBOutlet weak var tableView: UITableViewLoadDataFromUIThread!
      @IBOutlet weak var vTopLogo: VTopLogo!
  
  
      static func getInstance() -> VCListCtruong {
          let storyboard: UIStoryboard = UIStoryboard(name: "Main", bundle: nil)
          let vcOpen = storyboard.instantiateViewController(withIdentifier: "VCListCtruong") as! VCListCtruong
          return vcOpen
      }
  
      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) }
      }
  
      func getVcRoot() -> VCRootListCtruong? {
          return self.parent as? VCRootListCtruong
      }
  
      //region TableView ========
      func loadDataOnUI(complete: @escaping ([Any]?) -> ()) {
          var result = [CongTruong]()
          result.append(CongTruong())
          result.append(CongTruong())
          result.append(CongTruong())
          complete(result)
      }
  
      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) {
      }
  //endregion
  }