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.
94 lines
3.0 KiB
94 lines
3.0 KiB
![]()
2 years ago
|
//
|
||
|
// FeedbackTableViewCell.m
|
||
|
// LekangGuard
|
||
|
//
|
||
|
// Created by ecell on 2023/7/4.
|
||
|
//
|
||
|
|
||
|
#import "FeedbackTableViewCell.h"
|
||
|
|
||
|
@interface FeedbackTableViewCell ()
|
||
|
|
||
|
@property (nonatomic ,weak) UILabel *titlelabel;
|
||
|
|
||
|
@property (nonatomic ,weak) UILabel *statusLabel;
|
||
|
|
||
|
@property (nonatomic ,weak) UILabel *textsLabel;
|
||
|
|
||
|
@end
|
||
|
|
||
|
@implementation FeedbackTableViewCell
|
||
|
|
||
|
- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
|
||
|
{
|
||
|
self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
|
||
|
if (self)
|
||
|
{
|
||
|
self.selectionStyle = UITableViewCellSelectionStyleNone;
|
||
|
self.backgroundColor = KKClearColor;
|
||
|
[self subCellView];
|
||
|
}
|
||
|
|
||
|
return self;
|
||
|
}
|
||
|
|
||
|
- (void)setModel:(FeedbackModel *)model
|
||
|
{
|
||
|
_model = model;
|
||
|
self.titlelabel.text = model.docSubject;
|
||
|
self.textsLabel.text = model.content;
|
||
|
self.statusLabel.text = [model.status isEqualToString:@"open"] ? @"未回复" : @"";
|
||
|
}
|
||
|
|
||
|
- (void)subCellView
|
||
|
{
|
||
|
UIView *bgView = [UICommon ui_view:CGRectZero backgroundColor:KKWhiteColorColor cornerRadius:10 borderWidth:0 borderColor:KKClearColor];
|
||
|
[self.contentView addSubview:bgView];
|
||
|
[bgView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||
|
make.left.equalTo(self.contentView.mas_left).offset(15);
|
||
|
make.right.equalTo(self.contentView.mas_right).inset(15);
|
||
|
make.top.equalTo(self.contentView.mas_top).offset(12);
|
||
|
make.bottom.equalTo(self.contentView.mas_bottom);
|
||
|
}];
|
||
|
|
||
|
UILabel *titlelabel = [UICommon ui_label:CGRectZero lines:0 align:NSTextAlignmentLeft font:FontBoldADA_(18) textColor:KKTextBlackColor text:@"" Radius:0];
|
||
|
self.titlelabel = titlelabel;
|
||
|
[bgView addSubview:titlelabel];
|
||
|
[titlelabel mas_makeConstraints:^(MASConstraintMaker *make) {
|
||
|
make.left.equalTo(bgView).offset(15);
|
||
|
make.top.equalTo(bgView.mas_top).offset(15);
|
||
|
}];
|
||
|
|
||
|
UILabel *statusLabel = [UICommon ui_label:CGRectZero lines:0 align:NSTextAlignmentRight font:FontADA_(12) textColor:UIColor.redColor text:@"" Radius:0];
|
||
|
self.statusLabel = statusLabel;
|
||
|
[bgView addSubview:statusLabel];
|
||
|
[statusLabel mas_makeConstraints:^(MASConstraintMaker *make) {
|
||
|
make.right.equalTo(bgView.mas_right).inset(15);
|
||
|
make.top.equalTo(bgView.mas_top).offset(15);
|
||
|
}];
|
||
|
|
||
|
UILabel *textsLabel = [UICommon ui_label:CGRectZero lines:0 align:NSTextAlignmentLeft font:FontADA_(14) textColor:KKGrey143 text:@"" Radius:0];
|
||
|
self.textsLabel = textsLabel;
|
||
|
[bgView addSubview:textsLabel];
|
||
|
[textsLabel mas_makeConstraints:^(MASConstraintMaker *make) {
|
||
|
make.left.equalTo(bgView.mas_left).offset(15);
|
||
|
make.right.equalTo(bgView.mas_right).inset(15);
|
||
|
make.top.equalTo(titlelabel.mas_bottom).offset(15);
|
||
|
make.bottom.equalTo(bgView.mas_bottom).inset(15);
|
||
|
}];
|
||
|
|
||
|
}
|
||
|
|
||
|
- (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
|