JXGroupMemberCell.m 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. //
  2. // JXGroupMemberCell.m
  3. // shiku_im
  4. //
  5. // Created by IMAC on 2019/10/11.
  6. // Copyright © 2019 Reese. All rights reserved.
  7. //
  8. #import "JXGroupMemberCell.h"
  9. @implementation JXGroupMemberCell
  10. - (instancetype)initWithFrame:(CGRect)frame{
  11. self = [super initWithFrame:frame];
  12. if (self) {
  13. _imageView = [[UIImageView alloc] initWithFrame:CGRectMake(0, 0, 52, 52)];
  14. _imageView.layer.cornerRadius = 26;
  15. _imageView.layer.masksToBounds = YES;
  16. [self.contentView addSubview:_imageView];
  17. _label = [[JXLabel alloc] initWithFrame:CGRectMake(0, 55, 52, 15)];
  18. _label.font = g_factory.font12;
  19. _label.textColor = HEXCOLOR(0x333333);
  20. _label.textAlignment = NSTextAlignmentCenter;
  21. [self.contentView addSubview:_label];
  22. }
  23. return self;
  24. }
  25. - (void)buildNewImageview{
  26. if (_imageView) {
  27. [_imageView sd_cancelCurrentAnimationImagesLoad];
  28. [_imageView removeFromSuperview];
  29. _imageView = nil;
  30. _imageView = [[UIImageView alloc] initWithFrame:CGRectMake(0, 0, 52, 52)];
  31. _imageView.layer.cornerRadius = 26;
  32. _imageView.layer.masksToBounds = YES;
  33. [self.contentView addSubview:_imageView];
  34. }
  35. }
  36. @end