IHGatewayCell.swift 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. //
  2. // IHGatewayCell.swift
  3. // Inhealth
  4. //
  5. // Created by weclouds on 2020/8/20.
  6. // Copyright © 2020 weclouds. All rights reserved.
  7. //
  8. import UIKit
  9. class IHGatewayCell: UITableViewCell {
  10. @IBOutlet weak var gatewayNameLabel: UILabel!
  11. @IBOutlet weak var gatewayIdLabel: UILabel!
  12. @IBOutlet weak var roomNumberLabel: UILabel!
  13. @IBOutlet weak var hardwareVersion: UILabel!
  14. @IBOutlet weak var softwareVersionLabel: UILabel!
  15. override func awakeFromNib() {
  16. super.awakeFromNib()
  17. let lineView = IHDashView(strokeColor: UIColor(hexString: "C6CDD5", transparency: 0.5)?.cgColor, gap: 3, lineWith: 1)
  18. lineView.frame = CGRect(x: 20, y: bounds.size.height - 1, width: KSCREENWIDTH - 40 , height: 1)
  19. addSubview(lineView)
  20. }
  21. var gatawayInfor : gatewayInfor?{
  22. didSet{
  23. if let infor = self.gatawayInfor{
  24. gatewayIdLabel.text = "ID:" + infor.SN!
  25. gatewayNameLabel.text = "未命名"
  26. hardwareVersion.text = "无"
  27. roomNumberLabel.text = "未知"
  28. }
  29. }
  30. }
  31. }