ChatFriendCell.m 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. //
  2. // ChatFriendCell.m
  3. // BuguLive
  4. //
  5. // Created by 朱庆彬 on 2017/8/22.
  6. // Copyright © 2017年 xfg. All rights reserved.
  7. //
  8. #import "ChatFriendCell.h"
  9. #import "JSBadgeView.h"
  10. #import "M80AttributedLabel.h"
  11. @implementation ChatFriendCell
  12. - (void)awakeFromNib
  13. {
  14. [super awakeFromNib];
  15. self.mheadimg.layer.cornerRadius = 48 / 2;
  16. self.mheadimg.layer.borderWidth = 1;
  17. self.mheadimg.layer.borderColor = [UIColor whiteColor].CGColor;
  18. // self.mjsbadge.badgeAlignment = JSBadgeViewAlignmentCenter;
  19. self.mmsg.font = kAppSmallTextFont;
  20. self.mmsg.textColor = [UIColor colorWithHexString:@"777777"];
  21. self.mmsg.backgroundColor = kClearColor;
  22. self.mlevel.hidden = YES;
  23. self.viconImageView.hidden = YES;
  24. }
  25. - (void)setSelected:(BOOL)selected animated:(BOOL)animated
  26. {
  27. [super setSelected:selected animated:animated];
  28. }
  29. - (void)setUnReadCount:(int)count
  30. {
  31. if (count > 0) {
  32. self.unReadLabel.text = [NSString stringWithFormat:@"%d", count];
  33. self.unReadView.hidden = NO;
  34. return;
  35. }
  36. self.unReadView.hidden = YES;
  37. }
  38. @end