YOUPAILCCoinBtnCell.m 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. //
  2. // YOUPAILCCoinBtnCell.m
  3. // LiveChat
  4. //
  5. // Created by 张灿 on 2018/4/22.
  6. // Copyright © 2018年 caicai. All rights reserved.
  7. //
  8. #import "YOUPAILCCoinBtnCell.h"
  9. @implementation YOUPAILCCoinBtnCell
  10. - (id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{
  11. if (self = [super initWithStyle:style reuseIdentifier:reuseIdentifier]) {
  12. self.selectionStyle = UITableViewCellSelectionStyleNone;
  13. //v.1.5.6适配暗黑模式
  14. [self.contentView setBackgroundColor:LCBkgColor];
  15. [self youpaifinitUI];
  16. }
  17. return self;
  18. }
  19. - (void)youpaifinitUI{
  20. self.youpaipbaseView = [[UIView alloc]initWithFrame:CGRectMake(0,0,KScreenWidth,70)];
  21. self.youpaipbaseView.backgroundColor = LCBkgColor;
  22. [self.contentView addSubview:self.youpaipbaseView];
  23. [self.youpaipbaseView addLineWithColor:HexColorFromRGB(0x28262D) lineRect:CGRectMake(14.0f, 69.5f, KScreenWidth - 28.0f, 0.5f)];
  24. self.youpaipheadLabel = [[UILabel alloc]init];
  25. self.youpaipheadLabel.font = LCFont14;
  26. self.youpaipheadLabel.textColor = [UIColor whiteColor];
  27. self.youpaipheadLabel.textAlignment = NSTextAlignmentLeft;
  28. [self.youpaipbaseView addSubview:self.youpaipheadLabel];
  29. [self.youpaipheadLabel makeConstraints:^(MASConstraintMaker *make) {
  30. make.left.offset(14);
  31. make.centerY.equalTo(self.youpaipbaseView);
  32. }];
  33. // self.dataLabel = [[UILabel alloc]init];
  34. // self.dataLabel.font = LCBoldFont(17);
  35. // self.dataLabel.textColor = LCTextBlack;
  36. // self.dataLabel.textAlignment = NSTextAlignmentLeft;
  37. // [self.baseView addSubview:self.dataLabel];
  38. // [self.dataLabel makeConstraints:^(MASConstraintMaker *make) {
  39. // make.left.equalTo(self.headLabel.right).offset(10);
  40. // make.top.equalTo(@18);
  41. // make.height.equalTo(@20);
  42. //
  43. // }];
  44. self.youpaipfooterBtn = [[UIButton alloc]init];
  45. self.youpaipfooterBtn.titleLabel.font = LCFont(12);
  46. [self.youpaipfooterBtn setTitleColor:LCWhiteColor forState:(UIControlStateNormal)];
  47. self.youpaipfooterBtn.layer.cornerRadius = 11;
  48. self.youpaipfooterBtn.layer.masksToBounds = YES;
  49. [self.youpaipbaseView addSubview:self.youpaipfooterBtn];
  50. [self.youpaipfooterBtn makeConstraints:^(MASConstraintMaker *make) {
  51. make.right.offset(-14.0f);
  52. make.centerY.equalTo(self.youpaipbaseView);
  53. make.size.mas_equalTo(CGSizeMake(64.0f,22));
  54. }];
  55. }
  56. @end