//
|
// PBTopTitleTableViewCell.m
|
// IphoneBIMe
|
//
|
// Created by zjf on 2020/11/30.
|
// Copyright © 2020 ProBIM. All rights reserved.
|
//
|
|
#import "PBTopTitleTableViewCell.h"
|
#import "PBExamineAddModel.h"
|
@interface PBTopTitleTableViewCell()
|
@property (nonatomic, weak) UILabel *titleL;
|
@end
|
|
@implementation PBTopTitleTableViewCell
|
- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier {
|
if (self = [super initWithStyle:style reuseIdentifier:reuseIdentifier]) {
|
[self setupUI];
|
}
|
return self;
|
}
|
- (void)setupUI {
|
UIView *topView = [[UIView alloc] init];
|
topView.backgroundColor = PBColor(244, 245, 246);
|
[self.contentView addSubview:topView];
|
[topView mas_makeConstraints:^(MASConstraintMaker *make) {
|
make.top.left.right.equalTo(self.contentView);
|
make.height.equalTo(@20);
|
}];
|
UIView *bgView = [[UIView alloc] init];
|
bgView.backgroundColor = [UIColor whiteColor];
|
[self.contentView addSubview:bgView];
|
[bgView mas_makeConstraints:^(MASConstraintMaker *make) {
|
make.top.equalTo(topView).offset(10);
|
make.left.right.bottom.equalTo(self.contentView);
|
make.height.equalTo(@45);
|
}];
|
[bgView circleViewWithRadius:6];
|
UILabel *titleL = [UILabel z_labelWithText:@"基本信息" Color:PBColor(40, 58, 79) isBold:YES Font:16];
|
[self.contentView addSubview:titleL];
|
[titleL mas_makeConstraints:^(MASConstraintMaker *make) {
|
make.top.equalTo(self.contentView).offset(22);
|
make.left.equalTo(self.contentView).offset(15);
|
make.right.equalTo(self.contentView).offset(-15);
|
make.height.equalTo(@18);
|
}];
|
self.titleL = titleL;
|
}
|
- (void)setExamineAddModel:(PBExamineAddModel *)examineAddModel {
|
_examineAddModel = examineAddModel;
|
self.titleL.text = examineAddModel.title;
|
}
|
|
|
- (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
|