// // YXMyDeviceTableViewCell.m // Temperature // // Created by TC on 2025/2/22. // #import "YXMyDeviceTableViewCell.h" @implementation YXMyDeviceTableViewCell - (void)awakeFromNib { [super awakeFromNib]; [self createCircleProgressBar]; [self.resetBtn addTarget:self action:@selector(resetBtnAction) forControlEvents:UIControlEventTouchUpInside]; } -(void)resetBtnAction { if (self.resetClick) { self.resetClick(self); } } -(void)createCircleProgressBar { CircleProgressBar *circleBar = [[CircleProgressBar alloc]init]; circleBar.backgroundColor = [UIColor whiteColor]; circleBar.progressBarProgressColor = [UIColor colorWithHexString:@"#267AFF"]; circleBar.progressBarTrackColor = [UIColor colorWithHexString:@"#F2F2F2"]; circleBar.progressBarWidth = 5; circleBar.startAngle = 180; circleBar.hintHidden = NO; circleBar.hintViewSpacing = 0.2; circleBar.hintViewBackgroundColor = [UIColor whiteColor]; circleBar.hintTextFont = [UIFont systemFontOfSize:10]; circleBar.hintTextColor = [UIColor colorWithHexString:@"1E1E1E"]; [self.rateView addSubview:circleBar]; [circleBar mas_makeConstraints:^(MASConstraintMaker *make) { make.top.left.right.bottom.equalTo(@0); }]; self.circleBar = circleBar; } - (void)setSelected:(BOOL)selected animated:(BOOL)animated { [super setSelected:selected animated:animated]; // Configure the view for the selected state } @end