IHFloorListCell.swift 925 B

1234567891011121314151617181920212223242526272829303132333435
  1. //
  2. // IHFloorListCell.swift
  3. // Inhealth
  4. //
  5. // Created by weclouds on 2020/1/6.
  6. // Copyright © 2020 weclouds. All rights reserved.
  7. //
  8. import UIKit
  9. class IHFloorListCell: UICollectionViewCell {
  10. var floorName :String? {
  11. didSet{
  12. self.floorNameLabel.text = self.floorName
  13. }
  14. }
  15. @IBOutlet private weak var floorNameLabel: UILabel!
  16. override func awakeFromNib() {
  17. super.awakeFromNib()
  18. // Initialization code
  19. }
  20. override var isSelected: Bool{
  21. didSet{
  22. if self.isSelected == true {
  23. floorNameLabel.backgroundColor = UIColor(hexString: "#573F95")
  24. floorNameLabel.textColor = UIColor(hexString: "#FFFFFF")
  25. }else{
  26. floorNameLabel.backgroundColor = UIColor(hexString: "#F6F8F7")
  27. floorNameLabel.textColor = UIColor(hexString: "#333333")
  28. }
  29. }
  30. }
  31. }