1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071 |
- //
- // IHHotelCell.swift
- // Inhealth
- //
- // Created by weclouds on 2019/12/12.
- // Copyright © 2019 weclouds. All rights reserved.
- //
- import UIKit
- class IHHotelCell: UITableViewCell {
-
-
- var hotel : HotelViewData?{
- didSet{
- if let hotel = self.hotel {
- let letter = hotel.name! as NSString
- iconLabel.text = letter.substring(to: 1)
-
-
- nameLabel.text = hotel.name
- alarmCountLabel.text = hotel.alarmCount
- if hotel.type == "1"{
- lightCountLabel.text = hotel.classroomLightCount!
- cirCountLabel.text = hotel.blackboardLightCount!
- sensorCountLabel.text = hotel.panelDeviceCount!
- purifierCountLabel.text = hotel.curtainDeviceCount!
- gateWayCountLabel.text = hotel.netCount!
- }else{
- lightCountLabel.text = hotel.lightCount
- cirCountLabel.text = hotel.cicLightCount
- sensorCountLabel.text = hotel.sensorCount
- purifierCountLabel.text = hotel.airPurCount
- }
-
- }
- }
- }
-
- @IBOutlet weak var iconLabel: UILabel!
-
- @IBOutlet weak var nameLabel: UILabel!
-
- @IBOutlet weak var lightCountLabel: UILabel!
-
- @IBOutlet weak var cirCountLabel: UILabel!
-
- @IBOutlet weak var sensorCountLabel: UILabel!
-
- @IBOutlet weak var purifierCountLabel: UILabel!
-
- @IBOutlet weak var alarmCountLabel: UILabel!
-
-
- @IBOutlet weak var gateWayCountLabel: UILabel!
-
- override func awakeFromNib() {
- super.awakeFromNib()
- // Initialization code
- // addBottomDashView()
- }
- override func setSelected(_ selected: Bool, animated: Bool) {
- super.setSelected(selected, animated: animated)
- // Configure the view for the selected state
- }
-
-
- }
|