| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566 |
- //
- // MyWalletDetailListCell.m
- // model
- //
- // Created by 杨键 on 2018/8/3.
- // Copyright © 2018年 Mine. All rights reserved.
- //
- #import "MyWalletDetailListCell.h"
- @implementation MyWalletDetailListCell
- - (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier {
- self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
- if (self) {
- self.selectionStyle = UITableViewCellSelectionStyleNone;
- [self creatCellSubViews];
- }
- return self;
- }
- - (void)creatCellSubViews {
-
- //图标
- self.iconImageView = [[UIImageView alloc] initWithFrame:CGRectMake(20, 15, 50, 50)];
- [self.contentView addSubview:self.iconImageView];
-
- //名称
- self.titleLabel = [[UILabel alloc] initWithFrame:CGRectMake(CGRectGetMaxX(self.iconImageView.frame)+15, 10, ScreenWidth/2, 30)];
- self.titleLabel.textAlignment = NSTextAlignmentLeft;
- self.titleLabel.textColor = RGBValueColor(0x333333, 1.0);
- self.titleLabel.font = [UIFont systemFontOfSize:16];
- [self.contentView addSubview:self.titleLabel];
-
- //时间
- self.timeLabel = [[UILabel alloc] initWithFrame:CGRectMake(CGRectGetMaxX(self.iconImageView.frame)+15, 40, ScreenWidth/2, 30)];
- self.timeLabel.textAlignment = NSTextAlignmentLeft;
- self.timeLabel.textColor = RGBValueColor(0x666666, 1.0);
- self.timeLabel.font = [UIFont systemFontOfSize:12];
- [self.contentView addSubview:self.timeLabel];
-
- //金额
- self.amountLabel = [[UILabel alloc] initWithFrame:CGRectMake(ScreenWidth/2, 20, ScreenWidth/2-20, 40)];
- self.amountLabel.textAlignment = NSTextAlignmentRight;
- self.amountLabel.textColor = RGBValueColor(0x333333, 1.0);
- self.amountLabel.font = [UIFont systemFontOfSize:20];
- [self.contentView addSubview:self.amountLabel];
-
- //底部线条
- self.lineView = [[UIImageView alloc] initWithFrame:CGRectMake(84, 79.5, ScreenWidth-84, 0.5)];
- self.lineView.image = [UIImage imageNamed:@"fengexian"];
- [self.contentView addSubview:self.lineView];
- }
- - (void)awakeFromNib {
- [super awakeFromNib];
- // Initialization code
- }
- - (void)setSelected:(BOOL)selected animated:(BOOL)animated {
- [super setSelected:selected animated:animated];
- // Configure the view for the selected state
- }
- @end
|