123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687 |
- //
- // JXTableViewCell.m
- // shiku_im
- //
- // Created by 123 on 2020/6/1.
- // Copyright © 2020 Reese. All rights reserved.
- //
- #import "JXTFuLiCell.h"
- #import "UIView+LK.h"
- @interface JXTFuLiCell ()
- @property (weak, nonatomic) IBOutlet UILabel *topTitle;
- @property (weak, nonatomic) IBOutlet UILabel *bottomTitle;
- @property (weak, nonatomic) IBOutlet UILabel *competL;
- @property (weak, nonatomic) IBOutlet UIView *totoalPressL;
- @property (weak, nonatomic) IBOutlet UIView *colorPressL;
- @property (weak, nonatomic) UIView *colorPressL2;
- @property (weak, nonatomic) IBOutlet NSLayoutConstraint *colorPressConsW;
- @property (weak, nonatomic) IBOutlet NSLayoutConstraint *totoalPressW;
- @end
- @implementation JXTFuLiCell
- - (void)awakeFromNib {
- [super awakeFromNib];
-
- self.backgroundColor=[UIColor clearColor];
-
- }
-
-
- + (instancetype)cellWithTableView:(UITableView *)tableView
- {
- static NSString *ID = @"JXTFuLiCell";
- JXTFuLiCell *cell = [tableView dequeueReusableCellWithIdentifier:ID];
- if (!cell) {
- cell = [[NSBundle mainBundle] loadNibNamed:@"JXTFuLiCell" owner:nil options:nil].firstObject;
- cell.selectionStyle=UITableViewCellSelectionStyleNone;
- }
-
- cell.backgroundColor=[UIColor clearColor];
-
- return cell;
- }
-
- -(void)setDict:(NSDictionary *)dict{
-
-
- self.topTitle.text=[NSString stringWithFormat:@"%@",[dict objectForKey:@"title"]];
- self.bottomTitle.text=[NSString stringWithFormat:@"%@",[dict objectForKey:@"currentDesc"]];
- self.competL.text=[NSString stringWithFormat:@"%@",[dict objectForKey:@"surplusDesc"]];
-
-
- int current=[[dict objectForKey:@"current"] intValue];
- float surplus=[[dict objectForKey:@"surplus"] floatValue];
-
- CGFloat aaa=current/ (current+surplus);
- if (aaa>0) {
- _colorPressConsW.constant =aaa*326+10;
- }else{
- _colorPressConsW.constant =0;
- }
-
-
-
- // cell.projectLabel.text = [NSString stringWithFormat:@"%@",]
- // cell.detail.text = [NSString stringWithFormat:@"%@",];
- // cell.detail.text = [NSString stringWithFormat:@"%@",[dictionary objectForKey:@"currentDesc"]];
- // if ([status intValue]==2) {
- //
- // cell.descriptionLabel.text = [NSString stringWithFormat:@"%@",[dictionary objectForKey:@"surplusDesc"]];
- // }else{
- //
- // cell.descriptionLabel.text = [NSString stringWithFormat:@"%@",@"未完成"];
- // }
- }
- @end
|