You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

58 lines
1.4 KiB

//
// TFBasicTableViewCell.m
// WXReader
//
// Created by 谢腾飞 on 2020/12/1.
// Copyright © 2020 xtfei_2011@126.com. All rights reserved.
//
#import "TFBasicTableViewCell.h"
@implementation TFBasicTableViewCell
- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
if (self = [super initWithStyle:style reuseIdentifier:reuseIdentifier]) {
self.backgroundColor = [UIColor whiteColor];
self.selectionStyle = UITableViewCellSelectionStyleNone;
[self createSubviews];
}
return self;
}
- (void)createSubviews
{
self.lineView = [[UIView alloc] init];
self.lineView.backgroundColor = kGrayLineColor;
self.lineView.hidden = YES;
[self.contentView addSubview:self.lineView];
[self.lineView mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.mas_equalTo(kMargin);
make.width.mas_equalTo(SCREEN_WIDTH - kMargin);
make.height.mas_equalTo(kCellLineHeight);
make.bottom.mas_equalTo(self.contentView.mas_bottom).with.offset(-kCellLineHeight);
}];
}
- (void)setIndex:(NSIndexPath *)index
{
_index = index;
}
- (void)setHiddenEndLine:(BOOL)hiddenEndLine
{
_hiddenEndLine = hiddenEndLine;
self.lineView.hidden = hiddenEndLine;
}
- (void)setProductionType:(TFProductionType)productionType
{
_productionType = productionType;
}
@end