MyWalletDetailListCell.m 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. //
  2. // MyWalletDetailListCell.m
  3. // model
  4. //
  5. // Created by 杨键 on 2018/8/3.
  6. // Copyright © 2018年 Mine. All rights reserved.
  7. //
  8. #import "MyWalletDetailListCell.h"
  9. @implementation MyWalletDetailListCell
  10. - (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier {
  11. self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
  12. if (self) {
  13. self.selectionStyle = UITableViewCellSelectionStyleNone;
  14. [self creatCellSubViews];
  15. }
  16. return self;
  17. }
  18. - (void)creatCellSubViews {
  19. //图标
  20. self.iconImageView = [[UIImageView alloc] initWithFrame:CGRectMake(20, 15, 50, 50)];
  21. [self.contentView addSubview:self.iconImageView];
  22. //名称
  23. self.titleLabel = [[UILabel alloc] initWithFrame:CGRectMake(CGRectGetMaxX(self.iconImageView.frame)+15, 10, ScreenWidth/2, 30)];
  24. self.titleLabel.textAlignment = NSTextAlignmentLeft;
  25. self.titleLabel.textColor = RGBValueColor(0x333333, 1.0);
  26. self.titleLabel.font = [UIFont systemFontOfSize:16];
  27. [self.contentView addSubview:self.titleLabel];
  28. //时间
  29. self.timeLabel = [[UILabel alloc] initWithFrame:CGRectMake(CGRectGetMaxX(self.iconImageView.frame)+15, 40, ScreenWidth/2, 30)];
  30. self.timeLabel.textAlignment = NSTextAlignmentLeft;
  31. self.timeLabel.textColor = RGBValueColor(0x666666, 1.0);
  32. self.timeLabel.font = [UIFont systemFontOfSize:12];
  33. [self.contentView addSubview:self.timeLabel];
  34. //金额
  35. self.amountLabel = [[UILabel alloc] initWithFrame:CGRectMake(ScreenWidth/2, 20, ScreenWidth/2-20, 40)];
  36. self.amountLabel.textAlignment = NSTextAlignmentRight;
  37. self.amountLabel.textColor = RGBValueColor(0x333333, 1.0);
  38. self.amountLabel.font = [UIFont systemFontOfSize:20];
  39. [self.contentView addSubview:self.amountLabel];
  40. //底部线条
  41. self.lineView = [[UIImageView alloc] initWithFrame:CGRectMake(84, 79.5, ScreenWidth-84, 0.5)];
  42. self.lineView.image = [UIImage imageNamed:@"fengexian"];
  43. [self.contentView addSubview:self.lineView];
  44. }
  45. - (void)awakeFromNib {
  46. [super awakeFromNib];
  47. // Initialization code
  48. }
  49. - (void)setSelected:(BOOL)selected animated:(BOOL)animated {
  50. [super setSelected:selected animated:animated];
  51. // Configure the view for the selected state
  52. }
  53. @end