No Description

KXCalculateTableViewCell.m 2.0KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. //
  2. // KXCalculateTableViewCell.m
  3. // QBCS
  4. //
  5. // Created by kuxuan on 2017/6/6.
  6. // Copyright © 2017年 kuxuan. All rights reserved.
  7. //
  8. #import "KXCalculateTableViewCell.h"
  9. @implementation KXCalculateTableViewCell
  10. {
  11. }
  12. -(instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
  13. {
  14. if (self==[super initWithStyle:style reuseIdentifier:reuseIdentifier]) {
  15. self.backgroundColor=[UIColor whiteColor];
  16. [self setupUI];
  17. }
  18. return self;
  19. }
  20. -(void)setupUI
  21. {
  22. _numberLabel=[[UILabel alloc]initWithFrame:CGRectMake(0, 0, 0.14*SCREEN_WIDTH, 54*SCREEN_MUTI)];
  23. _numberLabel.font=FONT_SYS(16);
  24. _numberLabel.textColor=[UIColor KXColorWithHex:0x666666];
  25. _numberLabel.textAlignment=NSTextAlignmentCenter;
  26. [self.contentView addSubview:_numberLabel];
  27. _capLabel=[[UILabel alloc]initWithFrame:CGRectMake(0.14*SCREEN_WIDTH, 0,0.30*SCREEN_WIDTH , 54*SCREEN_MUTI)];
  28. _capLabel.font=FONT_SYS(16);
  29. _capLabel.textColor=[UIColor KXColorWithHex:0x666666];
  30. _capLabel.textAlignment=NSTextAlignmentCenter;
  31. [self.contentView addSubview:_capLabel];
  32. _inteLabel=[[UILabel alloc]initWithFrame:CGRectMake(0.44*SCREEN_WIDTH, 0, 0.26*SCREEN_WIDTH, 54*SCREEN_MUTI)];
  33. _inteLabel.font=FONT_SYS(16);
  34. _inteLabel.textColor=[UIColor KXColorWithHex:0x666666];
  35. _inteLabel.textAlignment=NSTextAlignmentCenter;
  36. [self.contentView addSubview:_inteLabel];
  37. _totalsumLabel=[[UILabel alloc]initWithFrame:CGRectMake(0.7*SCREEN_WIDTH, 0, 0.3*SCREEN_WIDTH, 54*SCREEN_MUTI)];
  38. _totalsumLabel.font=FONT_SYS(16);
  39. _totalsumLabel.textColor=[UIColor KXColorWithHex:0x666666];
  40. _totalsumLabel.textAlignment=NSTextAlignmentCenter;
  41. [self.contentView addSubview:_totalsumLabel];
  42. UILabel *lineLabel=[[UILabel alloc]initWithFrame:CGRectMake(0, 54*SCREEN_MUTI, SCREEN_WIDTH, 1)];
  43. lineLabel.backgroundColor=[UIColor KXColorWithHex:0xf5f5f5];
  44. [self.contentView addSubview:lineLabel];
  45. }
  46. @end