小说绘上架版本
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
//
|
||||
// TFRecordsTableViewCell.h
|
||||
// TFReader
|
||||
//
|
||||
// Created by 谢腾飞 on 2020/12/12.
|
||||
// Copyright © 2020 xtfei_2011@126.com. All rights reserved.
|
||||
//
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
#import "WXYZ_RecordsModel.h"
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface TFRecordsTableViewCell : TFBasicTableViewCell
|
||||
|
||||
@property (nonatomic ,strong) WXBookRecordsListModel *listModel;
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
@@ -0,0 +1,75 @@
|
||||
//
|
||||
// TFRecordsTableViewCell.m
|
||||
// TFReader
|
||||
//
|
||||
// Created by 谢腾飞 on 2020/12/12.
|
||||
// Copyright © 2020 xtfei_2011@126.com. All rights reserved.
|
||||
//
|
||||
|
||||
#import "TFRecordsTableViewCell.h"
|
||||
|
||||
@interface TFRecordsTableViewCell ()
|
||||
{
|
||||
UILabel *titleLabel;
|
||||
UILabel *dateLabel;
|
||||
UILabel *moneyLabel;
|
||||
}
|
||||
@end
|
||||
|
||||
@implementation TFRecordsTableViewCell
|
||||
|
||||
- (void)createSubviews
|
||||
{
|
||||
[super createSubviews];
|
||||
|
||||
titleLabel = [[UILabel alloc] init];
|
||||
titleLabel.textAlignment = NSTextAlignmentLeft;
|
||||
titleLabel.textColor = kBlackColor;
|
||||
titleLabel.font = kMainFont;
|
||||
[self.contentView addSubview:titleLabel];
|
||||
|
||||
[titleLabel mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.left.mas_equalTo(kMargin);
|
||||
make.bottom.mas_equalTo(self.contentView.mas_centerY).with.offset(- 1);
|
||||
make.height.mas_equalTo(20);
|
||||
make.width.mas_equalTo(SCREEN_WIDTH * 2 / 3);
|
||||
}];
|
||||
|
||||
dateLabel = [[UILabel alloc] init];
|
||||
dateLabel.textAlignment = NSTextAlignmentLeft;
|
||||
dateLabel.textColor = kGrayTextLightColor;
|
||||
dateLabel.font = kFont12;
|
||||
[self.contentView addSubview:dateLabel];
|
||||
|
||||
[dateLabel mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.left.mas_equalTo(kMargin);
|
||||
make.top.mas_equalTo(self.contentView.mas_centerY).with.offset(1);
|
||||
make.height.mas_equalTo(20);
|
||||
make.width.mas_equalTo(SCREEN_WIDTH * 2 / 3);
|
||||
}];
|
||||
|
||||
moneyLabel = [[UILabel alloc] init];
|
||||
moneyLabel.textAlignment = NSTextAlignmentRight;
|
||||
moneyLabel.textColor = kBlackColor;
|
||||
moneyLabel.font = kFont13;
|
||||
[self.contentView addSubview:moneyLabel];
|
||||
|
||||
[moneyLabel mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.right.mas_equalTo(self.contentView.mas_right).with.offset(- kMargin);
|
||||
make.centerY.mas_equalTo(self.contentView.mas_centerY);
|
||||
make.height.mas_equalTo(40);
|
||||
make.width.mas_equalTo(150);
|
||||
}];
|
||||
}
|
||||
|
||||
- (void)setListModel:(WXBookRecordsListModel *)listModel
|
||||
{
|
||||
titleLabel.text = listModel.article;
|
||||
dateLabel.text = listModel.date;
|
||||
|
||||
if (listModel.detail.length > 0) {
|
||||
moneyLabel.text = listModel.detail?:@"";
|
||||
}
|
||||
}
|
||||
|
||||
@end
|
||||
Reference in New Issue
Block a user