MyTeamCell.m 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. //
  2. // MyTeamCell.m
  3. // model
  4. //
  5. // Created by Drew on 2018/10/29.
  6. // Copyright © 2018 Mine. All rights reserved.
  7. //
  8. #import "MyTeamCell.h"
  9. @interface MyTeamCell()
  10. @property (weak, nonatomic) IBOutlet UIView *content;
  11. @property (weak, nonatomic) IBOutlet UIImageView *avatar;
  12. @property (weak, nonatomic) IBOutlet UILabel *name;
  13. @property (weak, nonatomic) IBOutlet UILabel *reward;
  14. @end
  15. @implementation MyTeamCell
  16. - (void)awakeFromNib {
  17. [super awakeFromNib];
  18. self.content.layer.backgroundColor = [UIColor colorWithRed:255/255.0 green:255/255.0 blue:255/255.0 alpha:1].CGColor;
  19. self.content.layer.cornerRadius = 8;
  20. self.avatar.layer.masksToBounds = YES;
  21. self.avatar.layer.cornerRadius = 18;
  22. }
  23. - (void)setSelected:(BOOL)selected animated:(BOOL)animated {
  24. [super setSelected:selected animated:animated];
  25. // Configure the view for the selected state
  26. }
  27. - (void)setData:(NSDictionary *)data {
  28. [self.avatar sd_setImageWithURL:[NSURL URLWithString:[NSString stringWithFormat:@"%@%@", imageURl, data[@"avatar"]]]];
  29. self.name.text = data[@"name"];
  30. self.reward.text = [NSString stringWithFormat:@"奖励%@", data[@"total"]];
  31. }
  32. @end