RDSHomeListCell.m 973 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. //
  2. // RDSHomeListCell.m
  3. // Temperature
  4. //
  5. // Created by RD on 2022/12/3.
  6. //
  7. #import "RDSHomeListCell.h"
  8. @interface RDSHomeListCell ()
  9. @property (weak, nonatomic) IBOutlet UILabel *nameLab;
  10. @property (weak, nonatomic) IBOutlet UILabel *onlineLab;
  11. @property (weak, nonatomic) IBOutlet UIImageView *onlineImg;
  12. @property (weak, nonatomic) IBOutlet UILabel *memberLab;
  13. @end
  14. @implementation RDSHomeListCell
  15. - (void)awakeFromNib {
  16. [super awakeFromNib];
  17. // Initialization code
  18. }
  19. - (void)setSelected:(BOOL)selected animated:(BOOL)animated {
  20. [super setSelected:selected animated:animated];
  21. // Configure the view for the selected state
  22. }
  23. - (void)setModel:(RDSHomeModel *)model{
  24. _model = model;
  25. _nameLab.text = model.name;
  26. _onlineLab.text = model.is_online == 1? @"在线" : @"离线";
  27. _onlineImg.highlighted = model.is_online == 1? YES:NO;
  28. _memberLab.text = [NSString stringWithFormat:@"家庭成员:%d",(int)model.member.count];
  29. }
  30. @end