123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657 |
- //
- // IHSensorItemCell.swift
- // Inhealth
- //
- // Created by weclouds on 2019/12/17.
- // Copyright © 2019 weclouds. All rights reserved.
- //
- import UIKit
- class IHSensorItemCell: UICollectionViewCell {
-
- var isAlarm:Bool? = false{
- didSet{
- if let isalarm = self.isAlarm {
- if isalarm == true {
- statusView.backgroundColor = UIColor(hexString: "#FF0C4D")
- }else{
- // #05CFAB
- statusView.backgroundColor = UIColor(hexString: "#573F95")
- }
- }
- }
- }
-
- var mTitle:String?{
- didSet{
- if self.mTitle == "Temperature"{
- aTitleLabel.text = "温度"
- }else if self.mTitle == "Humidity"{
- aTitleLabel.text = "湿度"
- }else {
- aTitleLabel.text = self.mTitle
- }
-
- }
- }
-
- var mValue :NSAttributedString?{
- didSet{
- //aVlaueLabel.text = self.mValue
- aVlaueLabel.attributedText = self.mValue
- }
- }
-
- @IBOutlet weak var aTitleLabel: UILabel!
-
- @IBOutlet weak var aVlaueLabel: UILabel!
-
- @IBOutlet weak var statusView: UIView!
- override func awakeFromNib() {
- super.awakeFromNib()
- // Initialization code
- }
- }
|