ChatFriendCell.m 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  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 = 40 / 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. UIView *lineView = [[UIView alloc]initWithFrame:CGRectMake(10, 63.5, kScreenW-20, 0.5)];
  23. lineView.backgroundColor = kClearColor;
  24. [self addSubview:lineView];
  25. self.mlevel.hidden = YES;
  26. self.viconImageView.hidden = YES;
  27. }
  28. - (void)setSelected:(BOOL)selected animated:(BOOL)animated
  29. {
  30. [super setSelected:selected animated:animated];
  31. }
  32. - (void)setUnReadCount:(int)count
  33. {
  34. if (count > 0) {
  35. self.unReadLabel.text = [NSString stringWithFormat:@"%d", count];
  36. self.unReadView.hidden = NO;
  37. return;
  38. }
  39. self.unReadView.hidden = YES;
  40. }
  41. @end