YOUPAILZReportCell.m 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. //
  2. // YOUPAILZReportCell.m
  3. // VQU
  4. //
  5. // Created by CY on 2021/6/30.
  6. // Copyright © 2021 leo. All rights reserved.
  7. //
  8. #import "YOUPAILZReportCell.h"
  9. @interface YOUPAILZReportCell ()
  10. @property (nonatomic, weak) UILabel *youpaipcontentL;
  11. @property (nonatomic, weak) UIImageView *youpaipselectedImgV;
  12. @end
  13. @implementation YOUPAILZReportCell
  14. - (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{
  15. if (self = [super initWithStyle:style reuseIdentifier:reuseIdentifier]) {
  16. self.backgroundColor = [UIColor clearColor];
  17. self.selectionStyle = UITableViewCellSelectionStyleNone;
  18. [self youpaifinitUI];
  19. }
  20. return self;
  21. }
  22. - (void)youpaifinitUI{
  23. UIImageView *selectedImgV = [[UIImageView alloc] init];
  24. [self.contentView addSubview:selectedImgV];
  25. self.youpaipselectedImgV = selectedImgV;
  26. [selectedImgV mas_makeConstraints:^(MASConstraintMaker *make) {
  27. make.right.offset(-14.0f);
  28. make.centerY.equalTo(self.contentView);
  29. make.size.mas_offset(CGSizeMake(15.0f, 15.0f));
  30. }];
  31. UILabel *contentL = [[UILabel alloc] init];
  32. contentL.font = LCFont14;
  33. contentL.textColor = LZ273145Color;
  34. [self.contentView addSubview:contentL];
  35. self.youpaipcontentL = contentL;
  36. [contentL mas_makeConstraints:^(MASConstraintMaker *make) {
  37. make.left.offset(14.0f);
  38. make.top.bottom.offset(0.0f);
  39. make.right.equalTo(selectedImgV.mas_left).offset(-14.0f);
  40. }];
  41. // [self.contentView addLineWithColor:HexColorFromRGB(0x28262D) lineRect:CGRectMake(20.0f, 53.5f, KScreenWidth - 40.0f, 0.5f)];
  42. }
  43. - (void)youpaifreloadWithModel:(YOUPAILCReportModel *)model{
  44. self.youpaipcontentL.text = model.youpaipname;
  45. self.youpaipselectedImgV.image = [UIImage imageNamed:model.youpaipisSelected ? @"vqu_images_D_report_selected" : @"vqu_images_D_report_none"];
  46. }
  47. @end