| | |
| | | class TreeTeskListView: UIView,JQNibView{ |
| | | |
| | | @IBOutlet weak var view_sign: UIView! |
| | | @IBOutlet weak var view_sign_cricle: UIView! |
| | | @IBOutlet weak var label_sign: UILabel! |
| | | @IBOutlet weak var tap_sign: TapBtn! |
| | | |
| | | private var clouse:((TreeTeskListSwipe)->Void)? |
| | | private var disposeBag = DisposeBag() |
| | | |
| | | |
| | | private var treeInfoModel:TreeInfoModel? |
| | | |
| | | override func awakeFromNib() { |
| | | super.awakeFromNib() |
| | |
| | | self.clouse = clouse |
| | | } |
| | | |
| | | |
| | | func setTreeInfoModel(_ model:TreeInfoModel){ |
| | | self.treeInfoModel = model |
| | | |
| | | if model.isSign == .yes{ |
| | | tap_sign.isUserInteractionEnabled = false |
| | | label_sign.text = "已签到" |
| | | view_sign.backgroundColor = .gray.withAlphaComponent(0.2) |
| | | label_sign.textColor = .white |
| | | view_sign_cricle.jq_borderColor = .gray.withAlphaComponent(0.2) |
| | | }else{ |
| | | tap_sign.isUserInteractionEnabled = true |
| | | label_sign.text = "打卡签到" |
| | | view_sign.backgroundColor = .white |
| | | label_sign.textColor = UIColor(hexString: "#4E4E4E") |
| | | } |
| | | } |
| | | |
| | | @IBAction func signAction(_ sender: TapBtn) { |
| | | |
| | | tap_sign.isUserInteractionEnabled = false |
| | | label_sign.text = "已签到" |
| | | view_sign.backgroundColor = .gray.withAlphaComponent(0.2) |
| | | view_sign.backgroundColor = .gray.withAlphaComponent(0.1) |
| | | label_sign.textColor = .white |
| | | view_sign_cricle.jq_borderColor = .gray.withAlphaComponent(0.9) |
| | | |
| | | let imageView = UIImageView(image: UIImage(named: "icon_signSuccess")) |
| | | imageView.transform = .init(scaleX: 0.1, y: 0.1) |