YOUPAILZCommonWordCell.m 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. //
  2. // YOUPAILZCommonWordCell.m
  3. // MSYOUPAI
  4. //
  5. // Created by CY on 2022/3/8.
  6. // Copyright © 2022 MS. All rights reserved.
  7. //
  8. #import "YOUPAILZCommonWordCell.h"
  9. @interface YOUPAILZCommonWordCell ()
  10. @property (nonatomic, weak) UILabel *youpaipTitleL;
  11. @end
  12. @implementation YOUPAILZCommonWordCell
  13. - (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{
  14. if (self = [super initWithStyle:style reuseIdentifier:reuseIdentifier]) {
  15. self.selectionStyle = UITableViewCellSelectionStyleNone;
  16. [self youpaifinitUI];
  17. }
  18. return self;
  19. }
  20. - (void)youpaifinitUI{
  21. UIImageView *arrowImgView = [[UIImageView alloc]init];
  22. arrowImgView.contentMode = UIViewContentModeScaleAspectFill;
  23. arrowImgView.image = [UIImage imageNamed:@"vqu_images_H_cell_arrow_gray"];
  24. [self.contentView addSubview:arrowImgView];
  25. [arrowImgView makeConstraints:^(MASConstraintMaker *make) {
  26. make.right.equalTo(-12.0f);
  27. make.centerY.equalTo(self.contentView);
  28. make.size.mas_equalTo(CGSizeMake(11, 11));
  29. }];
  30. UILabel *youpaipTitleL = [[UILabel alloc] init];
  31. youpaipTitleL.textColor = LZ273145Color;
  32. youpaipTitleL.font = LCFont14;
  33. youpaipTitleL.numberOfLines = 2;
  34. [self.contentView addSubview:youpaipTitleL];
  35. self.youpaipTitleL = youpaipTitleL;
  36. [youpaipTitleL mas_makeConstraints:^(MASConstraintMaker *make) {
  37. make.left.offset(12.0f);
  38. make.centerY.equalTo(self.contentView);
  39. make.right.equalTo(arrowImgView.mas_left).offset(-12.0f);
  40. }];
  41. [self.contentView addLineWithColor:LZF5F4F7Color lineRect:CGRectMake(12.0f, 53.5f, KScreenWidth - 24.0f, 0.5f)];
  42. }
  43. - (void)youpaifreloadWithModel:(YOUPAILZIMCommonWordModel *)model{
  44. self.youpaipTitleL.text = model.youpaipword;
  45. }
  46. @end