//
|
// PBSchedulePlanTableViewCell.m
|
// IphoneBIMe
|
//
|
// Created by ZhangJF on 2022/8/22.
|
// Copyright © 2022 ProBIM. All rights reserved.
|
//
|
|
#import "PBSchedulePlanTableViewCell.h"
|
#import "PBSchedulePlanModel.h"
|
|
@interface PBSchedulePlanTableViewCell()
|
@property (nonatomic, weak) UILabel *nameL;
|
|
@end
|
@implementation PBSchedulePlanTableViewCell
|
|
- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier {
|
if (self = [super initWithStyle:style reuseIdentifier:reuseIdentifier]) {
|
[self setupUI];
|
}
|
return self;
|
}
|
- (void)setupUI {
|
self.contentView.backgroundColor = PBColor(243, 243, 244);
|
UIView *bgView = [[UIView alloc] init];
|
bgView.backgroundColor = [UIColor whiteColor];
|
[self.contentView addSubview:bgView];
|
[bgView mas_makeConstraints:^(MASConstraintMaker *make) {
|
make.top.equalTo(self.contentView).offset(16);
|
make.left.equalTo(self.contentView).offset(16);
|
make.right.equalTo(self.contentView).offset(-16);
|
make.height.equalTo(@56);
|
}];
|
bgView.layer.cornerRadius = 6;
|
[bgView.layer setMasksToBounds:YES];
|
|
UILabel *nameL = [UILabel z_labelWithText:@"" Color:PBColor(51, 51, 51) isBold:YES Font:16];
|
[self.contentView addSubview:nameL];
|
[nameL mas_makeConstraints:^(MASConstraintMaker *make) {
|
make.height.equalTo(@16);
|
make.left.equalTo(bgView).offset(20);
|
make.right.equalTo(bgView).offset(-40);
|
make.centerY.equalTo(bgView);
|
}];
|
UIImageView *nextLevel = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"nextLevel"]];
|
[self.contentView addSubview:nextLevel];
|
[nextLevel mas_makeConstraints:^(MASConstraintMaker *make) {
|
make.centerY.equalTo(bgView);
|
make.right.equalTo(bgView).offset(-20);
|
make.size.mas_equalTo(CGSizeMake(16, 12));
|
}];
|
|
self.nameL = nameL;
|
|
}
|
-(void)setPlanModel:(PBSchedulePlanModel *)planModel {
|
_planModel = planModel;
|
self.nameL.text = planModel.Name;
|
}
|
|
- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
|
[super setSelected:selected animated:animated];
|
|
// Configure the view for the selected state
|
}
|
|
@end
|