YOUPAILZSessionCommonWordCell.m 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. //
  2. // YOUPAILZSessionCommonWordCell.m
  3. // MSYOUPAI
  4. //
  5. // Created by CY on 2022/3/8.
  6. // Copyright © 2022 MS. All rights reserved.
  7. //
  8. #import "YOUPAILZSessionCommonWordCell.h"
  9. @interface YOUPAILZSessionCommonWordCell ()
  10. @property (nonatomic, weak) UILabel *youpaiptextL;
  11. @end
  12. @implementation YOUPAILZSessionCommonWordCell
  13. - (instancetype)initWithFrame:(CGRect)frame{
  14. if (self = [super initWithFrame:frame]) {
  15. [self youpaifinitUI];
  16. }
  17. return self;
  18. }
  19. - (void)youpaifinitUI{
  20. self.contentView.backgroundColor = [UIColor whiteColor];
  21. self.contentView.layer.cornerRadius = 14.0f;
  22. self.contentView.clipsToBounds = YES;
  23. UILabel *youpaiptextL = [[UILabel alloc] init];
  24. youpaiptextL.font = LCFont(12.0f);
  25. youpaiptextL.textColor = LZ273145Color;
  26. [self.contentView addSubview:youpaiptextL];
  27. self.youpaiptextL = youpaiptextL;
  28. [youpaiptextL mas_makeConstraints:^(MASConstraintMaker *make) {
  29. make.left.offset(8.0f);
  30. make.right.offset(-8.0f);
  31. make.centerY.equalTo(self.contentView);
  32. }];
  33. }
  34. - (void)youpaifreloadWithModel:(YOUPAILZIMCommonWordModel *)model{
  35. self.youpaiptextL.text = model.youpaipword;
  36. }
  37. @end