// // MyTeamCell.m // model // // Created by Drew on 2018/10/29. // Copyright © 2018 Mine. All rights reserved. // #import "MyTeamCell.h" @interface MyTeamCell() @property (weak, nonatomic) IBOutlet UIView *content; @property (weak, nonatomic) IBOutlet UIImageView *avatar; @property (weak, nonatomic) IBOutlet UILabel *name; @property (weak, nonatomic) IBOutlet UILabel *reward; @end @implementation MyTeamCell - (void)awakeFromNib { [super awakeFromNib]; self.content.layer.backgroundColor = [UIColor colorWithRed:255/255.0 green:255/255.0 blue:255/255.0 alpha:1].CGColor; self.content.layer.cornerRadius = 8; self.avatar.layer.masksToBounds = YES; self.avatar.layer.cornerRadius = 18; } - (void)setSelected:(BOOL)selected animated:(BOOL)animated { [super setSelected:selected animated:animated]; // Configure the view for the selected state } - (void)setData:(NSDictionary *)data { [self.avatar sd_setImageWithURL:[NSURL URLWithString:[NSString stringWithFormat:@"%@%@", imageURl, data[@"avatar"]]]]; self.name.text = data[@"name"]; self.reward.text = [NSString stringWithFormat:@"奖励%@", data[@"total"]]; } @end