YOUPAIProfileCollectionCell.m 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. //
  2. // YOUPAIProfileCollectionCell.m
  3. // MSYOUPAI
  4. //
  5. // Created by xiaohaoran on 2022/3/1.
  6. // Copyright © 2022 MS. All rights reserved.
  7. //
  8. #import "YOUPAIProfileCollectionCell.h"
  9. @implementation YOUPAIProfileCollectionCell
  10. -(instancetype)initWithFrame:(CGRect)frame{
  11. self = [super initWithFrame:frame];
  12. if (self) {
  13. [self qxfsetSubView];
  14. }
  15. return self;
  16. }
  17. -(void)qxfsetSubView{
  18. // self.vqupmoneyImage = [UIImageView new];
  19. // [self.contentView addSubview:self.vqupmoneyImage];
  20. // [self.vqupmoneyImage mas_makeConstraints:^(MASConstraintMaker *make) {
  21. // make.top.mas_equalTo(9);
  22. // make.centerX.mas_equalTo(40);
  23. // make.height.mas_equalTo(16);
  24. // }];
  25. // self.vqupmoneyImage.contentMode = UIViewContentModeScaleAspectFit;
  26. //// self.vqupmoneyImage.image = [UIImage imageNamed:@"vqu_images_mine_money"];
  27. self.vqupiconImageView = [UIImageView new];
  28. [self.contentView addSubview:self.vqupiconImageView];
  29. [self.vqupiconImageView mas_makeConstraints:^(MASConstraintMaker *make) {
  30. make.top.mas_equalTo(self.contentView).offset(WHScreenEqualWidth(10));
  31. make.centerX.equalTo(self.contentView);
  32. make.width.mas_equalTo(WHScreenEqualWidth(44));
  33. make.height.mas_equalTo(WHScreenEqualWidth(44));
  34. }];
  35. self.vqupiconImageView.contentMode = UIViewContentModeScaleAspectFill;
  36. self.vqupiconImageView.clipsToBounds = YES;
  37. //title
  38. self.vqupTitleLabel = [UILabel new];
  39. [self.contentView addSubview:self.vqupTitleLabel];
  40. [self.vqupTitleLabel mas_makeConstraints:^(MASConstraintMaker *make) {
  41. make.centerX.mas_equalTo(self.vqupiconImageView);
  42. make.top.mas_equalTo(self.vqupiconImageView.mas_bottom).offset(5);
  43. }];
  44. self.vqupTitleLabel.textColor = LZ273145Color;
  45. self.vqupTitleLabel.font = [UIFont systemFontOfSize:12];
  46. }
  47. @end