12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970 |
- //
- // IHActivityHistoryCell.swift
- // Inhealth
- //
- // Created by weclouds on 2019/12/19.
- // Copyright © 2019 weclouds. All rights reserved.
- //
- import UIKit
- class IHActivityHistoryCell: UITableViewCell {
- @IBOutlet weak var nameLabelWidth: NSLayoutConstraint!
-
-
- var log: LogData?{
- didSet{
- if let log = self.log {
- nameLabel.text = log.name
- let width = log.name?.ga_widthForComment(font: UIFont(name: PingFangSC_Medium, size: 14)!, height: 20)
- nameLabelWidth.constant = width! + 10
- activityType.text = log.activites
- floorLabel.text = "\(log.floor!)-\(log.room!)"
- descriptionLabel.text = log.description
- timeLabel.text = log.time
- if log.userId == AppShare.mLoginData?.id {
- iconImageV.image = UIImage(named: "日志记录_绿")
- }else{
- iconImageV.image = UIImage(named: "日志记录_灰")
- }
- }
- }
- }
-
- // var status:Bool?{
- // didSet{
- // if let status = self.status {
- // iconImageV.image = status == true ? UIImage(named: "日志记录_绿") : UIImage(named: "日志记录_灰")
- // }
- // }
- // }
-
-
-
- @IBOutlet weak var iconImageV: UIImageView!
-
- @IBOutlet weak var nameLabel: UILabel!
-
- @IBOutlet weak var activityType: UILabel!
-
- @IBOutlet weak var floorLabel: UILabel!
-
- @IBOutlet weak var descriptionLabel: UILabel!
-
- @IBOutlet weak var timeLabel: UILabel!
- override func awakeFromNib() {
- super.awakeFromNib()
- // Initialization code
- let lineView = IHDashView(strokeColor: UIColor(hexString: "C6CDD5", transparency: 0.5)?.cgColor, gap: 3, lineWith: 1)
- lineView.frame = CGRect(x: 20, y: bounds.size.height - 1, width: KSCREENWIDTH - 40 , height: 1)
- addSubview(lineView)
- }
- override func setSelected(_ selected: Bool, animated: Bool) {
- super.setSelected(selected, animated: animated)
- // Configure the view for the selected state
- }
-
- }
|