// // 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 } }