IHGatewayListManager.swift 1010 B

123456789101112131415161718192021222324252627282930313233343536
  1. //
  2. // IHGatewayListManager.swift
  3. // Inhealth
  4. //
  5. // Created by weclouds on 2020/4/7.
  6. // Copyright © 2020 weclouds. All rights reserved.
  7. //
  8. import UIKit
  9. class IHGatewayListManager: NSObject ,IHViewManagerProtocolDelegate{
  10. lazy var mainView: IHGatewayListView = {
  11. let mainView = IHGatewayListView()
  12. mainView.backgroundColor = .red
  13. // mainView.delegate = self
  14. return mainView
  15. }()
  16. // private var vc = UIViewController()
  17. private weak var vc : UIViewController?
  18. func bindController(_ vc: UIViewController) {
  19. self.vc = vc
  20. createUI()
  21. }
  22. func createUI() {
  23. mainView.frame = CGRect(x: 0, y: 0, width: KSCREENWIDTH, height: KSCREENHEIGHT - KNavBarHeight )
  24. self.vc?.view.addSubview(mainView)
  25. IHGatewayService.share.getGatewayList(buildId: Intermediate.buildId,page: "1", keywords: nil, requestSuccess: { (list) in
  26. self.mainView.devDataList = list
  27. }) {
  28. }
  29. }
  30. }