MyWalletCell.m 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. //
  2. // MyWalletCell.m
  3. // model
  4. //
  5. // Created by zuxiukuan on 2018/7/15.
  6. // Copyright © 2018年 Mine. All rights reserved.
  7. // 我的钱包cell
  8. #import "MyWalletCell.h"
  9. @interface MyWalletCell ()
  10. @end
  11. @implementation MyWalletCell
  12. - (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier {
  13. self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
  14. if (self) {
  15. //
  16. self.selectionStyle = UITableViewCellSelectionStyleNone;
  17. [self creatCellSubViews];
  18. }
  19. return self;
  20. }
  21. - (void)creatCellSubViews {
  22. //
  23. CGRect frame = CGRectMake(20, 15, 20, 20);
  24. self.iconImageView = [[UIImageView alloc] initWithFrame:frame];
  25. [self.contentView addSubview:self.iconImageView];
  26. //
  27. self.titleLabel = [[UILabel alloc] initWithFrame:CGRectMake(CGRectGetMaxX(self.iconImageView.frame) + 12, 15, ScreenWidth / 2, 20)];
  28. self.titleLabel.textAlignment = NSTextAlignmentLeft;
  29. self.titleLabel.textColor = RGBValueColor(0x333333, 1.0);
  30. self.titleLabel.font = [UIFont systemFontOfSize:16];
  31. [self.contentView addSubview:self.titleLabel];
  32. //
  33. self.arrowView = [[UIImageView alloc] initWithFrame:CGRectMake(ScreenWidth - 28, 18, 8, 14)];
  34. self.arrowView.image = [UIImage imageNamed:@"youjiantou"];
  35. [self.contentView addSubview:self.arrowView];
  36. //
  37. self.lineView = [[UIImageView alloc] initWithFrame:CGRectMake(0, 49, ScreenWidth, 1)];
  38. self.lineView.image = [UIImage imageNamed:@"fengexian"];
  39. [self.contentView addSubview:self.lineView];
  40. }
  41. - (void)layoutSubviews {
  42. [super layoutSubviews];
  43. // NSLog(@"frame = %@", NSStringFromCGRect(self.frame));
  44. }
  45. @end