MOGuildStartCell.m 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. //
  2. // MOGuildStartCell.m
  3. // MiMoLive
  4. //
  5. // Created by SuperC on 2023/10/25.
  6. //
  7. #import "MOGuildStartCell.h"
  8. @implementation MOGuildStartCell
  9. - (void)awakeFromNib {
  10. [super awakeFromNib];
  11. // Initialization code
  12. self.backgroundColor = [MOTools colorWithHexString:@"#F5F1F6" alpha:1.0];
  13. self.bgView.layer.cornerRadius = 12.0;
  14. self.bgView.layer.masksToBounds = YES;
  15. self.iconImg.layer.cornerRadius = 52.0 / 2.0;
  16. self.iconImg.layer.masksToBounds = YES;
  17. }
  18. - (void)setSelected:(BOOL)selected animated:(BOOL)animated {
  19. [super setSelected:selected animated:animated];
  20. // Configure the view for the selected state
  21. }
  22. - (void)setModel:(MOGuildBase *)model{
  23. _model = model;
  24. [self.iconImg sd_setImageWithURL:[NSURL URLWithString:model.logo] placeholderImage:[UIImage imageNamed:@""]];
  25. self.titleNameLab.text = model.name;
  26. [self.anchorNumBtn setTitle:[NSString stringWithFormat:@"Anchor: %.f",model.anchor] forState:UIControlStateNormal];
  27. [self.countryImg sd_setImageWithURL:[NSURL URLWithString:model.country]];
  28. }
  29. @end