YOUPAILZUserFeatureView.m 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. //
  2. // YOUPAILZUserFeatureView.m
  3. // MSYOUPAI
  4. //
  5. // Created by CY on 2022/2/28.
  6. // Copyright © 2022 MS. All rights reserved.
  7. //
  8. #import "YOUPAILZUserFeatureView.h"
  9. @interface YOUPAILZUserFeatureView ()
  10. @property (nonatomic, weak) UILabel *youpaiptextL;
  11. @end
  12. @implementation YOUPAILZUserFeatureView
  13. - (instancetype)init{
  14. if (self = [super init]) {
  15. [self youpaifinitUI];
  16. }
  17. return self;
  18. }
  19. - (void)youpaifinitUI{
  20. UIView *lineV = [[UIView alloc] init];
  21. lineV.backgroundColor = [LZA3AABEColor colorWithAlphaComponent:0.4f];
  22. [self addSubview:lineV];
  23. [lineV mas_makeConstraints:^(MASConstraintMaker *make) {
  24. make.left.offset(0.0f);
  25. make.centerY.equalTo(self);
  26. make.size.mas_offset(CGSizeMake(0.5f, 6.0f));
  27. }];
  28. UILabel *youpaiptextL = [[UILabel alloc] init];
  29. youpaiptextL.textColor = LZA3AABEColor;
  30. youpaiptextL.font = LCFont(10.0f);
  31. [self addSubview:youpaiptextL];
  32. self.youpaiptextL = youpaiptextL;
  33. [youpaiptextL mas_makeConstraints:^(MASConstraintMaker *make) {
  34. make.left.equalTo(lineV.mas_right).offset(4.0f);
  35. make.top.bottom.right.offset(0.0f);
  36. }];
  37. }
  38. - (void)youpaifreloadWithFeature:(NSString *)text{
  39. self.youpaiptextL.text = text;
  40. }
  41. @end