YOUPAIZYUserZiLiaoBHPhotoCell.m 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. //
  2. // YOUPAIZYUserZiLiaoBHPhotoCell.m
  3. // VQU
  4. //
  5. // Created by 肖浩然的mac on 2021/7/10.
  6. // Copyright © 2021 leo. All rights reserved.
  7. //
  8. #import "YOUPAIZYUserZiLiaoBHPhotoCell.h"
  9. @implementation YOUPAIZYUserZiLiaoBHPhotoCell
  10. -(instancetype)initWithFrame:(CGRect)frame{
  11. self = [super initWithFrame:frame];
  12. if (self) {
  13. [self youpaifsetSubView];
  14. }
  15. return self;
  16. }
  17. -(void)youpaifsetSubView{
  18. self.youpaipiconImageView = [UIImageView new];
  19. [self.contentView addSubview:self.youpaipiconImageView];
  20. [self.youpaipiconImageView mas_makeConstraints:^(MASConstraintMaker *make) {
  21. make.left.mas_equalTo(0);
  22. make.right.mas_equalTo(0);
  23. make.top.mas_equalTo(0);
  24. make.height.mas_equalTo(63);
  25. }];
  26. self.youpaipiconImageView.contentMode = UIViewContentModeScaleAspectFill;
  27. self.youpaipiconImageView.clipsToBounds = YES;
  28. self.youpaipiconImageView.layer.cornerRadius = 21;
  29. self.youpaipiconImageView.layer.masksToBounds = YES;
  30. self.youpaipNameLabel = [UILabel new];
  31. [self.contentView addSubview:self.youpaipNameLabel];
  32. [self.youpaipNameLabel mas_makeConstraints:^(MASConstraintMaker *make) {
  33. make.centerX.mas_equalTo(self.youpaipiconImageView);
  34. make.width.mas_equalTo(50);
  35. make.height.mas_equalTo(12);
  36. make.top.mas_equalTo(self.youpaipiconImageView.mas_bottom).offset(5);
  37. }];
  38. self.youpaipNameLabel.textAlignment = NSTextAlignmentCenter;
  39. self.youpaipNameLabel.font = [UIFont systemFontOfSize:10];
  40. self.youpaipNameLabel.textColor = LZA3AABEColor;
  41. self.youpaipNumLabel = [UILabel new];
  42. [self.contentView addSubview:self.youpaipNumLabel];
  43. [self.youpaipNumLabel mas_makeConstraints:^(MASConstraintMaker *make) {
  44. make.centerX.mas_equalTo(self.youpaipiconImageView);
  45. make.width.mas_equalTo(50);
  46. make.height.mas_equalTo(15);
  47. make.top.mas_equalTo(self.youpaipNameLabel.mas_bottom).offset(1);
  48. }];
  49. self.youpaipNumLabel.textAlignment = NSTextAlignmentCenter;
  50. self.youpaipNumLabel.font = LCBoldFont(12);
  51. self.youpaipNumLabel.textColor = LZ273145Color;
  52. }
  53. @end