BogoInviteListCell.m 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. //
  2. // BogoInviteListCell.m
  3. // UniversalApp
  4. //
  5. // Created by Mac on 2021/6/10.
  6. // Copyright © 2021 voidcat. All rights reserved.
  7. //
  8. #import "BogoInviteListCell.h"
  9. #import "BogoInviteResponseModel.h"
  10. @interface BogoInviteListCell ()
  11. @property (weak, nonatomic) IBOutlet UIImageView *iconImageView;
  12. @property (weak, nonatomic) IBOutlet UILabel *nameLabel;
  13. @property (weak, nonatomic) IBOutlet UILabel *contentLabel;
  14. @property (weak, nonatomic) IBOutlet UILabel *moneyLabel;
  15. @property (weak, nonatomic) IBOutlet UILabel *timeLabel;
  16. @end
  17. @implementation BogoInviteListCell
  18. - (void)awakeFromNib {
  19. [super awakeFromNib];
  20. // Initialization code
  21. }
  22. - (void)setModel:(BogoInviteResponseModelLists *)model{
  23. _model = model;
  24. [self.iconImageView sd_setImageWithURL:[NSURL URLWithString:model.head_image]];
  25. [self.nameLabel setText:model.nick_name];
  26. self.moneyLabel.text = [NSString stringWithFormat:@"+%@",model.coin];
  27. NSDateFormatter *formatter = [[NSDateFormatter alloc]init];
  28. formatter.dateFormat = @"yyyy-MM-dd";
  29. NSString *time = [formatter stringFromDate:[NSDate dateWithTimeIntervalSince1970:model.addtime.doubleValue]];
  30. [self.timeLabel setText:time];
  31. self.contentLabel.text = @"";
  32. }
  33. - (void)setSelected:(BOOL)selected animated:(BOOL)animated {
  34. [super setSelected:selected animated:animated];
  35. // Configure the view for the selected state
  36. }
  37. @end