BogoDTHeadCell.m 839 B

1234567891011121314151617181920212223242526272829303132
  1. //
  2. // BogoDTHeadCell.m
  3. // BuguLive
  4. //
  5. // Created by 宋晨光 on 2021/5/6.
  6. // Copyright © 2021 xfg. All rights reserved.
  7. //
  8. #import "BogoDTHeadCell.h"
  9. @implementation BogoDTHeadCell
  10. - (void)awakeFromNib {
  11. [super awakeFromNib];
  12. // Initialization code
  13. self.topicTitleBtn.layer.cornerRadius = kRealValue(20 / 2);
  14. self.topicTitleBtn.layer.masksToBounds = YES;
  15. self.topicTitleBtn.titleLabel.lineBreakMode = NSLineBreakByTruncatingTail;
  16. self.imgView.layer.cornerRadius = 10;
  17. self.imgView.layer.masksToBounds = YES;
  18. }
  19. - (void)resetControlModel:(MGDynamicTopicModel *)model{
  20. [self.topicTitleBtn setTitle:[NSString stringWithFormat:@" #%@ ",model.name] forState:UIControlStateNormal];
  21. [self.imgView sd_setImageWithURL:[NSURL URLWithString:model.img] placeholderImage:nil];
  22. }
  23. @end